Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Unique ones and one random record

Author  Topic 

Mortos
Starting Member

2 Posts

Posted - 2012-09-03 : 04:40:57
Hello,

I want to make the following select on Oracle PL/SQL:

I have two columns ServedIMSI, Servicekey. There are many servicekey dublicates, so I want to select only the unique ones and one random record for ServedIMSI that matches on the number of the servicekey . Is there a way to do that ?

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2012-09-03 : 04:47:29
for Oracle questions, try dbforums.com

SQLTeam is on MS SQL Server



KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

Mortos
Starting Member

2 Posts

Posted - 2012-09-03 : 05:03:17
I found a sollution

SELECT ServiceKey, min(ServedIMSI) FROM <>
GROUP BY ServiceKey

Sorry and thank You
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-09-03 : 15:20:06
quote:
Originally posted by Mortos

I found a sollution

SELECT ServiceKey, min(ServedIMSI) FROM <>
GROUP BY ServiceKey

Sorry and thank You


works so long as you dont have to select third column too

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -