Viewing 15 posts - 20,896 through 20,910 (of 22,219 total)
You can do this:
INSERT INTO MyTable1
DEFAULT VALUES
Then, with that, you can capture the values you inserted like this:
CREATE TABLE #Id ( id INT )
INSERT INTO onecolumn
OUTPUT inserted.id
...
"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
March 11, 2008 at 12:09 pm
It means your joins are probably returning more than one row from one of the tables. That's a pretty normal occurrence when using left joins. I'd first investigate the data...
"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
March 11, 2008 at 8:45 am
Bloody hard and tedious work awaits.
You have to update all the data and find the different variances for the company names. Worst possible problem to have. Follow the steps outlined...
"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
March 11, 2008 at 6:51 am
I think Sarvash hit the issue with the single quotes.
Instead of "3/3/2008" in your SQL code. It should be '3/3/2008'
Single quotes define a string, not double quotes, in TSQL.
"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
March 11, 2008 at 6:46 am
That's a huge collection of really fundamental questions that just aren't going to be answered easily in a little post in a discussion group.
In terms of database design, you should...
"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
March 11, 2008 at 6:42 am
Yeah, Brandie is right, kick your monitor "accidently" across the room. Keep Mr. Murphy happy!
I am definately going to try the "Fear is the mind-killer" chant next time we're deep...
"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
March 7, 2008 at 9:33 am
Ah, well, that makes sense then. Still, I think you'd be able to avoid the scan. Look at the execution plan and see what criteria are being used by the...
"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
March 7, 2008 at 9:30 am
TheSQLGuru (3/7/2008)
Brandie, you are totally off the mark. Do whatever you can to make the most money so...
"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
March 7, 2008 at 9:18 am
All you can do is call them on it. If you're not satisfied with their answer, then evaluate your options.
"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
March 7, 2008 at 9:16 am
Based on the query above, I'm seeing slightly different results. I'm getting an index seek on the userlogin when I've got it indexed and a scan on the tableofdates (shock,...
"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
March 7, 2008 at 9:10 am
And COUNT and possibly GROUP BY
"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
March 7, 2008 at 8:44 am
The company I'm at currently has an annual review process. You may or may not get a raise, but you'll at least know what the boss thinks of you and...
"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
March 7, 2008 at 8:42 am
Did you try putting an index on the time table? I think it'll make a bit of a difference. Same with your user login table.
"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
March 7, 2008 at 8:35 am
May as well pile on...
Good Job Brandie. I couldn't agree more.
Enjoying the work allows you to bring passion to the job. That passion will translate to accomplishments within...
"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
March 7, 2008 at 8:22 am
Use the OUTPUT clause from the DELETE statement to insert the data as it gets removed.
"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
March 7, 2008 at 7:51 am
Viewing 15 posts - 20,896 through 20,910 (of 22,219 total)