Showing posts with label subqueries. Show all posts
Showing posts with label subqueries. Show all posts

Thursday, March 29, 2012

count of subqueries plz..

how to get count(*) of a subquery?
something like

select count(*) from
(select F1,F2,F3 from MyTable)

*above doesn't work.

i cannot change, that subquery, it's coming from somewhere else.

Thank You..

Add table alias:

select count(*) from (select F1,F2,F3 from MyTable) as T

Friday, February 17, 2012

could anybody explain to me why sqldatadpater does not allow subqueries?

Dear experts,

Recently i got an error msg looks like this: you cannot use subqueries within a sqldatadpter except the subquery is introduced with EXISTS.

Well, actually i was using IN.

I know I can revise my query sting to use INNER JOIN or such stuff just to remove the nested queries. But i'm realllllly curious why it's not allowed??

Really appreciate it if some expert can tell me.

Thanks in advance

Hi Paul,

Can you post the source code here? I have used subqueries (using IN) and they have worked for me.

Girish