Viewing 15 posts - 4,366 through 4,380 (of 5,588 total)
Chris Morris-439714 (4/16/2010)
jcrawf02 (4/16/2010)
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
April 16, 2010 at 5:35 pm
CirquedeSQLeil (4/16/2010)
Wayne - I like your new avatar.
Thanks. I was thinking about using this one (about 1/2 way down the page), but I figured that Steve would ask me to...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
April 16, 2010 at 5:33 pm
Yep, it's not perfect. It would be much better to normalize that data... then data can point to data, and not to columns.
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
April 16, 2010 at 9:30 am
Move the sub-query from the select's column list, and make it a derived table in the from clause, with the appropriate join condition to the [place-ref] column. Name the aggregrated...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
April 16, 2010 at 5:09 am
SSIS has to double-up the slashes, so I don't think you need to worry about it.
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
April 16, 2010 at 5:04 am
splinter-740692 (4/16/2010)
I have a SQl table which has a primary key defined onthe three columns. The index description for the primary key states as 'clustered, unique, primary key on PRIMARY'.
My...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
April 16, 2010 at 5:03 am
Sasidhar Pulivarthi (4/15/2010)
The @rid is taking the multi values by comma seperated....
ex: 12,45,24,3,78 ..
So the datatype int only takes single value of int only...it doesnot allow the above value...
For...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
April 16, 2010 at 1:44 am
Just gotta love it... you're query is taking denormalized data and normalizing it.... and you'd rather keep it this way :w00t:
With 200 columns, you're looking at dynamically performing an UNPIVOT...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
April 15, 2010 at 9:16 pm
I would suggest that you replace the #Main table with this:
CREATE TABLE #HouseRooms (NoID int, RoomName varchar(25), RoomValue float)
This allows you to run this:
-- Your original tables / code here
if...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
April 15, 2010 at 7:05 pm
Since you are determined to run it in a loop, this is as good a method as any other.
BTW, you ought to remove your "IF" statement... with it, you're not...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
April 15, 2010 at 6:11 pm
Check out ALTER TABLE in BOL.
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
April 15, 2010 at 6:05 pm
Gregory,
While I'm thinking of it, RBarryYoung wrote a couple of articles (and, supposedly, more are forthcoming) on how to eliminate cursors from your code. Check it out here[/url].
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
April 15, 2010 at 5:57 pm
Roy Ernest (4/15/2010)
I am just gonna take a break, go home and relax with my family... And then come back fresh tomorrow morning and try out the ideas... 🙂
That month-long...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
April 15, 2010 at 5:49 pm
Also:
select ServerProperty('IsClustered')
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
April 15, 2010 at 3:29 pm
From SQL? try:
select serverproperty('ComputerNamePhysicalNetBIOS'), @@ServerName
(See BOL for this). If they are the same, no cluster.
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
April 15, 2010 at 3:17 pm
Viewing 15 posts - 4,366 through 4,380 (of 5,588 total)