CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2003
    Posts
    133

    Question 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

  2. #2
    Join Date
    Oct 1999
    Location
    ks
    Posts
    523

    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

  3. #3
    Join Date
    Jun 2002
    Location
    Clane, Ireland
    Posts
    766

    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.

  4. #4
    Join Date
    Apr 2007
    Posts
    10

    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
  •  





Click Here to Expand Forum to Full Width

Featured