Viewing 15 posts - 691 through 705 (of 1,217 total)
OK, most probably you'll have a table Customers somewhere. You can use that to find out who has ordered both:
SELECT COUNT(distinct c.CustID)
FROM Customers c
JOIN Orders o ON o.CustID = c.CustID...
July 14, 2006 at 6:58 am
If problem is excluding new inserts, then I would store the ID's of the summarized rows from table A somewhere (in a temp table for example) or use a status...
July 14, 2006 at 6:00 am
Hello,
this should be what you are looking for:
SELECT r.ID, r.received, r.status, MAX(CASE WHEN r.status = 'Closed' THEN t.AuditDateTime ELSE NULL END) as dateclosed
FROM #Requests r
LEFT JOIN #RequestAuditTrails t ON t.requestID=r.ID...
July 14, 2006 at 5:29 am
Hello Afendi,
if your problem relates to SQL2005, it would be better to post it in SQL2005 section of the forums. You'd have much higher probability of getting a reply quickly...
July 14, 2006 at 5:11 am
Hey Steve, that was long ago... no wonder they had problems with what is what. I had a similar thing happen to me some 6 years ago (we had desktops at...
July 14, 2006 at 3:56 am
Taking advantage of the first part of Sergiy's solution, but with different way of getting the sequence number (works well with sample data posted by Peter Larsson):
declare @tableA table (a int,...
July 11, 2006 at 8:23 am
My opinion:
Do not delete any products at all, or at least not when the product is used in an order.
Generally, it is possible to delete a product that you have...
July 11, 2006 at 7:11 am
I guess we need more info... this is open to various interpretations
"IF there is nothing for today then it must fetch yesterday's records"
I would understand that requirement differently than Peter...
July 10, 2006 at 5:18 am
"So use this at your own risk - in my opinion, if you don't know what the name of a column in a table is when you're writing a query,...
June 29, 2006 at 7:24 am
Yes, there are only two ways to handle this situation. Either you have to repeat the entire calculation of [Finding Cost $/BOE] column, or you have to use derived table....
June 29, 2006 at 6:52 am
Hello Barath,
your question suggests that the data model is incorrect, or we are missing something. What is the reason for the desired output? What if one of the rows has...
June 26, 2006 at 2:02 am
Yeah, sp_makewebtask is great. We're using it for most checks and reports... started with it some time ago because it is easy to incorporate the HTML result into a mail...
June 26, 2006 at 1:53 am
IMHO in case of bad performance due to hardware, deadlocks can be greater nuisance because every action requires more time - but the reason of deadlocks is still bad code. Problems...
June 16, 2006 at 1:37 am
Read the link Sergiy posted, it should explain the situation.
To be more specific, source of error is here:
FROM dbo.GetAssessmentStatusRows(1920, S.ScheduleID )
You are using a function...
June 14, 2006 at 5:29 am
If you decide to delete the rows (I agree with Jeff that copy/rename is often the best way to do this), one possibility is to create a job - using...
June 14, 2006 at 5:02 am
Viewing 15 posts - 691 through 705 (of 1,217 total)