Viewing 15 posts - 1,651 through 1,665 (of 5,588 total)
How's this?
-- See how you start off by actually creating a table and then
-- inserting the data into it? Your doing this makes it a lot easier
-- for all...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
March 23, 2011 at 1:49 pm
beginner123 (3/23/2011)
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
March 23, 2011 at 1:37 pm
How about a parameterized query run in Excel? Make the first couple of rows be for entering the parameters (Start Date, End Date, etc.), then pass to the query to...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
March 23, 2011 at 1:34 pm
belgarion (3/22/2011)
Sorry guys. Left out the OPTION (RECOMPILE) in my haste. Added it in.
Be careful with that - you need to be on SQL 2008 SP1 CU5+ (I think...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
March 23, 2011 at 8:03 am
... and opc.three beat me to it again... - even posted the same blog link!
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
March 22, 2011 at 4:40 pm
Your solution is termed a "catch-all query". Read this blog post[/url] by MVP Gail Shaw on why you shouldn't do this... and why the dynamic sql is actually a better...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
March 22, 2011 at 4:38 pm
To continue on with what Sean has suggested, I would convert your table like this:
DECLARE @New_Table TABLE (
i_serial INT PRIMARY KEY CLUSTERED,
i_TrueState BIT);
WITH cte...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
March 22, 2011 at 4:27 pm
Check out this 4-part article[/url] by MVP Gail Shaw. (Read the other parts as well - VERY useful information!)
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
March 22, 2011 at 2:32 pm
google "sp_help_revlogin" - the 2005 version is compatible with 2008.
It will script out the logins and passwords (hashed) where they can be run on another server.
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
March 21, 2011 at 3:39 pm
Best_boy26 (3/20/2011)
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
March 21, 2011 at 2:21 pm
Set it up with windows authentication only, and set yourself as an administrator. After the install, go back and set the sa pwd (unchecking the boxes for checking strength, etc.),...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
March 21, 2011 at 2:19 pm
You can also utilize a "NOT IN" in the where clause.
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
March 21, 2011 at 2:03 pm
SQLkiwi (3/21/2011)
Roy Ernest (3/21/2011)
Hey All, Is there somebody from Boston here?No, but I'll be in Boston for SQL Saturday #71 :w00t:
crud... shouldn't have canceled going after not getting accepted to...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
March 21, 2011 at 1:17 pm
See the two articles referenced in my signature dealing with Cross-Tabs and Pivots - Parts 1 and 2.
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
March 21, 2011 at 10:05 am
I'm writing a QotD dealing with actions NOT logged - so:
1. Does anyone have some good things that people think are not logged, but actually are (table variables, truncate table...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
March 21, 2011 at 8:44 am
Viewing 15 posts - 1,651 through 1,665 (of 5,588 total)