vote up 0 vote down
star

Hi,

I need help in writing a query in select list, Is this possible in TD. In Oracle we are able to do it. I have a requirement like this:

select col1, col2, Round((col2*100.0/**(select count(col4) from tableh group by col)),**999.9)
FROM (select col1,count(col2) 
      from tablea, tableb
      Where tablea.col1 = tableb.col1
      and tablea.col2 = tableb.col2
      group by col1)

Thanks in advance. TDHelp

flag
Can you try formatting your questions better by using the "code sample" button to mark embedded SQL code? Thanks. – Carlos A. Ibarra Jan 8 at 2:35
I was thinking the same thing. Questions are much easier to answer if the code sample provided is formatted properly. – Rob Paller Jan 9 at 14:22

1 Answer

vote up 1 vote down
check

Unlike Oracle, such querying is not supported in TD12 or older releases. There has been talk that it may show up in TD13 or TD13.1 Otherwise, you can use a CROSS JOIN to introduce the COUNT(col4) to the query as a whole.

link|flag
cross join worked. thank you so much – TDHELP Jan 14 at 3:26

Your Answer

Get an OpenID
or

Not the answer you're looking for? Browse other questions tagged or ask your own question.