By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,680 Members | 1,436 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,680 IT Pros & Developers. It's quick & easy.

bug in access query saves?

P: n/a
The following query changes when I save it:
================================================== ================
SELECT
AcctID
FROM
(SELECT
[order number] as AcctID
FROM tblOrderHeader

UNION

SELECT
[AcctID]
from tblExDoc

UNION SELECT
[INVOICE] as AcctID
FROM tblSalesInvoiceHeader
)

When i save it and reopen it - it morphs into the following (note the last
line):

SELECT AcctID
FROM [SELECT
[order number] as AcctID
FROM tblOrderHeader

UNION

SELECT
[AcctID]
from tblExDoc

UNION SELECT
[INVOICE] as AcctID
FROM tblSalesInvoiceHeader
]. AS [%$##@_Alias];

================================================== ================
Does Access2k not support Select statements in the FROM clause? Or is
something else going on?

Thanks
--
kent eilers
ke**@kaeServices.com
Nov 12 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
DFS
Kent,

You can change that last part [%$##@_Alias] to [anything you want] and it
won't affect the query results.

What you might be concerned with is your usage of AcctID, Order Number and
Invoice. You seem to be using them interchangeably, and you probably don't
want to do that.

"Kent Eilers" <ka*****@uswest.net> wrote in message
news:yU*********************@twister.rdc-kc.rr.com...
The following query changes when I save it:
================================================== ================
SELECT
AcctID
FROM
(SELECT
[order number] as AcctID
FROM tblOrderHeader

UNION

SELECT
[AcctID]
from tblExDoc

UNION SELECT
[INVOICE] as AcctID
FROM tblSalesInvoiceHeader
)

When i save it and reopen it - it morphs into the following (note the last
line):

SELECT AcctID
FROM [SELECT
[order number] as AcctID
FROM tblOrderHeader

UNION

SELECT
[AcctID]
from tblExDoc

UNION SELECT
[INVOICE] as AcctID
FROM tblSalesInvoiceHeader
]. AS [%$##@_Alias];

================================================== ================
Does Access2k not support Select statements in the FROM clause? Or is
something else going on?

Thanks
--
kent eilers
ke**@kaeServices.com

Nov 12 '05 #2

P: n/a
Thanks - the differences in field names are due to legacy issues with the
project.

what i got to work - which didn't get munched by the Access query parser is
the following - note that this is access 97 syntax! It would appear that
Access2k's query parser converted my ansi standard (with parenthesis's) to
the bracket'ed version of access '97.

SELECT a.*
FROM [SELECT
[order number] as AcctID
FROM tblOrderHeader

UNION

SELECT
AcctID
from tblExDoc

UNION

SELECT
INVOICE as AcctID
FROM tblSalesInvoiceHeader
]. AS a
ORDER BY 1;
"DFS" <no******@nospam.com> wrote in message
news:vs************@corp.supernews.com...
Kent,

You can change that last part [%$##@_Alias] to [anything you want] and it
won't affect the query results.

What you might be concerned with is your usage of AcctID, Order Number and
Invoice. You seem to be using them interchangeably, and you probably don't want to do that.

"Kent Eilers" <ka*****@uswest.net> wrote in message
news:yU*********************@twister.rdc-kc.rr.com...
The following query changes when I save it:
================================================== ================
SELECT
AcctID
FROM
(SELECT
[order number] as AcctID
FROM tblOrderHeader

UNION

SELECT
[AcctID]
from tblExDoc

UNION SELECT
[INVOICE] as AcctID
FROM tblSalesInvoiceHeader
)

When i save it and reopen it - it morphs into the following (note the last line):

SELECT AcctID
FROM [SELECT
[order number] as AcctID
FROM tblOrderHeader

UNION

SELECT
[AcctID]
from tblExDoc

UNION SELECT
[INVOICE] as AcctID
FROM tblSalesInvoiceHeader
]. AS [%$##@_Alias];

================================================== ================
Does Access2k not support Select statements in the FROM clause? Or is
something else going on?

Thanks
--
kent eilers
ke**@kaeServices.com


Nov 12 '05 #3

P: n/a
DFS

"Kent Eilers" <ka*****@uswest.net> wrote in message
news:UI********************@twister.rdc-kc.rr.com...
Thanks - the differences in field names are due to legacy issues with the
project.
Sure thing.

Is it worth your time to fix those issues so it doesn't become _your_
legacy?
what i got to work - which didn't get munched by the Access query parser is the following - note that this is access 97 syntax! It would appear that
Access2k's query parser converted my ansi standard (with parenthesis's) to
the bracket'ed version of access '97.

SELECT a.*
FROM [SELECT
[order number] as AcctID
FROM tblOrderHeader

UNION

SELECT
AcctID
from tblExDoc

UNION

SELECT
INVOICE as AcctID
FROM tblSalesInvoiceHeader
]. AS a
ORDER BY 1;
"DFS" <no******@nospam.com> wrote in message
news:vs************@corp.supernews.com...
Kent,

You can change that last part [%$##@_Alias] to [anything you want] and it
won't affect the query results.

What you might be concerned with is your usage of AcctID, Order Number and Invoice. You seem to be using them interchangeably, and you probably

don't
want to do that.

"Kent Eilers" <ka*****@uswest.net> wrote in message
news:yU*********************@twister.rdc-kc.rr.com...
The following query changes when I save it:
================================================== ================
SELECT
AcctID
FROM
(SELECT
[order number] as AcctID
FROM tblOrderHeader

UNION

SELECT
[AcctID]
from tblExDoc

UNION SELECT
[INVOICE] as AcctID
FROM tblSalesInvoiceHeader
)

When i save it and reopen it - it morphs into the following (note the

last line):

SELECT AcctID
FROM [SELECT
[order number] as AcctID
FROM tblOrderHeader

UNION

SELECT
[AcctID]
from tblExDoc

UNION SELECT
[INVOICE] as AcctID
FROM tblSalesInvoiceHeader
]. AS [%$##@_Alias];

================================================== ================
Does Access2k not support Select statements in the FROM clause? Or is
something else going on?

Thanks
--
kent eilers
ke**@kaeServices.com



Nov 12 '05 #4

P: n/a
not what i'm getting paid for ))
"DFS" <no******@nospam.com> wrote in message
news:vs************@corp.supernews.com...

"Kent Eilers" <ka*****@uswest.net> wrote in message
news:UI********************@twister.rdc-kc.rr.com...
Thanks - the differences in field names are due to legacy issues with the
project.


Sure thing.

Is it worth your time to fix those issues so it doesn't become _your_
legacy?
what i got to work - which didn't get munched by the Access query parser

is
the following - note that this is access 97 syntax! It would appear that Access2k's query parser converted my ansi standard (with parenthesis's) to the bracket'ed version of access '97.

SELECT a.*
FROM [SELECT
[order number] as AcctID
FROM tblOrderHeader

UNION

SELECT
AcctID
from tblExDoc

UNION

SELECT
INVOICE as AcctID
FROM tblSalesInvoiceHeader
]. AS a
ORDER BY 1;
"DFS" <no******@nospam.com> wrote in message
news:vs************@corp.supernews.com...
Kent,

You can change that last part [%$##@_Alias] to [anything you want] and it won't affect the query results.

What you might be concerned with is your usage of AcctID, Order Number and Invoice. You seem to be using them interchangeably, and you probably

don't
want to do that.

"Kent Eilers" <ka*****@uswest.net> wrote in message
news:yU*********************@twister.rdc-kc.rr.com...
> The following query changes when I save it:
> ================================================== ================
> SELECT
> AcctID
> FROM
> (SELECT
> [order number] as AcctID
> FROM tblOrderHeader
>
> UNION
>
> SELECT
> [AcctID]
> from tblExDoc
>
> UNION SELECT
> [INVOICE] as AcctID
> FROM tblSalesInvoiceHeader
> )
>
> When i save it and reopen it - it morphs into the following (note the last
> line):
>
> SELECT AcctID
> FROM [SELECT
> [order number] as AcctID
> FROM tblOrderHeader
>
> UNION
>
> SELECT
> [AcctID]
> from tblExDoc
>
> UNION SELECT
> [INVOICE] as AcctID
> FROM tblSalesInvoiceHeader
> ]. AS [%$##@_Alias];
>
> ================================================== ================
> Does Access2k not support Select statements in the FROM clause? Or

is > something else going on?
>
> Thanks
> --
> kent eilers
> ke**@kaeServices.com
>
>



Nov 12 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.