My Photo

Consulting/Training

Speaking engagement

January 2007

Sun Mon Tue Wed Thu Fri Sat
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      

Google Search


My Online Status

Disclaimer

  • No Warranty..
    I have taken care in writing the articles on this blog and make no implied or expressed warranty of any sort. For any errors or omissions, I will not be responsible in any way.

« SSIS: stored proc and ado.net | Main | c#: using reflection for parameters list »

December 17, 2006

Comments

test

You could do the entire thing using the IsNull function instead of coalesce

Lukas Holota

thanks, exacktly the idea I was looking for, you saved my ass :)

Abhishek

Thanks man...Using Case is an excellent option.

qwkmz fgxwsv

ofiev rqgpswcft kupjhtqwa ldsknzf gmpzjbo wyvz eftsjhpuv

rg

What about:

...
and (t.pcustid = @custid or @custid = -1)
...

If you pass -1 to @custid, all customers would be returned.

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment