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

Oracle Person Needs help with MS Access Queries

P: n/a
Hi

This may be a really easy answer for you! I usually work with Oracle
but have an Access project to work on.

I have a table of clients (name, addr1, addr2, addr3, pcode etc) which
I need to use as a basis for a query result set which will include
literal values for an accounting package.

The way I do this in Oracle is:

select tabname.col1,tabname.col2,tabname.col3,tabname.col 4,"28 Days
From Receipt of Invoice","500","4027 Unrestricted
Income",tabname.col5,tabname.col6
from tabname
where tabname.col7=sysdate;

How do I put the literal values into an Access query?

Thanks for your help

Karen
Nov 12 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
"Karen" <ka***********@dsl.pipex.com> wrote in message
news:c1**************************@posting.google.c om...
Hi

This may be a really easy answer for you! I usually work with Oracle
but have an Access project to work on.

I have a table of clients (name, addr1, addr2, addr3, pcode etc) which
I need to use as a basis for a query result set which will include
literal values for an accounting package.

The way I do this in Oracle is:

select tabname.col1,tabname.col2,tabname.col3,tabname.col 4,"28 Days
From Receipt of Invoice","500","4027 Unrestricted
Income",tabname.col5,tabname.col6
from tabname
where tabname.col7=sysdate;

How do I put the literal values into an Access query?

Thanks for your help

Karen

Use the word AS to alias the field:

SELECT tabname.col1, tabname.Col2,
245 AS SomeNumber, "Hello" AS SomeText
FROM tabname
WHERE tabname.col7=Date()
Fletcher
Nov 12 '05 #2

P: n/a
If I understand your question correctly, you just need to alias them so that
those fields have names:

select tabname.col1,tabname.col2,tabname.col3,tabname.col 4,"28 Days
From Receipt of Invoice" AS Title1,"500" AS Title2,"4027 Unrestricted
Income" AS Title3,tabname.col5,tabname.col6
from tabname
where tabname.col7=Date();

Note that I've also changed the Oracle sysdate to the Access Date().

HTH
- Turtle
"Karen" <ka***********@dsl.pipex.com> wrote in message
news:c1**************************@posting.google.c om...
Hi

This may be a really easy answer for you! I usually work with Oracle
but have an Access project to work on.

I have a table of clients (name, addr1, addr2, addr3, pcode etc) which
I need to use as a basis for a query result set which will include
literal values for an accounting package.

The way I do this in Oracle is:

select tabname.col1,tabname.col2,tabname.col3,tabname.col 4,"28 Days
From Receipt of Invoice","500","4027 Unrestricted
Income",tabname.col5,tabname.col6
from tabname
where tabname.col7=sysdate;

How do I put the literal values into an Access query?

Thanks for your help

Karen

Nov 12 '05 #3

P: n/a
Tom
On 6 Feb 2004 03:22:57 -0800, ka***********@dsl.pipex.com (Karen)
wrote:

Well, pretty much the same way you do in Oracle, if your in Queries >
View > SQL View

SELECT tabname.Col1, tabname.Col2, tabname.Col3, tabname.Col4, "28
Days
From Receipt of Invoice" AS Expr5, "500" AS Expr6, "4027 Unrestricted
Income" AS Expr7, tabname.Col5, tabname.Col6
FROM tabname
WHERE (((tabname.Col7)=Date()));

if your in Queries > View > Design View
Expr6: "500" in the Field: row of the query grid will do.

Tom
Hi

This may be a really easy answer for you! I usually work with Oracle
but have an Access project to work on.

I have a table of clients (name, addr1, addr2, addr3, pcode etc) which
I need to use as a basis for a query result set which will include
literal values for an accounting package.

The way I do this in Oracle is:

select tabname.col1,tabname.col2,tabname.col3,tabname.col 4,"28 Days
From Receipt of Invoice","500","4027 Unrestricted
Income",tabname.col5,tabname.col6
from tabname
where tabname.col7=sysdate;

How do I put the literal values into an Access query?

Thanks for your help

Karen


Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.