Results 1 to 3 of 3

Thread: SQL statement

  1. #1
    Join Date
    Apr 2009
    Posts
    85

    Unanswered: SQL statement

    Hello, I periodically import a table with the following pseudo structure.

    F1 F2 F3 F4 N1 N2 N3 F5 F6

    and I need

    N1 F1 F2 F3 F4 F5 F6
    N2 F1 F2 F3 F4 F5 F6
    N3 F1 F2 F3 F4 F5 F6

    there is no p.k, would this be a series of sql statements or........

    I feel this should be simple but I am drawing a blank, any help is appreciated

  2. #2
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    How about

    SELECT N1, F1, F2...
    FROM TableName
    UNION ALL
    SELECT N2, F1, F2...
    FROM TableName
    UNION ALL
    SELECT N3, F1, F2...
    FROM TableName
    Paul

  3. #3
    Join Date
    Apr 2009
    Posts
    85
    Thank you, pbaldy

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •