|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today! |
|
#1
|
|||
|
|||
|
Hi...need help again
This time is about this... Say that i have this table my_table1 emp_name loc_name if i have 100 records in my_table1 but for the column loc_name...say that i only have 3 different name for loc_name...example like 'City1', 'City2', 'City3' if i type in code like this select loc_name from my_table1; it will display 100 times of repeated record with City1, City2, City3..and the problem is i only want it to display just 3 times only with just 1 time for each loc_name that is different in my_table1...i just want to know which city the table have, i do not need it to be repeated 100 times with the same city i hope u guys can understand wat i mean and help me outthanks |
|
#2
|
|||
|
|||
|
Just use the following SQL*Plus command:
SQL>break on loc_name now run your query. |
|
#3
|
|||
|
|||
|
thanks for ur help....
i try out like below break on loc_name select loc_name from my_table1 it kindna do wat i want but i have this problem...i m not sure whether this can be done or not but if it can be done can you help me out... like i said before i have 100 records in the table and the result after i run the code is that i get a lot of blank spacing in between the different city name in loc_name...and it also repeat the name for another time when divided into new display like this... loc_name ----------------- City1 City2 loc_name ----------------- City1 City3 City2 loc_name ------------------- City3 City1 . . . . and so on until it finish at a 100 times with a lot of blank spacing in between data and repeating some city name every time it breks into new display...is there a way where it wont have so much spacing just display something like this loc_name ----------- City1 City2 City3 |
![]() |
| Viewing: Dev Shed Forums > Databases > Oracle Development > Display only once?? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|