sql - How do I remove repeated column values from report -
from this:
hotel type room guest ------------------------- ------ ---- ----------------------------------------- --------- --------- university inn & suites double 101 george brown 11-sep-10 14-sep-10 university inn & suites double 101 george brown 11-oct-10 13-oct-10 university inn & suites double 102 university inn & suites double 103 university inn & suites double 104 university inn & suites double 105 university inn & suites family 106 george brooks 22-sep-10 27-sep-10 university inn & suites family 107 university inn & suites single 201 sandra williams 15-sep-10 19-sep-10 university inn & suites single 201 liz armstrong 16-sep-10 18-sep-10 university inn & suites single 201 craig harper 19-sep-10 22-sep-10 university inn & suites single 202 roger harris 03-sep-10 10-sep-10 university inn & suites single 202 tonya harris 23-sep-10 27-sep-10 university inn & suites single 203 university inn & suites single 204 university inn & suites single 205
to this
hotel type room guest ------------------------- ------ ---- ----------------------------------------- --------- --------- university inn & suites double 101 george brown 11-sep-10 14-sep-10 george brown 11-oct-10 13-oct-10 102 103 104 105 family 106 george brooks 22-sep-10 27-sep-10 107 single 201 sandra williams 15-sep-10 19-sep-10 201 liz armstrong 16-sep-10 18-sep-10 craig harper 19-sep-10 22-sep-10 202 roger harris 03-sep-10 10-sep-10 tonya harris 23-sep-10 27-sep-10 203 204 205
is structure of table showing (or) result of report?
my guess is result of sqlplus report. if case, , want hotel name appear once (until changes), can specify
break on hotel; select hotel, type, room_guest hotels order hotel;
to achieve desired result.
if structure, cannot delete column values first row. (in fact, there nothing first row far database concerned). if trying eliminate duplicate data, normalizing table.
http://en.wikipedia.org/wiki/database_normalization\
please post table description , tool (if any) you'd appropriate answers case.
Comments
Post a Comment