Home All Groups Group Topic Archive Search About

From QueryDef to plain SQL text

Author
15 May 2006 8:09 AM
Edwin Knoppert
I have a few queries in my MDB, some of them are using them as INNER JOINs.
(A SELECT in a SELECT but then using querydefs)

I would like to combine these SQL statements into one but they become highly
complex for me.
I rather would like to embed the SQL text into my application than keeping
them in the DB.

Is there an easy way or should i maintain the querydefs?

Author
15 May 2006 11:36 AM
Kerry Moorman
Edwin,

Access writes the SQL for the querydef. You can just use Access's SQL View
of the query to see the generated SQL.

Kerry Moorman


Show quote
"Edwin Knoppert" wrote:

> I have a few queries in my MDB, some of them are using them as INNER JOINs.
> (A SELECT in a SELECT but then using querydefs)
>
> I would like to combine these SQL statements into one but they become highly
> complex for me.
> I rather would like to embed the SQL text into my application than keeping
> them in the DB.
>
> Is there an easy way or should i maintain the querydefs?
>
>
>
>
Author
15 May 2006 2:24 PM
Edwin Knoppert
I meant a combination of these two queries.

Query2 contains a select which is based on another query.
So i prepared 2 querydefs.
q2 uses q1, how to convert that statement to single SQL text?
Show quote
:)


"Kerry Moorman" <KerryMoor***@discussions.microsoft.com> schreef in bericht
news:9E6F724D-BEC5-45AB-AA12-06091493FDE8@microsoft.com...
> Edwin,
>
> Access writes the SQL for the querydef. You can just use Access's SQL View
> of the query to see the generated SQL.
>
> Kerry Moorman
>
>
> "Edwin Knoppert" wrote:
>
>> I have a few queries in my MDB, some of them are using them as INNER
>> JOINs.
>> (A SELECT in a SELECT but then using querydefs)
>>
>> I would like to combine these SQL statements into one but they become
>> highly
>> complex for me.
>> I rather would like to embed the SQL text into my application than
>> keeping
>> them in the DB.
>>
>> Is there an easy way or should i maintain the querydefs?
>>
>>
>>
>>
Author
15 May 2006 4:17 PM
Kerry Moorman
Edwin,

What SQL is generated by Access for each of the querydefs?

Kerry Moorman


Show quote
"Edwin Knoppert" wrote:

> I meant a combination of these two queries.
>
> Query2 contains a select which is based on another query.
> So i prepared 2 querydefs.
> q2 uses q1, how to convert that statement to single SQL text?
> :)
>
>
> "Kerry Moorman" <KerryMoor***@discussions.microsoft.com> schreef in bericht
> news:9E6F724D-BEC5-45AB-AA12-06091493FDE8@microsoft.com...
> > Edwin,
> >
> > Access writes the SQL for the querydef. You can just use Access's SQL View
> > of the query to see the generated SQL.
> >
> > Kerry Moorman
> >
> >
> > "Edwin Knoppert" wrote:
> >
> >> I have a few queries in my MDB, some of them are using them as INNER
> >> JOINs.
> >> (A SELECT in a SELECT but then using querydefs)
> >>
> >> I would like to combine these SQL statements into one but they become
> >> highly
> >> complex for me.
> >> I rather would like to embed the SQL text into my application than
> >> keeping
> >> them in the DB.
> >>
> >> Is there an easy way or should i maintain the querydefs?
> >>
> >>
> >>
> >>
>
>
>
Author
15 May 2006 7:29 PM
Edwin Knoppert
I would write an example then.
Imagne a group by querydef using some other kind of SELECT.

I think i'll write me an example tomorrow ok?



Show quote
"Kerry Moorman" <KerryMoor***@discussions.microsoft.com> schreef in bericht
news:DF7522B8-FDD3-4ED2-AA0E-6D4A48857020@microsoft.com...
> Edwin,
>
> What SQL is generated by Access for each of the querydefs?
>
> Kerry Moorman
>
>
> "Edwin Knoppert" wrote:
>
>> I meant a combination of these two queries.
>>
>> Query2 contains a select which is based on another query.
>> So i prepared 2 querydefs.
>> q2 uses q1, how to convert that statement to single SQL text?
>> :)
>>
>>
>> "Kerry Moorman" <KerryMoor***@discussions.microsoft.com> schreef in
>> bericht
>> news:9E6F724D-BEC5-45AB-AA12-06091493FDE8@microsoft.com...
>> > Edwin,
>> >
>> > Access writes the SQL for the querydef. You can just use Access's SQL
>> > View
>> > of the query to see the generated SQL.
>> >
>> > Kerry Moorman
>> >
>> >
>> > "Edwin Knoppert" wrote:
>> >
>> >> I have a few queries in my MDB, some of them are using them as INNER
>> >> JOINs.
>> >> (A SELECT in a SELECT but then using querydefs)
>> >>
>> >> I would like to combine these SQL statements into one but they become
>> >> highly
>> >> complex for me.
>> >> I rather would like to embed the SQL text into my application than
>> >> keeping
>> >> them in the DB.
>> >>
>> >> Is there an easy way or should i maintain the querydefs?
>> >>
>> >>
>> >>
>> >>
>>
>>
>>

AddThis Social Bookmark Button