Viewing 15 posts - 2,326 through 2,340 (of 5,588 total)
The problem is what you are doing in your case statement... specifically your date math.
You are taking the value returned from the GetDate() function, and subtracting one year from it.
So,...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
November 23, 2010 at 11:14 am
cheshirefox - thanks for posting this. This is very good information.
One point:
cheshirefox (11/23/2010)
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
November 23, 2010 at 10:05 am
This should get you going. Just duplicate it for the other 26 columns.
Also, please check out the Cross-Tab/Pivot tables, Parts 1 and 2 links in my signature.
-- See how this...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
November 23, 2010 at 9:58 am
Ahh Craig... you're always good for a chuckle! Thanks! 😀
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
November 22, 2010 at 6:37 pm
Seth Kramer (11/22/2010)
Hypothetically, lets say I wanted to see what spid owned...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
November 22, 2010 at 6:31 pm
mbova407 (11/22/2010)
Correct sql is
select * from tempdb..sysobjects where name like '%#testvm%'
Try this:
in one query window, run:
CREATE TABLE #testvm (RowID INT IDENTITY);
In a different query window, run your command:
IF EXISTS...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
November 22, 2010 at 6:04 pm
Alvin Ramard (11/22/2010)
Jack Corbett (11/22/2010)
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
November 22, 2010 at 3:46 pm
Sounds like you need to use a LEFT JOIN to the table that might be null, and an additional join to the other field/table. Select using COALESCE(table.column.that.might.be.null, value.to.use.if.other.is.null) for the...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
November 22, 2010 at 3:44 pm
Jeff Moden (11/22/2010)
I just don't ever want to be that "productive". Down-time is very important to me.
Yes, but I refer back to what Steve posted above:
If a device...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
November 22, 2010 at 3:41 pm
Craig Farrell (11/22/2010)
I wouldn't do this, too hard to realize what-all is connected to the same schedule.
Really?
In SSMS, open up a job. In the Job Properties screen, select "Schedules"....
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
November 22, 2010 at 3:39 pm
kevin4u06 (11/22/2010)
There is one more added complexity , in some recordds the state has for exampleArizona
New Jersy
instead of just their abbreviation
The spaces in this are going to complicate things greatly...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
November 22, 2010 at 3:32 pm
Grant & JP: I want to thank both of you for responding back. I hadn't been that interested before; now that I can see how it could be helpful, you'll...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
November 22, 2010 at 1:11 pm
ChrisM@home (11/22/2010)
MonsterRocks (11/22/2010)
Chris.. the links in ur signature u want me to check out?
@MonsterRocks - Sorry mate, got tied up, but Wayne jumped in with solution.
@Wayne - cheers mate,...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
November 22, 2010 at 12:51 pm
Lynn Pettis (11/22/2010)
So,...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
November 22, 2010 at 10:57 am
Lutz - wouldn't the temp tables that I used handle that? Otherwise, you end up with 4 procs to handle...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
November 22, 2010 at 10:50 am
Viewing 15 posts - 2,326 through 2,340 (of 5,588 total)