Viewing 6 posts - 1 through 6 (of 6 total)
SELECT DISTINCT CONTACTID,ContactName FROM tbl_Contacts WHERE ContactID IN
(SELECT ContactID FROM tbl_Products GROUP BY ContactID HAVING COUNT(DISTINCT PRODUCTID) = (SELECT COUNT(DISTINCT PRODUCTID) FROM tbl_Products))
Regards,
PraJey
November 17, 2010 at 8:53 pm
if the requirement was known, then your underlying table must have been designed in the way you say.[a numeric / identity column]. if not, the easiest way to go about...
October 19, 2010 at 5:06 am
Hi,
for lakhs of records, sql server is well scaled to perform, but given the problem, it is very open that using such a case statement is bad enough to hit...
October 19, 2010 at 4:51 am
Hi,
Can you share more info.
Regards,
Prajey
October 19, 2010 at 4:12 am
First hit the db from the application that you have and check if they are actually transferring the data to the database.
Then as friends have told, run the sql profiler...
October 19, 2010 at 4:06 am
[font="Arial Black"][/font]
if i have understood your question, then here is reply
SELECT SUM(ORDERREFERENCE) ORDERCOUNT , [DATE], SALESPERSON FROM SALES NOLOCK
WHERE ORDERSTATUS = 'COMPLETE'
GROUP BY [DATE],SALESPERSON
Regards,
Prajey
October 19, 2010 at 3:57 am
Viewing 6 posts - 1 through 6 (of 6 total)