Viewing 15 posts - 226 through 240 (of 462 total)
Is this what you want?
CREATE TABLE #t(AREA varchar(10))
INSERT INTO #t VALUES('AREA1')
INSERT INTO #t VALUES('AREA2')
INSERT INTO #t VALUES('AREA3')
DECLARE @VAR1 as varchar(10)
SELECT TOP 1 @VAR1 = AREA FROM #t
PRINT @var1
November 5, 2009 at 4:15 am
you have an advantae with this that, if any duplicates are there, its removed.
Create table #t(ID int, Name varchar(10))
INSERT INTO #t VALUES (1, 'abc')
INSERT INTO #t VALUES (2, 'def')
INSERT INTO...
November 5, 2009 at 3:09 am
eddy-644184 (11/4/2009)
Tnx a lot,
Thats idd what i wanted to get as result.
I really need to learn the Partition By statement, it is so powerfull when you need stuff...
November 4, 2009 at 7:38 am
I changed the name from your table name to #t, see if this is what you want!
SELECT * FROM
(Select *, Row_number() OVER (partition by SRV_ID, DSP_DiskNaam
ORDER BY DSP_Datum...
November 4, 2009 at 6:43 am
You have to be clear with your test data and expected result. It was very vague information that you are giving! Anyway, if you need the latest status based...
November 4, 2009 at 4:01 am
you should handle the case when there is no dept for an employee.
Just to make this work, in your d-sql replace @dept with
ISNULL(@dept, '')
your print would work!
November 4, 2009 at 3:48 am
Select convert(varchar(11),(convert(datetime, '01.12.2005', 104)), 113)
November 4, 2009 at 1:40 am
See if this helps, i am using max function now. You might need to use some concatenation function to get all the three values. Thats next step. I cant think...
November 4, 2009 at 1:29 am
pramod_yg (11/4/2009)
it is interpreting it as 12 Jan 2009. i want it to be 12 Jan 2009.Pramod
both are same right?
November 4, 2009 at 12:51 am
aravind.s (11/3/2009)
November 4, 2009 at 12:32 am
I see what you are trying to do. Along with pivot u got to expand the number of days between start date and enddate and get your values for that....
November 3, 2009 at 7:46 am
BOL,
On the Instance Name page, select a default or named instance for
your installation. If a default or named instance is already installed, and
you select the existing instance...
November 3, 2009 at 3:46 am
Have you had a chance to look at the post by lowell? I thought it solves your problem!
November 3, 2009 at 12:24 am
Run command - > services.msc -> look for SQL Server. If you have 'MSSQLSERVER' within the parenthesis after sql server then its your default instance. something like this, SQL Server...
November 3, 2009 at 12:05 am
Viewing 15 posts - 226 through 240 (of 462 total)