Complicated SQL Query - TechRepublic
General discussion
September 24, 2003 at 07:55 AM
bgibilaro

Complicated SQL Query

by bgibilaro . Updated 22 years, 9 months ago

Hello,

I have to produce a report from a table that is extracted from a non-relational database system.

A sample of the table records would look like this:

file_no | ref_no | container_no
————————————–
123456 |ref321 | cont777
————————————–
123456 |ref456 | cont555
————————————–
123456 |ref456 | cont333

I need to generate a single recordset that looks like this:

file_no | ref_no | container_no
————————————–
123456 |ref321 | cont777
————————————–
|ref456 | cont555
————————————–
| | cont333

OR the data can be combined like this:

file_no | ref_no | container_no
————————————–
123456 |ref321 | cont777
|ref456 | cont555
| | cont333

Any help would be greatly appreciated. Thanks!

This discussion is locked

All Comments