Home » SQL & PL/SQL » SQL & PL/SQL » SQL Query - help needed (Oracle 9i)
SQL Query - help needed [message #335958] Thu, 24 July 2008 04:52 Go to next message
close2jay
Messages: 1
Registered: July 2008
Junior Member
Hi,

In my table I am having data like below:

Job ename
CLERK A
SALES C
CLERK B
CLERK D
SALES E
SALES F

In the output, i want to print JOB column only once.
I am new to SQL so please help me on this.

Expected Output:
=================

Job ename
CLERK A
B
D
SALES C
E
F


Thanks,


Re: SQL Query - help needed [message #335973 is a reply to message #335958] Thu, 24 July 2008 05:12 Go to previous message
Michel Cadot
Messages: 68737
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
If you use SQL*Plus, use BREAK command otherwise search on the forum there are solutions.

Also please read OraFAQ Forum Guide, especially "How to format your post?" section.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code (See SQL Formatter) and align the columns in result.
Use the "Preview Message" button to verify.
Also always post your Oracle version (4 decimals).

Regards
Michel
Previous Topic: Flag field based on max(date)
Next Topic: Invalid Objects
Goto Forum:
  


Current Time: Mon Feb 17 05:58:58 CST 2025