Forum Replies Created

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

  • RE: column references in where

    Hi!

    Yes, in some cases it simplifies the code. It's probably more readable with CTE.

    But a performance issue could arise because this way there are actually two select statements.

    I guess it's...

  • RE: Rows to Columns

    Hi

    You could do something like this...

    Select all the countries and then use the EXECUTE Statement

    declare @countries varchar(200)

    declare @country varchar(20)

    declare @piv varchar(1000)

    set @countries = ''

    declare cur cursor for

    select country from...

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