Grouping into a Text File

  • I have a table like below

    fld1 fld2 fld3 fld4

    123 abc

    123 def

    123 def

    456 xyz

    456 xyz

    789 ijk

    789 ijk

    I need a query so that , it can put in different text files the results as below

    Textfile1

    123 abc fld3value fld4value

    textfile2

    123 def fld3value fld4value

    123 def ....

    Textfile3

    456 xyz fld3value fld4value

    456 xyz....

    Etc…

    Thank you for the help

  • Not 100% sure what you're after here. I presume it's something a bit more complex than just

    select fld1, fld2, fld3, fld4

    from tbl1

    where fld1 = 123 and fld2 = 'abc' ?

    But from your question, I can't see what else you want. Is it the transfer to text file that you are having trouble with? Please provide a bit more detail.

    Regards

    Phil

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

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

You must be logged in to reply to this topic. Login to reply