two queries in one

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Gordan

    two queries in one

    can the following be done in an access DB:
    I have a query like this "SELECT fld1, fld2, fld3 FROM table WHERE something
    GROUP BY fld1"
    Usually I just echo that result on screen but now I would have to store it
    to another (new) table
    Can it be done via a query?
    I know how to do it by looping through results and doing a INSERT for every
    line but I would like to do it via a query

    thanks
    Gordan


  • Urs Weder

    #2
    Re: two queries in one

    Gordan wrote:[color=blue]
    > can the following be done in an access DB:
    > I have a query like this "SELECT fld1, fld2, fld3 FROM table WHERE something
    > GROUP BY fld1"
    > Usually I just echo that result on screen but now I would have to store it
    > to another (new) table
    > Can it be done via a query?
    > I know how to do it by looping through results and doing a INSERT for every
    > line but I would like to do it via a query
    >
    > thanks
    > Gordan[/color]

    take a look into mysql documentation chapter 14.1.4.1 INSERT ... SELECT
    Syntax (http://dev.mysql.com/doc/mysql/en/INSERT_SELECT.html).

    Greetings, Urs

    Comment

    Working...