Hi all, I am trying to create a flat file for a sap upload. The problem is this:
The flat file format has say 10 fields in it. The first 5 of those fields from the table will all be the same (for this query) and the flat file requires that the first row has all fields filled in, but subsequent rows have the first 5 blank.
I am trying to work out how to do this. I thought of some type of CASE using the rownum (old Oracle person) byt it seems that SQL server does not havea rownum.
I thought of a TOP to get the first row, unioned with the rest, but in the second part of the union I need to get rid of the first row to avoid duplicate entries.
Am a bit lost and help would be appreciated.
thanks
Andrew
The flat file format has say 10 fields in it. The first 5 of those fields from the table will all be the same (for this query) and the flat file requires that the first row has all fields filled in, but subsequent rows have the first 5 blank.
I am trying to work out how to do this. I thought of some type of CASE using the rownum (old Oracle person) byt it seems that SQL server does not havea rownum.
I thought of a TOP to get the first row, unioned with the rest, but in the second part of the union I need to get rid of the first row to avoid duplicate entries.
Am a bit lost and help would be appreciated.
thanks
Andrew