G
Guest
OK, I'm hoping I'll describe this right, but bear with me.
I have a table of values I need to generate a list from. This list will
have 2 or three lines per record.
As an example, here is the table layout
User, Score, Transaction, StartDate, EndDate, Pct, Comment
I need a query that will output as follows
Line1: Comment1
Line2: Score1, User1, StartDate1, EndDate1, Pct1
Line3: Comment2
Line4: Score2, User2, StartDate2, EndDate2, Pct2
etc. etc.
Basically, a query that will allow me to generate a flat file with 2 lines
per record.
I know this doesn't make sense as to why I would want such a monstrosity,
but it's actually going to generate a long long set of code, the Comment line
being the declaration of what's coming, the next line being the data.
For whatever reason, the system accepting this string won't accept it as a
single line of data.
I first tried making two tables, one having a primary key and comment line,
the 2nd having a primary key and the data line, but I can't figure out how to
put them together in a query to generate this layout.
Any ideas, or should I just go back to Excel? (There will be more than
65,000 lines when all is said and done, so Excel is not the ideal answer).
Thanks for anyone who takes the above challenge!
Rob
I have a table of values I need to generate a list from. This list will
have 2 or three lines per record.
As an example, here is the table layout
User, Score, Transaction, StartDate, EndDate, Pct, Comment
I need a query that will output as follows
Line1: Comment1
Line2: Score1, User1, StartDate1, EndDate1, Pct1
Line3: Comment2
Line4: Score2, User2, StartDate2, EndDate2, Pct2
etc. etc.
Basically, a query that will allow me to generate a flat file with 2 lines
per record.
I know this doesn't make sense as to why I would want such a monstrosity,
but it's actually going to generate a long long set of code, the Comment line
being the declaration of what's coming, the next line being the data.
For whatever reason, the system accepting this string won't accept it as a
single line of data.
I first tried making two tables, one having a primary key and comment line,
the 2nd having a primary key and the data line, but I can't figure out how to
put them together in a query to generate this layout.
Any ideas, or should I just go back to Excel? (There will be more than
65,000 lines when all is said and done, so Excel is not the ideal answer).
Thanks for anyone who takes the above challenge!
Rob