+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 19

select from (select)

  1. select from (select)

    Hi All,

    I am trying to run an sql statement which is like select from (select)
    statement.This sql
    query works fine in oracle database & throws an error in informix.Is
    there any alternative
    way i which this sql statement can be run.Any help is highly
    appretiated.

    Thanks in Advance.

    Regards
    Rakesh.


  2. Re: select from (select)

    I tried a normal select query
    select col_A, (select distinct 1 from Tab_A) from Tab_A
    its working fine on Informix,
    what sort of query u have can u post it on the group..



    On 16 Jul 2006 21:58:36 -0700, rakesh_sa@yahoo.com wrote:
    > Hi All,
    >
    > I am trying to run an sql statement which is like select from (select)
    > statement.This sql
    > query works fine in oracle database & throws an error in informix.Is
    > there any alternative
    > way i which this sql statement can be run.Any help is highly
    > appretiated.
    >
    > Thanks in Advance.
    >
    > Regards
    > Rakesh.
    >
    > _______________________________________________
    > Informix-list mailing list
    > Informix-list@iiug.org
    > http://www.iiug.org/mailman/listinfo/informix-list
    >



    --
    Regards,
    Prateek Jain

  3. Re: select from (select)

    I tried a normal select query and its working fine on informix
    PFB the query
    select Col_A, (select distinct 1 from TAB_A) from TAB_A

    Can u post ur query ???.




    On 16 Jul 2006 21:58:36 -0700, rakesh_sa@yahoo.com wrote:
    > Hi All,
    >
    > I am trying to run an sql statement which is like select from (select)
    > statement.This sql
    > query works fine in oracle database & throws an error in informix.Is
    > there any alternative
    > way i which this sql statement can be run.Any help is highly
    > appretiated.
    >
    > Thanks in Advance.
    >
    > Regards
    > Rakesh.
    >
    > _______________________________________________
    > Informix-list mailing list
    > Informix-list@iiug.org
    > http://www.iiug.org/mailman/listinfo/informix-list
    >



    --
    Regards,
    Prateek Jain

  4. Re: select from (select)

    Hi Prateek,

    Please see to the query mentioned below.This query works fine in oracle
    & not in informix.
    Any hints highly appretiated.

    select a.col1 , b.col2 from
    (select column1 col1 from table1) a,
    (select column2 col2 from table2) b,
    where a.col1 = b.col2

    Thanks
    Rakesh.


    Prateek Jain wrote:

    > I tried a normal select query
    > select col_A, (select distinct 1 from Tab_A) from Tab_A
    > its working fine on Informix,
    > what sort of query u have can u post it on the group..
    >
    >
    >
    > On 16 Jul 2006 21:58:36 -0700, rakesh_sa@yahoo.com wrote:
    > > Hi All,
    > >
    > > I am trying to run an sql statement which is like select from (select)
    > > statement.This sql
    > > query works fine in oracle database & throws an error in informix.Is
    > > there any alternative
    > > way i which this sql statement can be run.Any help is highly
    > > appretiated.
    > >
    > > Thanks in Advance.
    > >
    > > Regards
    > > Rakesh.
    > >
    > > _______________________________________________
    > > Informix-list mailing list
    > > Informix-list@iiug.org
    > > http://www.iiug.org/mailman/listinfo/informix-list
    > >

    >
    >
    > --
    > Regards,
    > Prateek Jain



  5. Re: select from (select)

    On 16 Jul 2006 21:58:36 -0700, rakesh_sa@yahoo.com
    wrote:

    > I am trying to run an sql statement which is like select from (select)
    > statement.This sql query works fine in oracle database & throws an error
    > in informix.



    Yes - a reasonably well-known problem.

    Is there any alternative
    > way i which this sql statement can be run.Any help is highly
    > appretiated.
    >


    Yes, but it isn't pretty.

    SELECT ... FROM TABLE(MULTISET(SELECT What, You, Wanted FROM WhereEver)),
    ....

    --
    Jonathan Leffler #include
    Email: jleffler@earthlink.net, jleffler@us.ibm.com
    Guardian of DBD::Informix v2005.02 -- http://dbi.perl.org/


  6. Re: select from (select)

    Jonathan,

    Thanks a lot .Query is working fine . Could you let me know on how to
    pass multiple columns in select clause which are present in different
    tables.

    Rakesh.


    Jonathan Leffler wrote:
    > On 16 Jul 2006 21:58:36 -0700, rakesh_sa@yahoo.com
    > wrote:
    >
    > > I am trying to run an sql statement which is like select from (select)
    > > statement.This sql query works fine in oracle database & throws an error
    > > in informix.

    >
    >
    > Yes - a reasonably well-known problem.
    >
    > Is there any alternative
    > > way i which this sql statement can be run.Any help is highly
    > > appretiated.
    > >

    >
    > Yes, but it isn't pretty.
    >
    > SELECT ... FROM TABLE(MULTISET(SELECT What, You, Wanted FROM WhereEver)),
    > ...
    >
    > --
    > Jonathan Leffler #include
    > Email: jleffler@earthlink.net, jleffler@us.ibm.com
    > Guardian of DBD::Informix v2005.02 -- http://dbi.perl.org/
    >
    > ------=_Part_28452_31382959.1153120413327
    > Content-Type: text/html; charset=ISO-8859-1
    > X-Google-AttachSize: 1406
    >
    >
    On 16 Jul 2006 21:58:36 -0700, rakesh_sa@yahoo.com <rakesh_sa@yahoo.com
    > > wrote:

    I am trying to run an sql statement which is like select from (select)
    >
    statement.This sql query works fine in oracle database & throws an error in informix.

    Yes - a reasonably well-known problem.


    > Is there any alternative
    way i which this sql statement can be run.Any help is highly
    appretiated.

    Yes, but it isn't pretty.

    SELECT ... FROM TABLE(MULTISET(SELECT What, You, Wanted FROM WhereEver)), ...
    >

    --
    Jonathan Leffler                   #include <disclaimer.h>
    Email: jleffler@earthlink.net, jleffler@us.ibm.com
    >

    Guardian of DBD::Informix v2005.02 -- http://dbi.perl.org/
    >
    > ------=_Part_28452_31382959.1153120413327--



  7. Re: select from (select)

    > Thanks a lot .Query is working fine . Could you let me know on how to
    > pass multiple columns in select clause which are present in different
    > tables.


    You can use the "AS" clause to name fields(as always), both SELECT
    statements are full-fedeged statements.

    > > > I am trying to run an sql statement which is like select from (select)
    > > > statement.This sql query works fine in oracle database & throws an error
    > > > in informix.

    > > Yes - a reasonably well-known problem.
    > > Is there any alternative
    > > > way i which this sql statement can be run.Any help is highly
    > > > appretiated.

    > > Yes, but it isn't pretty.
    > > SELECT ... FROM TABLE(MULTISET(SELECT What, You, Wanted FROM WhereEver)),




  8. Re: select from (select)

    Hi Adam,

    Could you give me some example on the same . I tried using the as
    clause too but getting error. FYI , i need to display data from various
    columns which are from different tables.

    Thanks for all your help.

    Rakesh.

    Adam Tauno Williams wrote:
    > > Thanks a lot .Query is working fine . Could you let me know on how to
    > > pass multiple columns in select clause which are present in different
    > > tables.

    >
    > You can use the "AS" clause to name fields(as always), both SELECT
    > statements are full-fedeged statements.
    >
    > > > > I am trying to run an sql statement which is like select from (select)
    > > > > statement.This sql query works fine in oracle database & throws an error
    > > > > in informix.
    > > > Yes - a reasonably well-known problem.
    > > > Is there any alternative
    > > > > way i which this sql statement can be run.Any help is highly
    > > > > appretiated.
    > > > Yes, but it isn't pretty.
    > > > SELECT ... FROM TABLE(MULTISET(SELECT What, You, Wanted FROM WhereEver)),



  9. Re: select from (select)

    Adam,

    Also do let me know the Syntax of MULTISET . Can i be able to use
    multiple MULTISET in a
    single query.

    Thanks
    Rakesh.


    rakesh_sa@yahoo.com wrote:
    > Hi Adam,
    >
    > Could you give me some example on the same . I tried using the as
    > clause too but getting error. FYI , i need to display data from various
    > columns which are from different tables.
    >
    > Thanks for all your help.
    >
    > Rakesh.
    >
    > Adam Tauno Williams wrote:
    > > > Thanks a lot .Query is working fine . Could you let me know on how to
    > > > pass multiple columns in select clause which are present in different
    > > > tables.

    > >
    > > You can use the "AS" clause to name fields(as always), both SELECT
    > > statements are full-fedeged statements.
    > >
    > > > > > I am trying to run an sql statement which is like select from (select)
    > > > > > statement.This sql query works fine in oracle database & throws an error
    > > > > > in informix.
    > > > > Yes - a reasonably well-known problem.
    > > > > Is there any alternative
    > > > > > way i which this sql statement can be run.Any help is highly
    > > > > > appretiated.
    > > > > Yes, but it isn't pretty.
    > > > > SELECT ... FROM TABLE(MULTISET(SELECT What, You, Wanted FROM WhereEver)),



  10. Re: select from (select)


    > Could you give me some example on the same . I tried using the as
    > clause too but getting error. FYI , i need to display data from various
    > columns which are from different tables.


    Perhaps you aren't explaining yourself well. What does it matter that
    the data is from seperate tables? You just do a join.

    SELECT *
    FROM TABLE
    (MULTISET(
    SELECT equipment_id::INT AS equipment_id,
    oe_oem_desc AS oem_description
    FROM equipment_master em, oemr om
    WHERE em.oem_code = om.oe_oem_code)
    )

    > Adam Tauno Williams wrote:
    > > > Thanks a lot .Query is working fine . Could you let me know on how to
    > > > pass multiple columns in select clause which are present in different
    > > > tables.

    > > You can use the "AS" clause to name fields(as always), both SELECT
    > > statements are full-fedeged statements.
    > > > > > I am trying to run an sql statement which is like select from (select)
    > > > > > statement.This sql query works fine in oracle database & throws an error
    > > > > > in informix.
    > > > > Yes - a reasonably well-known problem.
    > > > > Is there any alternative
    > > > > > way i which this sql statement can be run.Any help is highly
    > > > > > appretiated.
    > > > > Yes, but it isn't pretty.
    > > > > SELECT ... FROM TABLE(MULTISET(SELECT What, You, Wanted FROM WhereEver)),

    >
    > _______________________________________________
    > Informix-list mailing list
    > Informix-list@iiug.org
    > http://www.iiug.org/mailman/listinfo/informix-list



+ Reply to Thread
Page 1 of 2 1 2 LastLast