Forum Replies Created

Viewing 9 posts - 1 through 9 (of 9 total)

  • RE: Why is my query wrong?

    It took some effort and with some help from colleague I came to this fix:

    BEGIN TRAN

    UPDATE TABLENAME

    SET lineno=

    (case when len(lineno -12) = 1 then ' '+cast((cast(lineno as int)...

  • RE: Why is my query wrong?

    Thanks, but unfortunately that does change the output. 'Funny' thing is that when I run the query

    update tablename set lineno=lineno- 12, sysmodified=getdate()

    where 1=1

    and entry=545554

    and type='X'

    and lineno=568...

  • RE: Why is my query wrong?

    Hi Phil,

    Thanks for your reply. The datatype of the field lineno is char(4), null

    KR

  • RE: Why doesn't the substring work?

    Thanks again. Learned a lot.

  • RE: Why doesn't the substring work?

    Thank you both very much. Since this issue occurs after migrating from sql 2000 to sql 2008 I suspect the performance issues which were adressed by Microsoft in SQL 2008...

  • RE: Why doesn't the substring work?

    Both (the orignal query and the new proposed query) gave 57 rows.

  • RE: Why doesn't the substring work?

    Sorry, bout that. I checked it now against the actual data. The orignal query only gave back valid data (only numbers). The new proposed query gave the same by first...

  • RE: Why doesn't the substring work?

    Hi,

    I followed your instructions. The results are:

    Original subquery gives: 69000

    Proposed query containing cross apply: 69000,Int.nr.TXT: 69000

    So the original query works fine as long at is not part as a...

  • RE: Why doesn't the substring work?

    Hi, Thank you for your response. However the goal is to only retrieve those lines starting with Int.nr.TXT:. I checked the data, all lines have a valid integer after...

Viewing 9 posts - 1 through 9 (of 9 total)