Last post Jul 15, 2017 06:32 PM by DDNaidu
Jul 14, 2017 08:29 AM|DDNaidu|LINK
Create Table LocationInfo
Id identity(1,1) Primary key int,
Name Nvarchar(50) not null,
Location Nvarchar(50) not null,
Image Nvarchar(50) Not null,IsValid Bit
How to select count(id),one image,one name from Table Name where Is Valid=1 Group by location ?
I tried but i didnt get exact output what i think,so can u please tell me how to write query?
Jul 14, 2017 08:48 AM|Deepak Panchal|LINK
I can see that you create a new thread for the same issue that you had created before.
it is better if you can show us the exact output you want.
from this query we can't assume what you want exactly so if we provide any suggestion then we just have to make assumption which may incorrect as per your requirement.
it is better you give us detailed idea about your output to get qualified reply that can solve your issue.
Jul 14, 2017 10:47 AM|DDNaidu|LINK
Select Count(ID),Image,Name,Location From TableName
Group By Name,Location,Image.
My expected o/P Like.
Count(ID) Location Name Image
2 Bangalore Naidu naidu.JPG
5 Mumbai Raju Some.JPG
2 HYD Babu Some.Jpg
I want o/p like this.
Jul 15, 2017 02:39 PM|wmec|LINK
select count(id),max(image),max(name) from LocationInfo
group by location
Jul 15, 2017 06:32 PM|DDNaidu|LINK
Thank You bro really HelpFul