Viewing 15 posts - 361 through 375 (of 1,413 total)
I have my copy of Inside SQL 2000 at my client's office where I won't be until thursday, so I can't check exactly what it says there. However, like I...
August 16, 2005 at 3:59 pm
Perhaps this one is simpler. It's more or less the same thing, only it does not return rank and uses a virtual numbers table instead of a real one.
CREATE FUNCTION...
August 16, 2005 at 8:11 am
A great resource for error handling in stored procedures is Erland Sommarskog's article Implementing Error Handling with Stored Procedures.
August 16, 2005 at 8:08 am
Great, happy to help. But why where you using a cursor in the first place? In SQL Server cursors are extremely seldomly necessary (if ever).
August 16, 2005 at 4:43 am
I prefer to answer here instead of via PM, since then other experts can also help. Like I said, the query I provided above should really work. With the data...
August 16, 2005 at 3:34 am
I think you have misunderstood how the query engine in SQL Server works. One query is always one query, what is interesting is to look at the execution plans that...
August 16, 2005 at 2:41 am
Yes, I am always looking to have declarative constraints, so I think this solution is quite nice but unorthodox I guess.
August 16, 2005 at 2:02 am
What error are you getting? Or is it just the wrong results? I forgot to mention that I also changed the not equals 0 in the case to equals 0....
August 16, 2005 at 2:00 am
Why are you using a cursor for this??
UPDATE empt
SET job_id = CASE WHEN @qurstr IN ('1', '3') THEN '999' ELSE '456' END
WHERE job_id = @qurstr
August 16, 2005 at 1:38 am
See this old thread where I provided a solution for the same problem.
August 16, 2005 at 1:08 am
Yes, good call. In this case with such large difference I assume there is more in play, but in general it is as simple as CPU shows how many milliseconds...
August 16, 2005 at 12:53 am
Here is the query:
SELECT [Jenis Barang],
CASE WHEN (GROUPING([Nama Barang]) = 0) THEN [Nama Barang] ELSE 'Total' END AS 'Nama Barang',
SUM(Harga)
FROM TaBarang
GROUP BY [Jenis Barang], [Nama Barang]
WITH ROLLUP
HAVING [Jenis Barang] IS...
August 16, 2005 at 12:50 am
Yep, I guess there is no real alternative that is safer in itself.
August 15, 2005 at 4:13 pm
Lets say we have this (simplified) page owned (allocated to) by object 2123456:
Header:
PageID=123 ObjectId=2123456 NextPID=124 PrevPID=122 ...
Data:
0x60: AAAA 1234
0x80: BBBB 5678
...
Slot offset array:
0 - 0x60
1 - 0x80
...
In hex, this would...
August 15, 2005 at 4:00 pm
I guess I will just stick to using xp_readmail. There's not much point writing a CLR procedure when xp_readmail will work
Sure, as long as you are aware that it...
August 15, 2005 at 3:41 pm
Viewing 15 posts - 361 through 375 (of 1,413 total)