Viewing 11 posts - 31 through 41 (of 41 total)
You just have to be little careful while using any Split function as you are dealing with 2 delimiters here - comma and space
See this example
EDIT NOTE : My XML...
March 2, 2009 at 12:14 am
Try this
--select
;WITH CTE AS
(
SELECT *,ROW_NUMBER()OVER(PARTITION BY Ltel ORDER BY lstatus desc) AS SEQ FROM @list
)
SELECT *
FROM cte
WHERE LSTATUS =0
and seq>1
--delete
;WITH CTE AS
(
SELECT *,ROW_NUMBER()OVER(PARTITION BY Ltel ORDER BY lstatus desc) AS...
February 27, 2009 at 1:34 am
I guess it should be
(partition by projid order by commentdt DESC)
Lowell (2/25/2009)
select * from
(
select P.ProjId, X.Comment, X.CommentDt,row_number() over (PARTITION BY X.Comment ORDER BY P.ProjId) AS RW
FROM Proj P
INNER JOIN...
February 26, 2009 at 1:02 am
DECLARE @a varchar(10) -- declaration of variable
SET @a = DATEPART(YEAR,DATEADD(YEAR,0,'01/01/2009'))
DECLARE @SQL NVARCHAR(200)
SELECT @SQL = 'SELECT CASE WHEN 2009 = 2009 THEN 1
...
February 26, 2009 at 12:29 am
Going back to school
declare @MILI bigint
set @mili= 1*60*60*1000+2010
select @mili
,@Mili/(1000*60*60) as Hour
,(@Mili%(1000*60*60))/(1000*60)as Minutes
,((@Mili%(1000*60*60))%(1000*60))/1000 as Seconds
,((@Mili%(1000*60*60))%(1000*60))%1000 as MiliSecs
February 25, 2009 at 2:33 am
select 175*(power((95*0.011312),-1.154))*power(CONVERT(FLOAT,65),(-0.203)) as cal
February 24, 2009 at 4:28 am
I guess that won't work, instead use OR operator
SELECT *
FROM person
WHERE personname LIKE '%mar%'
OR personname LIKE '%jo%'
February 24, 2009 at 2:59 am
Using Sql Server Import/Export wizard you can easily import the data into sql server. You can also try Linked Server with MySQL - Linked server with MySQL
Or you can...
February 23, 2009 at 11:19 pm
See this example on adventureworks database
USE AdventureWorks
GO
SELECTfirstname
,LEFT (Firstname,1)AS First
,row_number()over(PARTITION BY LEFT (Firstname,1) ORDER BY Firstname) as Seq
,LEFT (Firstname,1)+RIGHT('00000'+CONVERT(VARCHAR(10),row_number()over(PARTITION BY LEFT (Firstname,1) ORDER BY Firstname)),5) newseq
FROM Person.Contact
order by Firstname
On similar...
February 23, 2009 at 10:56 pm
Construct your pivot query as following
select *
from
( select *
from dbo.getresults
) Main
PIVOT
(AVG([AVG]) for in
([Buffer Manager\Buffer cache hit ratio] ,[PhysicalDisk(_Total)\% Disk Time] ,[PhysicalDisk(_Total)\Current Disk Queue Length] ,[Processor(_Total)\% Processor...
February 23, 2009 at 9:25 pm
Viewing 11 posts - 31 through 41 (of 41 total)