Viewing 15 posts - 4,141 through 4,155 (of 5,588 total)
ColdCoffee (5/26/2010)
You can use DATEDIFF function:LIke:
SET DATEFORMAT DMYSELECT DATEDIFF(yy,'21-03-1985',GETDATE()) AGE
Since DateDiff returns the number of boundaries crossed in comparing these two dates, it will report the wrong age if today's...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
May 26, 2010 at 9:35 pm
Check out the two links in my signature for dealing with CROSS-TABS and PIVOTS - this looks like what you'll need.
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
May 26, 2010 at 9:22 pm
Rog Saber (5/26/2010)
But, it is making the query take a really long time...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
May 26, 2010 at 6:04 pm
You might want to check out the articles by RBarryYoung on 15 Ways to Lose Your Cursor[/url] - he walks you through it step by step.
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
May 26, 2010 at 5:54 pm
CirquedeSQLeil (5/26/2010)
WayneS (5/26/2010)
Roy Ernest (5/26/2010)
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
May 26, 2010 at 4:23 pm
Paul White NZ (5/26/2010)
Table...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
May 26, 2010 at 3:25 pm
Use a config file to set up a package variable. Pass the package variable to the script task. Check out this link.
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
May 26, 2010 at 3:06 pm
Roy Ernest (5/26/2010)
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
May 26, 2010 at 2:58 pm
You might want to check out Jeff Moden's excellent article on Running Totals[/url].
After doing this, if you have any more problems, come on back!
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
May 25, 2010 at 8:23 pm
How does this work out for you?
SELECT DISTINCT
e.EMPLID,
e.EMP_STATUS,
e.EMP_IDENTITY,
...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
May 25, 2010 at 8:13 pm
You know, the people that help out here are all un-paid volunteers, so please HELP US HELP YOU. Providing the DDL scripts (CREATE TABLE, CREATE INDEX, etc.) for the tables...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
May 25, 2010 at 7:59 pm
Not a problem... but it does GREATLY help us out... if we can just cut-and-paste some code that creates the problem you're trying to figure out, you will get a...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
May 25, 2010 at 7:57 pm
Great job of posting the table DDL, sample data, and expected output! Makes me just want to jump in and help you out.
How does this work for you?
SELECT DISTINCT
...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
May 25, 2010 at 7:53 pm
-- See how you start off by actually creating a table
-- and then inserting the data into it? Doing this really
-- makes things a lot easier for all the...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
May 25, 2010 at 6:51 pm
Jeffery Williams (5/24/2010)
INSERT INTO OPENROWSET...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
May 24, 2010 at 7:13 pm
Viewing 15 posts - 4,141 through 4,155 (of 5,588 total)