Viewing 15 posts - 256 through 270 (of 310 total)
... and, even more generic, if your target values are in a table :
DECLARE @params Integer
SELECT @params = COUNT(*) FROM dbo.TargetValues
SELECT pp.Person_id
FROM P_Person pp
JOIN dbo.TargetValues tv
ON...
November 23, 2004 at 4:06 am
An alternative, generic, solution would be :
SELECT Person_id
FROM P_Person
WHERE Comp_id IN (1, 2, 3, ...)
GROUP BY Person_id
HAVING COUNT(*) >= @NoParams
November 23, 2004 at 4:03 am
Try :
SELECT p1.Person_id
FROM P_Person p1
JOIN P_Person p2
ON p2.Person_id = p1.Person_id
...
November 23, 2004 at 3:16 am
I have encountered this before and got around it by rewriting the query 'the other way round'. Instead of the main query being on the local server and the...
November 16, 2004 at 1:59 am
I can confirm that TempDB has got the 'wrong' collation sequence so your explanation fits. Thanks for your response.
November 3, 2004 at 2:06 am
There are two types os spec to consider :
Business specs should describe the functionaslity required and need not refer to SQL at all.
Systems specs on the other hand need top...
October 8, 2004 at 2:00 am
Date 0 is 1/1/1900.
WARNING : Visual Basic uses 31 December 1899 as its base so, if you start handling dates as numerics, you can get a mismatch - it caught...
October 5, 2004 at 8:12 am
As always, it depends on what you are doing. In general terms, I would expect Jeff's function to be faster, especially as you would have to join on a...
October 5, 2004 at 7:25 am
The upper limit is 8092 bytes (nence nvarchar is 4046 characters of two bytes each) which is the maximum length of a record, but any other fields have to fit...
October 5, 2004 at 6:22 am
There was an extensive exchange on this a while ago and I think Jeff's solution came out fastest - but I don't remember the float method being considered.
I always get...
October 5, 2004 at 5:57 am
You probably need to use a derived table as a nested query, eg :
SELECT t1.KeyID, SUM(t1.TotalQuantity) - SUM(dt.Unshipped)
FROM Table1 t1
JOIN (SELECT KeyID, TotalQuantity AS...
September 28, 2004 at 7:01 am
Why do you want to do it?
If you don't need the field, it's more efficient not to get it in the first place (network traffic). If you did need...
September 16, 2004 at 5:49 am
I'm not into DTS but this error comes, for example, when CursorLocation and CursorType are incompatible. I suggest that you lok at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/mdobjconnection.asp
September 14, 2004 at 8:01 am
It's probably your connection object. Is it open? What are it's properties?
September 14, 2004 at 5:35 am
Sorry, my formatting seems to have disappeared!
SELECT s.Record_Count,
t.Trip_ID,
s.Compart_No,
t.Boat_ID,
...
September 3, 2004 at 6:15 am
Viewing 15 posts - 256 through 270 (of 310 total)