Viewing 15 posts - 13,636 through 13,650 (of 22,219 total)
peleg (1/11/2011)
"SSC Veteran" - what do you mean by that?that you can't use the same cte more then once in one session?
Yep. A CTE can be referenced multiple times inside...
"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
January 11, 2011 at 12:26 pm
JEFFREY SCHELL (1/11/2011)
- Let's say we have a Thing table which has two columns ThingID and ThingTypeID. ThingID...
"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
January 11, 2011 at 11:06 am
I would not pick a varchar as my first choice for a clustered index... or my second. SSN's are not like GUID's because there is a structure to SSN. It's...
"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
January 11, 2011 at 11:02 am
You can take a look at sys.dm_db_session_space_usage or sys.dm_db_task_space_usage. They might give you indications.
"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
January 11, 2011 at 10:59 am
Henk de W (1/11/2011)
to be honest, it doesn't seem to make much senseConversion failed when converting the varchar value '13-10-10 21:00:00 ' to data type int.
Ah, I'll bet postcode has...
"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
January 11, 2011 at 9:49 am
WayneS (1/11/2011)
Might I suggest two things:
1. First, do not add things to master. Instead, create a database (named something like "Common"), and put all your special stuff there. Yes, you...
"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
January 11, 2011 at 9:40 am
What's the error that you're getting?
"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
January 11, 2011 at 9:25 am
Yes you can. In the properties window in Management Studio for the server (right click on the server in Object Explorer, select Properties from the menu). Click on the "processors"...
"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
January 11, 2011 at 9:18 am
Well now I can't recreate it. Nuts. I should have kept that code I had that generated 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
January 11, 2011 at 8:51 am
Maxim Picard (1/11/2011)
Are you referencing cteGetNewVSOldGroup later in your script?
That may be an issue as well, but if you try to hop a database and reference a CTE, you'll get...
"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
January 11, 2011 at 8:23 am
I'm stuck. I thought maybe you were trying to create a temporary global procedure, but I just tried it and those allow for temporary tables as well.
"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
January 11, 2011 at 8:10 am
My confusion comes from two sources, I don't understand what an sp_procedure is. A stored procedure:
CREATE PROCEDURE MyProcName
(@MyVariable varchar(50))
AS
CREATE TABLE #MyTable (MyId int);
INSERT INTO #MyTable
(MyId)
VALUES
(1),(2),(3);
GO
Absolutely can support temporary tables, 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
January 11, 2011 at 8:05 am
I guess I wasn't thinking of the data types as "developer" specific information. But yeah, I love spatial data, so there's one.
"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
January 11, 2011 at 7:43 am
It's because you're trying to run it across databases. The CTE created in the database you're in, not the database you're running against.
I'm unsure of how to resolve that. I'll...
"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
January 11, 2011 at 7:39 am
Kathi's article on recovery to a point[/url] in time is very good. I have one too[/url]. Basically, assuming you can answer Gail's question with a "yes" this is what you...
"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
January 11, 2011 at 7:21 am
Viewing 15 posts - 13,636 through 13,650 (of 22,219 total)