Forum Replies Created

Viewing 15 posts - 7,186 through 7,200 (of 10,144 total)

  • RE: Today's Random Word!

    Carmen Electra

  • RE: SQL 2005 Pivot Help - Rows to Column

    renvilo (10/14/2010)


    ...If so can we get them out of the way or not?...

    Try filtering them out in your WHERE clause. Something like...

    WHERE query NOT IN ('Unwanted value', 'Another unwanted value')

    Alternatively,...

  • RE: Insert into table using function.

    Can you write a SELECT which retrieves only the rows which you want to insert into the new table?

  • RE: SQL 2005 Pivot Help - Rows to Column

    renvilo (10/14/2010)


    Something is strange 🙁

    I test your code and works 100%

    This is what I have:

    SELECT top 1000

    SourceID,

    ...

  • RE: SQL 2005 Pivot Help - Rows to Column

    I don't see a problem.

    -- set up some sample data

    DROP TABLE #Sample

    CREATE TABLE #Sample (SourceID CHAR(3), VisitID VARCHAR(15), Query VARCHAR(10), Response VARCHAR(4))

    INSERT INTO #Sample (SourceID, VisitID, Query, Response)

    SELECT 'BLA', 'V1002900877',...

  • RE: SQL 2005 Pivot Help - Rows to Column

    renvilo (10/14/2010)


    ...I tried your code but not working...

    What's the error message?

  • RE: SQL 2005 Pivot Help - Rows to Column

    Read the articles Wayne recommended. You will gain a comprehensive understanding of how this works:

    DROP TABLE #Sample

    CREATE TABLE #Sample (SourceID CHAR(3), VisitID INT, Query VARCHAR(10), Response VARCHAR(4))

    INSERT INTO #Sample (SourceID,...

  • RE: Insert into table using function.

    You could use the OUTPUT clause, returning the new PK and an old PK for the backlink. This would allow you to do all of the inserts in one go,...

  • RE: Are the posted questions getting worse?

    GilaMonster (10/14/2010)


    ALZDBA (10/14/2010)


    GilaMonster (10/14/2010)


    ... *hopeful* *optimistic* ...

    DBA-part taking over :w00t:

    Developer-side. My DBA side is extraordinarily pessimistic

    You can say that again.

  • RE: Are the posted questions getting worse?

    The Dixie Flatline (10/13/2010)


    I duuno how ,pls any1 explane

    Gail, this is a quote from that link. There is just something I always find curious about posts like these....

  • RE: Today's Random Word!

    crookj (10/13/2010)


    Chris Morris-439714 (10/13/2010)


    crookj (10/13/2010)


    WOTD - Turbo-Bungee

    My 3-year old Granddaughter went on it at the carnival. She was going over 2 stories high. She had a GREAT Time!

    Joe

    Joe, is this...

  • RE: Using a stored procedure to select columns?

    Paul White NZ (10/13/2010)


    Chris Morris-439714 (10/13/2010)


    To a VARCHAR(10)? An error 😎

    Don't make me come over there, Chris 😛

    Tell me - not sure I can afford all the beers I must...

  • RE: Today's Random Word!

    crookj (10/13/2010)


    WOTD - Turbo-Bungee

    My 3-year old Granddaughter went on it at the carnival. She was going over 2 stories high. She had a GREAT Time!

    Joe

    Joe, is this the thing that...

  • RE: How to use PIVOT in this case?

    Heh you beat me to it Wayne, and yours is nicer too.

    SELECT d.ID,

    speak_flag = REPLACE(iTVF1.RowsToString + '$', ',$', ''),

    read_flag = REPLACE(iTVF1.RowsToString + '$', ',$', ''),

    ia_flag = REPLACE(iTVF3.RowsToString +...

  • RE: Using a stored procedure to select columns?

    Paul White NZ (10/13/2010)


    sivaj2k (10/13/2010)


    Yes, definetly. You have to use dynamic query. First frame a query using the variables supplied to the procedure. Store query to a variable and then...

Viewing 15 posts - 7,186 through 7,200 (of 10,144 total)