Viewing 15 posts - 17,716 through 17,730 (of 18,926 total)
I agree that it returns the same thing.. but I can't find any reference of it in the books online nor yahoo... So I guess it's an undocumented command...
May 19, 2005 at 2:33 pm
This means that the data is incorrectly formated in the column.
Can you run this query and send me the results?
Select * from dbo.YourTable where IsDate(VarcharDateCol) = 0
BTW, those are the...
May 19, 2005 at 1:59 pm
Actually now() is not a standard sql function.. are you sure that now is note a view or a user defined function that returns the getdate() value??
May 19, 2005 at 1:57 pm
Actually what Farrell proposed is the same solution than mine with an older syntaxe, if you don't specify a join in a query with multiple tables, then a cross join...
May 19, 2005 at 1:55 pm
first problem :
move the 2nd to last parenthesis inside the last quote.
2nd you can set the local variable with the exec statement, you'll have to lear how to use...
May 19, 2005 at 1:53 pm
You mean something like this?
Select O.name, dtQuarters.DateStart, dtQuarters.DateEnd from dbo.SysObjects O cross join
(
Select '2005/01/01' as DateStart, '2005/03/31' as DateEnd
union all
Select '2005/04/01' as DateStart, '2005/06/30' as DateEnd
union all
Select '2005/07/01' as DateStart,...
May 19, 2005 at 1:35 pm
Is the date kept in a date column a varchar column?
If varchar :
Select convert(datetime, yourcolumn) as DateCol from dbo.YourTable.
May 19, 2005 at 1:30 pm
This can clear up the /5 thing :
Select distinct number, number/5 as num1, (number - 1)/5 as num2 from master.dbo.spt_values where number between 0 and 999 order by number
As...
May 19, 2005 at 1:17 pm
Nice little option there... I see how this could be usefull when doing a presentation on a big screen. But I still preffer seeing both the queries and the...
May 19, 2005 at 12:47 pm
You're not bothering anyone... you're not the first one to wonder how to do this... and hopefully it'll help somebody else in the future.
May 19, 2005 at 12:44 pm
Actually I've always put goes in between the set statements, can you try without 'em and tell me if it works??
May 19, 2005 at 12:36 pm
SET ANSI_NULLS ON
GO
SET ANSI_WARNINGS ON
GO
Create Procedure MyProc AS
SELECT * FROM SERVER2.CUSTOMERS.DBO.TABLE1
GO
May 19, 2005 at 12:35 pm
Viewing 15 posts - 17,716 through 17,730 (of 18,926 total)