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 |
mary_itohan
Posting Yak Master
191 Posts |
Posted - 2014-03-29 : 07:37:59
|
Hello guys,how do I get a distinct value of menu from tableshere is my scriptthanksMselect distinct menu, others, clientele,menuID from myrestaurant where username = 'mary' and batch = 238335 _____________________Yes O ! |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2014-03-29 : 08:21:21
|
[code]select distinct menu, others, clientele,menuID from myrestaurant where username = 'mary' and batch = 238335[/code] KH[spoiler]Time is always against us[/spoiler] |
 |
|
mary_itohan
Posting Yak Master
191 Posts |
Posted - 2014-03-29 : 08:32:15
|
thanks, but I want those other values in my query_____________________Yes O ! |
 |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2014-03-29 : 09:22:51
|
there are many values for others, clientele etc, which one do you want ?or maybe perhaps like this ?select menu, max(others), max(clientele), max(menuID) from myrestaurant where username = 'mary' and batch = 238335group by menu KH[spoiler]Time is always against us[/spoiler] |
 |
|
mary_itohan
Posting Yak Master
191 Posts |
Posted - 2014-03-29 : 09:33:08
|
thanks, it worked._____________________Yes O ! |
 |
|
|
|
|
|
|