Viewing 15 posts - 1 through 15 (of 21 total)
I did a slight modification
select @xml = cast(( '') as xml)
SELECT N.value('.', 'nvarchar(max)')
so if there are tags in the string it handles them
July 1, 2009 at 3:07 pm
CASE is using the = comparison not the IS comparison needed to handle NULLS
the correct case would be
Select ID,Case When Date is Null Then GetDate() Else Date End From DateTimeCheck
April 6, 2008 at 10:23 am
I tend to convert my dates to the Day only portion so that i begin at the beginning of the 14th day as a starting point) for end of day,...
April 6, 2008 at 7:48 am
there is always the old standby
select 'insert into table values ( '+ isnull( '''' + stringscol + '''', 'null') +
', '...
March 23, 2008 at 7:20 pm
Steve Jones is wise you should listen to him.
RAID 5 is slow, RAID 1 is nice but a drive error results in an outage, RAID 10 is the best if...
March 23, 2008 at 9:36 am
I tend to move data into Access before loading SQL instead of Excel. I have had problems loading large data elements from Excel, but putting them into an Access Memo...
March 23, 2008 at 9:30 am
The stored procedure will not pull in the new changes while it is running. once it finishes you must re-run it.
March 23, 2008 at 9:24 am
delete from tablename where id in (3,7)
select value
into #tmp
from tablename
delete from tablemane
dbcc checkident( tablename, reseed, 0)
insert into tablename
select value
from #tmp
order by value
should work
Paul Ross
November 19, 2007 at 6:22 am
SELECT a.price, x.price
FROM tableA a
INNER JOIN
(SELECT TOP 1 ID, Price
FROM tableB
WHERE price <= @var
ORDER BY price desc
) x
on a.id = x.id
something like that? (give me more information and I...
November 19, 2007 at 5:19 am
the first thing i would check is to see if you were using N(types) for all your data that is in the the table definitions, in any stored procedures and...
November 18, 2007 at 10:29 pm
why no inner join?
select x.col1, x.col2, y.col3, y.col4
from TabA as x
inner join
TabB as Y
on x.col11 = y.coll11
where x.col11 = 'A'
November 18, 2007 at 10:20 pm
well... you could add 99999999(...) to the number value in the order by to make all number positive, that would be the simplest way.
Paul Ross
November 18, 2007 at 9:24 pm
you can cheat and create a hosts table
create table hosts( hostname varchar(50))
select hostname, count(*) as Hits
from hosts h
inner join webproxylog w
on w.Desthost like '%'+h.hostname
group by hostname
order by Hits desc
if you...
November 18, 2007 at 9:09 pm
did you try grouping by subject id and name, hiding the subject id group header and putting the subject id on the name group header line then put the description...
November 18, 2007 at 8:58 pm
you could try
delete from tablename where id in (3,7)
set identity_insert tablename on
declare @id int
set @id = 0
update table
set id = @id,
@id = @id+1
set identity_insert tablename off
Paul Ross
November 18, 2007 at 8:38 pm
Viewing 15 posts - 1 through 15 (of 21 total)