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

How to create table?

P: n/a

A simple question. I would like to know
the equivalent instruction in ACCESS (or SQLSERVER)
for the following (works with oracle)

create table "MYTABLE" as
select "Courier" from dbtable1

thank you very much

tom

Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
<to**************@uniroma1.it> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...

A simple question. I would like to know
the equivalent instruction in ACCESS (or SQLSERVER)
for the following (works with oracle)

create table "MYTABLE" as
select "Courier" from dbtable1

Try

SELECT dbtable1.Courier INTO MYTABLE
FROM dbtable1

Regards,
Keith.
www.keithwilby.com
Nov 13 '05 #2

P: n/a


Thank very much Keith. It works fine.

Actually my real intent was slightly broader: to ask how
to put into a new table the result of an arbitrary
access query (I am creating the query from a .NET program).

I guess your suggestion works also for arbitrary selects
(including group bys, etc.). By analogy it should be sufficient to take
the SELECT and append the "INTO NEWTABLE"
before the FROM clause. Is that right or there are exceptions?

I have some further question for you experts.
Since the program I am making should work with both Oracle and
Microsoft providers, is it possible to conciliate in one
syntax this problem of putting the result of an arbitrary SELECT
into a new table (or view)? Or it is instead necessary distinguish
between providers.

Thanks.

Try

SELECT dbtable1.Courier INTO MYTABLE
FROM dbtable1

Regards,
Keith.
www.keithwilby.com


Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.