Viewing 15 posts - 4,411 through 4,425 (of 6,036 total)
What is the datatype of C?
April 18, 2007 at 4:29 am
So, 1st select consequent pairs of events.
Sorry, I'll not gonna use separated date-time values. Fix your table by combining them into single datetime column by yourself.
SELECT E1.pid, E1.EventTime as ArrivalTime,...
April 17, 2007 at 10:35 pm
So, you need to join every Arrival record to the next record (by time recorded) if it's Departure.
And you need to join every Departure record to previous record (by time...
April 17, 2007 at 9:13 pm
Your example does not make much sense to me.
Why are you trying to join departure to the first arrival, not to the last arrival before departure?
Your expected result shows that...
April 17, 2007 at 8:07 pm
In order to see my respond here you needed to refresh browser window.
Is there a way to get around of this or is this a limitation in Internet Browser?
What do...
April 17, 2007 at 6:54 pm
Why you expect this result:
idA valueA idB valueB
1 A...
April 17, 2007 at 5:53 pm
declare @records int, @tablename varchar(50), @sql nvarchar(4000)
SET @sql = 'SELECT @rec = count(*) from dbo.[' + @tablename + ']'
exec sp_executesql @sql, N'@rec int OUTPUT', @rec = @records OUTPUT
April 17, 2007 at 3:52 pm
Faye, there is no "IIf" in T-SQL. It's just another language with other commands and operators.
Replacement for IIf you may find in the 1st reply of this topic.
April 16, 2007 at 11:27 pm
Empty string gonna be '''''', not ''
April 16, 2007 at 3:13 pm
And old QA does it every time.
Automatic tools cannot predict hat kind of names you will use for your objects. So, when it generates scripts it must not give any...
April 16, 2007 at 3:12 pm
ISNULL([Employed] /NULLIF([Employeable], 0), @ValueToIndicateDividingByZero)
April 16, 2007 at 3:07 pm
SELECT @sql = 'a.[FirstName] + '' '' + a.[LastName] AS FullName,
...
April 16, 2007 at 3:05 pm
Sandeep, if it was not your homework you could explain what do you need it for.
It does not look like real life task, it's more like exercise from a schoolbook.
April 15, 2007 at 11:11 pm
Select distinct tacking number in derived table and join it back to source table by ID.
April 15, 2007 at 8:57 pm
Freaky function, really.
Don't see any point of doing this.
But if there is some hidden magic behind you can do it this way:
CREATE FUNCTION [dbo].[GetNextValue] (@name varchar(30) )
RETURNS int AS
BEGIN
declare @value...
April 15, 2007 at 2:39 pm
Viewing 15 posts - 4,411 through 4,425 (of 6,036 total)