SunQuest
           Oracle Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesOracle Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
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  
Old April 1st, 2004, 12:18 AM
YuLing YuLing is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Posts: 44 YuLing User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Send a message via ICQ to YuLing
Cool Display only once??

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 out

thanks

Reply With Quote
  #2  
Old April 1st, 2004, 08:01 AM
shafique shafique is offline
Senior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Canada
Posts: 305 shafique User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 45 m 20 sec
Reputation Power: 5
Just use the following SQL*Plus command:

SQL>break on loc_name

now run your query.

Reply With Quote
  #3  
Old April 1st, 2004, 06:38 PM
YuLing YuLing is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Posts: 44 YuLing User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Send a message via ICQ to YuLing
Question

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

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > Display only once??


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway