-
March 26th, 2007, 11:48 AM
#1
Return Blank data in a Stored Proc
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
-
March 26th, 2007, 05:59 PM
#2
Re: Return Blank data in a Stored Proc
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
-
March 26th, 2007, 08:06 PM
#3
Re: Return Blank data in a Stored Proc
Most versions of SQL, contain a CASE statement. Look it up on your database documentation, it should help you out.
HTH
JP
Please remember to rate all postings.
-
May 23rd, 2007, 01:09 PM
#4
Re: Return Blank data in a Stored Proc
show your sp
case fname when 0 then "" when 1 then "" end
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|