Viewing 15 posts - 49,336 through 49,350 (of 49,566 total)
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
Has someone perhaps put a trigger on the table?
November 2, 2005 at 12:50 am
CREATE TABLE #Temp (
... -- columns matching output of stored proc
)
INSERT INTO #Temp
EXEC StoredProcedure @Params ...
The limitation is that the stored proc must return only one reordset.
November 1, 2005 at 11:48 pm
Generated at runtime, as far as I know. Makes sense, since sps can return completely different resultsets for different callings.
October 28, 2005 at 2:13 am
Thanks for the comments. I'm leaning towards 70-290. I'll probably do 291 at a later date.
Yelena: you're right, I don't work for a small company. I work for the corperate...
October 28, 2005 at 1:15 am
The way I wrote that query it should only return one reply per post, unless you have replies with identical dates.
Can you please post some example data and your...
October 28, 2005 at 12:06 am
Viewing 15 posts - 49,336 through 49,350 (of 49,566 total)