Viewing 15 posts - 571 through 585 (of 14,953 total)
First, is @sql defined as varchar, or nvarchar? Needs to be unicode for this (nvarchar).
Second, you need to provide sp_executeSQL with (at least) 3 things in order to use...
November 6, 2012 at 8:22 am
1D2 is a version of scientific notation, 1 times 10 to the 2nd power. Try 1.234D3. Try an E instead of a D, too.
Int doesn't like any of...
November 6, 2012 at 8:05 am
For this kind of "look in every database" script, using a cursor to step through the list of databases you want is usually your best bet.
Since you would need to...
November 6, 2012 at 7:59 am
You'd have to define the variable inside the scope of the Exec command in order to do it that way. You're better off using sp_executeSQL instead.
EXEC sp_executeSQL 'Select DocID,...
November 6, 2012 at 7:55 am
Try converting "1D2" to Int and Float, while you're at it. That's one of the ones I use to show weaknesses in the IsNumeric() function.
SELECT CAST('1D2' AS FLOAT);
GO
SELECT CAST('1D2'...
November 6, 2012 at 7:51 am
Probably a flaw in the error-handling code in the engine. Throws an error (correctly) for a blank login, but the error message is either the wrong one, or is...
November 6, 2012 at 7:49 am
There are a few strings that are treated differently by Int conversions vs Float conversions. It's probably as simple as different teams worked on the two pieces of code,...
November 6, 2012 at 7:46 am
There's a very good article on Gail Shaw's blog: http://sqlinthewild.co.za/index.php/2007/11/27/parameter-sniffing/
Read that and see if it answers your questions. It's quite helpful to most people with questions about these things.
November 6, 2012 at 7:40 am
Does the query do anything other than return raw data from one table? Aggregations (min, max, avg, that kind of thing), running totals, pulling data from complex multi-table structures;...
November 5, 2012 at 11:35 am
scogeb (11/5/2012)
GSquared (11/3/2012)
scogeb (11/2/2012)
November 5, 2012 at 11:23 am
Jeff Moden (11/3/2012)
ScottPletcher (11/2/2012)
November 3, 2012 at 10:19 am
scogeb (11/2/2012)
November 3, 2012 at 10:15 am
Jeff Moden (11/3/2012)
KcV (11/2/2012)
I have a SP in which i create 3 temp tables. and get result from those tables. But at the end of sp do i need to...
November 3, 2012 at 10:12 am
GilaMonster (11/2/2012)
Stewart "Arturius" Campbell (11/2/2012)
Clustered indexes are best suited for those columns most frequently used in range-based searches.I would tend to disagree with that, but that's just me.
Not just you.
November 2, 2012 at 7:22 am
Are you trying to do something like this:
IF OBJECT_ID(N'tempdb..#T') IS NOT NULL
DROP TABLE #T;
CREATE TABLE #T (
Col1 VARCHAR(100));
INSERT INTO #T(Col1)
VALUES ('A ...
November 2, 2012 at 6:23 am
Viewing 15 posts - 571 through 585 (of 14,953 total)