March 27, 2007 at 7:12 pm
Hi,
i need help on this.
i have a TableA which has the following two column and has values as follows.
MS_ID Amount
001 2000
002 3000
5000
i want to write a query which should do the select only if there is value in the MS_ID column.So if there is no value in MS_ID(like in the third instance) it will not show any records.
March 28, 2007 at 2:18 am
How about
select MS_ID, Amount
from TableA
where ms_id <> ''
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data/code to get the best help[/url]
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Need a bit of Powershell? How about this
Who am I ? Sometimes this is me but most of the time this is me
March 28, 2007 at 7:07 am
Hi ,
This this Solution it will also handled the Null values in MS_ID....
select MS_ID, Amount
from TableA
where isnull(ms_id,'') <> ''
Regards
Amit
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply