Viewing 15 posts - 76 through 90 (of 287 total)
I'm not sure how double quotes ever worked, but there are a couple of options. Here are two: 1. using teh CHAR function and 2. using the double-up method:DECLARE @T...
January 12, 2011 at 11:08 am
It looks like the CTE is being refernced in more than one query:
January 11, 2011 at 9:51 am
It might be trivial, but I don't see why you would have the COMMIT after the CATCH. Putting the BEGIN/COMMIT TRAN inside the TRY block seems for reasonable:BEGIN TRY
...
January 10, 2011 at 12:29 pm
To add to what has already been said tables per user are probably not the way to go. Without knowing all the details you might want to normalize things a...
December 29, 2010 at 4:38 pm
Well it appears that you have a case insensitive collation, so CHECKSUM won't show a difference between the same word with different cased letters. Just as if you did it...
December 22, 2010 at 11:56 am
This should help get you going:CREATE TABLE #myTable (column1 int, column2 varchar(256));
go
CREATE TABLE #myTable_hist (column1 int, column2 varchar(256), HistCheck INT);
GO
INSERT INTO #myTable VALUES (1, 'test');
INSERT INTO #myTable VALUES (2, 'test');
INSERT...
December 22, 2010 at 11:07 am
You can't control when SQL will do the evaluation thus the pain of using an EAV table. Since you can't redesign the DB, one option is to use a CASE...
December 20, 2010 at 2:06 pm
Paul White NZ (12/17/2010)
SELECT COALESCE((SELECT CASE WHEN RAND() <= 0.5 THEN 999 END), 999);
SELECT ISNULL((SELECT CASE WHEN RAND() <= 0.5 THEN 999 END), 999);
The...
December 17, 2010 at 4:34 pm
To add to Pauls links, here is a link of links.. 😉
http://sqlserverpedia.com/blog/sql-server-bloggers/merry-go-round-scans/
December 17, 2010 at 2:06 pm
Here is another method I've seen/used that is pretty similar to the ORDER BY NEWID(), but much faster:
SELECT TOP 10 * FROM MyTable
WHERE 0.01 >= CAST(CHECKSUM(NEWID(), SomeColumnName) & 0x7fffffff AS...
December 16, 2010 at 4:17 pm
Brandie Tarvin (12/16/2010)
Lamprey13 (12/16/2010)
Brandie Tarvin (12/16/2010)[hrYou're missing the point of my comment. He's trying to match a potentially NULL value to another value. You can't do that with a function...
December 16, 2010 at 11:57 am
Brandie Tarvin (12/16/2010)[hrYou're missing the point of my comment. He's trying to match a potentially NULL value to another value. You can't do that with a function that is designed...
December 16, 2010 at 10:57 am
I'm not sure if this is the offical standard, but here you go:
December 15, 2010 at 4:14 pm
landingnormand (12/14/2010)
Again, thanks for the reply.
I know comma-delimited lists for parameters isn't ideal but I don't know of an alternative (in 2005). The function I have used in...
December 15, 2010 at 3:41 pm
Viewing 15 posts - 76 through 90 (of 287 total)