Viewing 15 posts - 17,716 through 17,730 (of 18,923 total)
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
what's the tabbed mode?? I've already seen the wave option but I never used it.
May 19, 2005 at 12:34 pm
Quick math from sql server :
0 / 5 = 0
1 / 5 = 0
2 / 5 = 0
3 / 5 = 0
4 / 5 = 0
Select avg(temp) as AvgTemp,...
May 19, 2005 at 12:29 pm
Maybe you were sleepwalking or sleeptyping... I doubt that this could be set using a tsql command so I must assume it was done by hand... Can't tell who...
May 19, 2005 at 12:23 pm
Viewing 15 posts - 17,716 through 17,730 (of 18,923 total)