Viewing 15 posts - 2,206 through 2,220 (of 3,221 total)
Run this query and note the anomalies in the results:
SELECT DateEngaged,MonthsInService As 'YearsinService',DATEDIFF(Month,DateEngaged,GETDATE()) AS 'Months Dif'
,DATEDIFF(Month,DateEngaged,GETDATE())/12 AS 'Pseudo Years'
,MonthsInService*2 AS 'MyColumn3' FROM dbo.MyComputedColumn ORDER BY DateEngaged
DateEngagedYearsinServiceMonths DifPseudo YearsMyColumn3
1990-03-01 00:00:00.00020 ...
January 12, 2010 at 1:54 pm
Northern Ohio - 20 miles west of Cleveland
Born in the borough of BROOKLYN in New York City.
January 12, 2010 at 9:31 am
Ernie Schlangen
Can someone verify for me that this is different in SQL 2008 vs SQL 2005? I get a different result using 2005 (I don't have access to a 2008...
January 12, 2010 at 9:26 am
Here is an excellent function developed by Lynn Pettis ...
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[MyNewID]'))
EXEC dbo.sp_executesql @statement = N'create view...
January 12, 2010 at 7:03 am
I suggest you look at
http://www.sqlservercentral.com/Forums/Topic845680-338-1.aspx
For grins and giggles I modified the input data for the above forum to replace the commas in the string with tabs.
INSERT INTO @test-2
SELECT REPLACE('xyz, 54050,...
January 11, 2010 at 5:17 pm
Whoops incorrect forum
January 11, 2010 at 4:05 pm
If you believe that the T-SQL is dynamic and coming from an application, you might want to examine (Books On Line) the command DBCC INPUTBUFFER it will return up to...
January 11, 2010 at 7:34 am
This will return a list of all SPs in a SQL 2000 db
SELECT so.name, sob.name as 'Stored Procedure name' FROM sysobjects so
LEFT OUTER JOIN (sysobjects sob left outer join...
January 10, 2010 at 3:46 pm
Before planning to use DTS to import data into a SQL 2008 DB I suggest you read the following articles, which basically say "it ain't simple"
Support for Data Transformation Services...
January 10, 2010 at 3:04 pm
Take a look at this one
http://www.sqlservercentral.com/Forums/Topic844889-392-1.aspx
It is one of the worst I have seen on SSC in a long long time.
Lynn - I must compliment you on your restraint in...
January 9, 2010 at 4:05 pm
Please note in SQL 2008:
SQL Server 2008 Books Online (November 2009)
sys.objects (Transact-SQL)
Updated: 31 August 2009
Contains a row for each user-defined, schema-scoped object that is created within a database.
...
January 9, 2010 at 3:38 pm
Having had an almost identical problem in days gone by (SQL 2000) allow me to list what I had done, and some of the mishaps encountered.
1. Created a table...
January 8, 2010 at 10:02 am
Review your code against this excellent blog post
https://www.sqlservercentral.com/blogs/lynnpettis/archive/2009/03/25/some-common-date-routines.aspx
and see if it matches what you have posted or gives you a different way of doing the same calculation.
January 7, 2010 at 6:19 pm
ed.mitchell
I am using SQL 2005
1. You have posted to a SQL Server 2008 Forum.
2. You have posted the definition of a single table - good
3. The sample...
January 7, 2010 at 4:54 pm
Viewing 15 posts - 2,206 through 2,220 (of 3,221 total)