Forum Replies Created

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

  • RE: Need to isolate string portion

    @test-2='Barton STREET'

    select ltrim(rtrim(reverse(left(reverse(@test),charindex(' ',reverse(@test))))))

    here @test-2 is your field.

    I just wrote the logic. You can modify the result accordingly.

    note: this logic works even if you have space...

  • RE: Returning a Cursor from a SP

    You can create a Temp table (as per your result set) and store the result from cusror into temp table. Select from temp table.

  • RE: concatenate problems

    Another way is

    SELECT

    CASE WHEN col2 IS NULL THEN col1

    ELSE col1+ ', ' +col2 END

    FROM ....

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