Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
desikankannan
Posting Yak Master
152 Posts |
Posted - 2010-08-26 : 23:15:16
|
Hi,below the my query iam search a record from table,i want to get therecord by code or description if its null i want to show only one recordselect comcode,comdesc from ascommoditytype where comcode like'null%' or comdesc like'ELECTRONICS%'Desikankannan |
|
pk_bohra
Master Smack Fu Yak Hacker
1182 Posts |
Posted - 2010-08-27 : 00:26:28
|
Is this you are looking for ?select distinct comcode,comdesc from ascommoditytype where comcode is null or comdesc like'ELECTRONICS%'.If your requirement is different then post some sample data and expected output for us to understand your requirement clearly.Regards,BohraI am here to learn from Masters and help new bees in learning. |
 |
|
kunal.mehta
Yak Posting Veteran
83 Posts |
Posted - 2010-08-27 : 08:51:13
|
Provide sample data and what is the reqt. |
 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-08-28 : 01:12:09
|
quote: Originally posted by desikankannan Hi,below the my query iam search a record from table,i want to get therecord by code or description if its null i want to show only one recordselect comcode,comdesc from ascommoditytype where comcode like'null%' or comdesc like'ELECTRONICS%'Desikankannan
which is record you want to show when its null? some default value?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|