Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2003
    Location
    Rhodesia
    Posts
    28

    Unanswered: Temporary table question

    I have this table that is basically a replication of a raw text file which is pipe delimited.

    e.g. COLUMN1
    A|B|C|D|
    A|B|C|D|
    A|B|C|D|
    ...etc.

    I now want to create a temp table with new columns A, B, C and D from my raw table.
    Can someone pls help?
    thanks

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    why would you not use a load utility which would delimit the columns by the pipe character?
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Oct 2003
    Location
    Rhodesia
    Posts
    28
    Quote Originally Posted by r937
    why would you not use a load utility which would delimit the columns by the pipe character?
    That is because the raw file isnt standard, so I want to be able to import any raw file and by the delimiter assign columns.
    e.g. one file might have 1|2|3|4| and another a|b|c

    In the first case the temp table will have 4 columns and the second 3.

  4. #4
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    yes, but you can load each raw file into a separate table, yes?
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  5. #5
    Join Date
    Oct 2003
    Location
    Rhodesia
    Posts
    28
    Quote Originally Posted by r937
    yes, but you can load each raw file into a separate table, yes?
    Yes but I dont want to do that.
    Im writing 1 procedure for everything and all sorts of files.
    1 table for per procedure isnt optimal.

Posting Permissions

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