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 Administration
 nested select

Author  Topic 

kristin_86
Starting Member

2 Posts

Posted - 2013-05-30 : 05:31:05
I have a problem with nested select. On the one hand, I have this code -

`SELECT DISTINCT eventattribute1 AS Subscribers,
eventattribute2 AS Imei,
eventattribute10 AS Country,
eventattribute13 AS service,
eventattribute22 AS zone
FROM rawcdr_gsm.mmd_tap_out partition(m201302)
WHERE eventattribute22 = 'EURO'
AND eventattribute13 = 'MC_PO_ROAM'
AND eventattribute14 != 'T'
AND event_cost != '0'
GROUP BY eventattribute1,
eventattribute2,
eventattribute10,
eventattribute13,
eventattribute22 `

And on the other hand, I have -

`SELECT Numtodsinterval(Sum(To_char(To_date(eventattribute3, 'HH24:MI:SS'),
'HH24') *
3600 +
To_char(
To_date(eventattribute3, 'HH24:MI:SS'),
'MI')
* 60 +
To_char(To_date(eventattribute3,
'HH24:MI:SS'), 'SS')), 'second') AS
SUMTOTAL
FROM rawcdr_gsm.mmd_tap_out partition(m201302) `

Can you help me to gather these two select. Thanks in advance :)

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-05-30 : 05:48:47
seems like you're on Oracle seeing functions like To_char

This is ms sql server forum
please post in Oracle forums like www.orafaq.com for Oracle related help

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

kristin_86
Starting Member

2 Posts

Posted - 2013-05-30 : 06:50:24
Thanks, i created the topic in www.orafaq.com.
Go to Top of Page
   

- Advertisement -