Home » SQL & PL/SQL » SQL & PL/SQL » Regarding Grouping of data (Oracle,10g,Windows XP)
Regarding Grouping of data [message #365255] Thu, 11 December 2008 04:18 Go to next message
fazalmca
Messages: 6
Registered: March 2006
Location: u.a.e
Junior Member
Hi,
I ve the data in table like

employee type
101 TY1
102 TY1
103 TY2
104 TY3
105 TY3
106 TY4
107 ty4

I want the output as two groups in count like
Local(TY1,TY2) - > 3
Expat(TY3,TY4) - > 4

how i will group these 4 types into 2 groups..

please assist..

Regards,
Haq.


Re: Regarding Grouping of data [message #365258 is a reply to message #365255] Thu, 11 December 2008 04:20 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
Stop duplicating your message please.
Re: Regarding Grouping of data [message #365263 is a reply to message #365258] Thu, 11 December 2008 04:31 Go to previous messageGo to next message
fazalmca
Messages: 6
Registered: March 2006
Location: u.a.e
Junior Member
sorry, it happens by mistake


Re: Regarding Grouping of data [message #365275 is a reply to message #365255] Thu, 11 December 2008 05:11 Go to previous message
Michel Cadot
Messages: 64132
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Please read OraFAQ Forum Guide, especially "How to format your post?" section.
Align the columns in result.
Use the "Preview Message" button to verify.
Also always post your Oracle version (4 decimals).

Post a test case: create table and insert statements along with the result you want with these data.

Explain why these groups and not other ones. What happens if I have 'MMA4' and 'BBB6' are they in the same group?

Regards
Michel
Previous Topic: Creation of view with clob column in select and group by clause (merged 3)
Next Topic: Row Source Generator
Goto Forum:
  


Current Time: Thu Dec 08 00:25:13 CST 2016

Total time taken to generate the page: 0.08901 seconds