Click to See Complete Forum and Search --> : Return Blank data in a Stored Proc


High_D
March 26th, 2007, 12:48 PM
I have a Stored procedure which has 24 colums, a lot of the data is just -1s and 0s. I would like to be able to make it so that if the value IS -1 or 0, the field just shows nothing.

Is there an easy way to do this or will the Stored Proc be massive with the 24 columns?

Any info would be great,
Steve

jim enright
March 26th, 2007, 06:59 PM
confused - my read is that all the columns will hold eiter 0 or -1 and in either case you want a blank returned. pls explain.

thanks - j

jp140768
March 26th, 2007, 09:06 PM
Most versions of SQL, contain a CASE statement. Look it up on your database documentation, it should help you out.

HTH

senthilraj
May 23rd, 2007, 02:09 PM
show your sp

case fname when 0 then "" when 1 then "" end