Viewing 15 posts - 49,336 through 49,350 (of 49,571 total)
Why do you not know what database the table is in?
Could you expalin in a bit more detail the situation and what you're trying to do?
November 15, 2005 at 7:12 am
Select * from tbl
where ID IN (SELECT ID FROM tbl WHERE transaction='1000')
AND ID IN (SELECT ID FROM tbl WHERE transaction='2000')
Messy, but it'll work
November 15, 2005 at 6:38 am
If you're using temp tables in order to get values out of dynamic sql, look at sp_executesql. It lets you pass parameters to dynamic sql, both input and output parameters.
November 15, 2005 at 6:32 am
Triggers should be as small as possible. I shudder at the thought of anythihng (especially a trigger) that requires that many variables.
> is it the right way to programm the...
November 15, 2005 at 6:24 am
Why are you using a cursor?
UPDATE #Sales
SET sQty = Agg.qty, Jan=Agg.jan, Feb=Agg.feb
FROM (SELECT
product,
SUM(qty) AS qty,
SUM(CASE WHEN MONTH(invoice_date) =...
November 15, 2005 at 5:46 am
This should work. It will always return
Cat Pet
Jack Owner
SELECT Min(Name), Type FROM tbl GROUP BY Type
You can use Max and that'll return John and Monkey
November 14, 2005 at 12:00 am
Do you have AWE switched on? What's sql's memory settings? Dynamic or fixed maximum?
What's the CPU utilisation like? Disk IOs? Network card queue length?
Locking? Index usage vs table scans?
There's a...
November 13, 2005 at 11:39 pm
If the ids are plain numeric, define the id column on the new table as an identity and don't put any values into it. SQL will assign identity values automatically...
November 9, 2005 at 11:48 pm
No, but users do enter values.
eg. User selects to filter on company code and lists companies 'ABC123','DEF789','XYZ000'
or, he selects company name and would like to do a wildcard match for...
November 9, 2005 at 11:02 pm
OK, a few things that maybe weren't clear.
I'm rewriting this proc because it's a performance hog. I didn't write the code in the first place. I hate cursors.
The app's a...
November 8, 2005 at 11:39 pm
Another example is the JobHistory table in the msdb database where the job start datetime is in two columns: "date" is recorded as an integer and "time" is a seperate...
November 4, 2005 at 6:35 am
Personally I'd suggest converting the time into seconds and storing as number of seconds. It can be converted back to hh:mm:ss for display purposes easily enough
SELECT CAST(SUBSTRING(WCVideoAmount,1,2) As INT)*3600 +...
November 4, 2005 at 12:50 am
I don't know why you're using a subquery for this...
SELECT itaps_users.username, itaps_users.id, itaps_rights.RAENID
FROM itaps_users INNER JOIN itaps_rights on itaps_users.id=itaps_rights.userID
WHERE itaps_rights.RAENID=3
November 3, 2005 at 11:54 pm
I don't think so.
The UMS relies on threads been cooperative - voluntarily yielding the processor to another thread.
The windows scheduler doesn't rely on any behaviour from the thread but...
November 3, 2005 at 11:04 pm
Viewing 15 posts - 49,336 through 49,350 (of 49,571 total)