Viewing 15 posts - 20,506 through 20,520 (of 22,224 total)
Use a function to turn the comma-delimited list into a table and then join against it. You'll get all the matches and it doesn't matter how long the list is....
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
May 2, 2008 at 7:01 am
Short answer: It depends.
Longer answer: It depends. Let's take an example. You're doing a load that's going to direct data to one of two tables, so there's an if statement...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
May 2, 2008 at 6:58 am
Personal opinion, so please take with a grain of salt...
You should put the time in to learn how to do things properly in SSIS & SQL Server. That will serve...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
May 2, 2008 at 6:53 am
You're in 2005 right? Although I don't advocate using ad hoc queries, if you have to, simply use NVARCHAR(MAX).
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
May 2, 2008 at 6:46 am
dheeraj17sharma (5/2/2008)
GETSTOCKLEDGER is just a user defined procedure with some input parameter. above i have describe just a single log which might have arise during the execution of captured statment...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
May 2, 2008 at 6:42 am
dfalso (5/1/2008)
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
May 2, 2008 at 6:31 am
Oh, wait. I am an idiot. Here's the deal. The optimizer is smart enough to recognize that you're creating a table within the set when you execute the whole thing,...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
May 2, 2008 at 6:19 am
I don't quite see a question either.
BTW, having a covering index is not inherently a bad thing. Actually, it's inherently a good thing. But because of the cost of maintaining...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
May 1, 2008 at 11:43 am
It was that lack of scale that forced me to go in and make edits to the code. It wouldn't compile as it was.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
May 1, 2008 at 11:38 am
RyanRandall (5/1/2008)
I'm also reminded of this article...http://www.sqlservercentral.com/articles/Advanced/lookuptablemadness/1464/
Yeah, that was the one I meant when I said "MUD" but it's supposed to be "MUCK."
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
May 1, 2008 at 8:36 am
Weeks, dude, weeks. I just keep telling myself that bringing the sword to work won't really help the problem... I think. Maybe it will...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
May 1, 2008 at 8:32 am
You're telling me I fixed it by accident? I just put the semi-colon on because I've gotten in the habit of closing commands with it.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
May 1, 2008 at 8:31 am
Yes, but starting with SQL Server 2005, the actual tables were hidden and all access to them was controlled through dynamic management views. Some of the views look exactly like...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
May 1, 2008 at 8:24 am
A little overly complex, but very slick. Nicely done. A+. Please take my seat... no really... take my job, or just shoot me.
BTW, 2005 or better syntax is preferred.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
May 1, 2008 at 8:20 am
Absolutely. Even down to the schema, although we were lazy and just left the enums in the 'dbo' schema, but yes. That's the way to go. You're maintaining a bit...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
May 1, 2008 at 8:15 am
Viewing 15 posts - 20,506 through 20,520 (of 22,224 total)