------------------------------ > > ----------------------- > > (SELECT id FROM domains where name='abc.com'); > > gives a result of 124 > > > i am also able to use and get proper results for the following query: > > select * from domains where id=(SELECT id FROM domains where name='abc.com > '); > > > --------------------------------------------- > Now, > > select * db_users where db_id=(SELECT id FROM data_bases where > dom_id=(SELECT id FROM domains where name='abc.com')); > > Please correct me the syntax for the above command. I am trying to use the > result of one select query as a query string on another. > > > > Thanks >
On Fri, Sep 26, 2008 at 4:29 PM, Ananda Kumar <[EMAIL PROTECTED]> wrote: > what is the issue ur facing. > Any syntax error or something else. > > trying usin "IN" instead of "=" > > >> >> > ==============/> The error is : The query could not be executed, I tried with IN instead of = too. My guess is , double brackets is causing some syntax error in : select * db_users where db_id=(SELECT id FROM data_bases where dom_id=(SELECT id FROM domains where name='abc.com')); Please note: SELECT id FROM data_bases where dom_id=(SELECT id FROM domains where name=' abc.com') it works and give the id number, it seems I am not using the correct syntax for a )) ( double bracket ) in the above query. Please advise. Thanks