Viewing 15 posts - 10,846 through 10,860 (of 26,489 total)
surma.sql (7/5/2012)
i have trouble to declare a variable. i try to declare string variable but it gives me null value
declare @vcDisplaySchoolName varchar
set @vcDisplaySchoolName = 'CITY CONNECTIONS- EAST'
select vcDisplaySchoolName from tblSchools
where...
July 5, 2012 at 2:10 pm
joe.eager (7/5/2012)
Lynn Pettis (7/5/2012)
DECLARE @StateFipsCSV varchar(500) = '01,03'
SELECT
*
FROM
[dbo].[ProductInventory] prdinv
WHERE
exists (SELECT instr.Item FROM dbo.DelimitedSplit8K(@StateFipsCSV,',') instr INNER JOIN
...
July 5, 2012 at 2:02 pm
And I found it. Try this in place of my original code above.
DECLARE @StateFipsCSV varchar(500) = '01,03'
SELECT
*
FROM
[dbo].[ProductInventory] prdinv
WHERE
exists (SELECT instr.Item FROM dbo.DelimitedSplit8K(@StateFipsCSV,',') instr INNER JOIN
...
July 5, 2012 at 1:19 pm
Note, you may get duplicate rows of data if there are multiple matches, so I'm sure that there may be other ways to accomplish this. I am looking at...
July 5, 2012 at 1:17 pm
I had to modify your code slightly, I don't have your schema in my Sandbox database.
First, the delimited split routine I use.
/****** Object: UserDefinedFunction [dbo].[DelimitedSplit8K] Script...
July 5, 2012 at 1:14 pm
Show us the expected result set from the query based on the sample data. Hate to say it, but I can figure things out much better when I can...
July 5, 2012 at 12:12 pm
joe.eager (7/5/2012)
Lynn Pettis (7/5/2012)
joe.eager (7/5/2012)
Lynn Pettis (7/5/2012)
July 5, 2012 at 11:35 am
joe.eager (7/5/2012)
Lynn Pettis (7/5/2012)
July 5, 2012 at 11:21 am
Can you explain a little more what you are trying to return? In fact, it may help if you put together the DDL (CREATE TABLE statement), some sample data,...
July 5, 2012 at 9:55 am
Or, if you can afford to lose point in time recovery during the index maintenance period, have the the process change the database from FULL recovery model to BULK_LOGGED recovery...
July 5, 2012 at 9:45 am
Koen Verbeeck (7/4/2012)
Lynn Pettis (7/3/2012)
Just once, I'd like to see him actually post something that is actually helpful and without him going off on his standards only tirade
Here you go:
http://www.sqlservercentral.com/Forums/Topic1323601-1292-1.aspx#bm1324127
I...
July 4, 2012 at 1:48 am
anil_24apr (7/3/2012)
There is no error for datetime2. I think answer should be date.
Not sure what you are talking about. I took my code from above and changed DATE to...
July 4, 2012 at 1:47 am
ScottPletcher (7/3/2012)
Lynn Pettis (7/3/2012)
ScottPletcher (7/3/2012)
Also you have 2 very big indexes.One has 10 columns and other has 9 columns .Table just has 12 columns.
It's a pretty sure bet you have...
July 3, 2012 at 3:49 pm
Mr. Celko actually posting a helpful reply!
July 3, 2012 at 3:45 pm
I'll read it and provide some feedback.
July 3, 2012 at 3:44 pm
Viewing 15 posts - 10,846 through 10,860 (of 26,489 total)