Viewing 15 posts - 331 through 345 (of 1,048 total)
you must specify an ORDER BY clause with your select query with TOP...
Without specifying ORDER BY sql server will give you any random no which is not correct
July 22, 2013 at 7:21 am
ChrisM@Work (7/22/2013)
SELECT op, SUM(CASE WHEN dupes > 1 THEN 1 ELSE 0 END)
FROM (
SELECT op, imei, dupes = COUNT(*)
FROM #mastertab
GROUP BY op, imei
) d
GROUP BY op
thanks Chris....
got you query...
July 22, 2013 at 7:13 am
ChrisM@Work (7/22/2013)
SELECT op, SUM(CASE WHEN dupes > 1 THEN 1 ELSE 0 END)
FROM (
SELECT op, imei, dupes = COUNT(*)
FROM #mastertab
GROUP BY op, imei
) d
GROUP BY op
can you please explain...
July 22, 2013 at 7:02 am
mahi123 (7/22/2013)
Thanks for your reply, I was try for this , but error msg was showing for that. do you have any example quer...
what error message you got?
July 22, 2013 at 1:28 am
you can create two foreign key constraint refering table table1 and table2 in your new table table3...
July 22, 2013 at 12:58 am
Can you please post the table strucutre with some sample data.....
July 21, 2013 at 10:25 pm
You can also refer this link posted by Gail to another forum:
http://blogs.msdn.com/b/davidlean/archive/2009/04/06/sql-server-nolock-hint-other-poor-ideas.aspx
July 21, 2013 at 10:12 pm
Can you please some more information to us?
Like, what is your data n tables and what output you want from that.......
July 21, 2013 at 9:56 pm
the information that you have provided here is not that much and we cant able to give you proper solution...
please provide some more details...
July 20, 2013 at 3:58 am
Viewing 15 posts - 331 through 345 (of 1,048 total)