Forum Replies Created

Viewing 15 posts - 1 through 15 (of 21 total)

  • RE: Split string using XML

    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

  • RE: DateTime in Case

    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

  • RE: Getting my seudo code to T-SQL - Need some help

    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,...

  • RE: Data Export For Mainframe

    there is always the old standby

    select 'insert into table values ( '+ isnull( '''' + stringscol + '''', 'null') +

    ', '...

  • RE: Disk Subsystem

    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...

  • RE: Is it possible Import Data from excel file to SQL table using formated excel file on SQL 2005

    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...

  • RE: Alter SP in 2000 while executing

    The stored procedure will not pull in the new changes while it is running. once it finishes you must re-run it.

  • RE: Rearrange Identity values

    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

  • RE: JOIN on table with TOP 1

    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...

  • RE: function for TSQL : OEMtoANSI

    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...

  • RE: Cartesian product!

    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'

  • RE: Case statement alternative ? Columns containing different data types

    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

  • RE: Query Help

    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...

  • RE: Reporting Services: how to create a form like report?

    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...

  • RE: Rearrange Identity values

    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

Viewing 15 posts - 1 through 15 (of 21 total)