473,613 Members | 2,413 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to create table?


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
2 2410
<to************ **@uniroma1.it> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.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.Courie r INTO MYTABLE
FROM dbtable1

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


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.Courie r INTO MYTABLE
FROM dbtable1

Regards,
Keith.
www.keithwilby.com


Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
4050
by: Phil Powell | last post by:
create table if not exists nnet_produkt_varegruppe ( nnet_produkt_varegruppe_id int not null auto_increment, primary key(nnet_produkt_varegruppe_id), nnet_produkt_varegruppe_navn varchar(255) not null ); create table if not exists nnet_produkt_farge ( nnet_produkt_farge_id int not null auto_increment, primary key(nnet_produkt_farge_id),
6
6568
by: dev | last post by:
how create a temp table as a copy of a existing table and then update1 field and insert the hole temp table back in the existing table? please any help? if i have 10 fields in 1 record and about 100 records and a field.status=1 in a existing_table and i want to create a temp_table with all the recordse and values of the existing_table and then update the field.status to 2 and insert in 1 query the temp_table in the existing_table
4
4432
by: Michael Jackson | last post by:
I have a stored procedure to create a table. In my program I want the user to name the table to be created, therefore I pass a parameter to the SP for the table name. I cannot get it to work. It creates a table called "@NewTableName". Any ideas? CREATE PROCEDURE dbo.sp_FFProduction_CreateTable (
7
9671
by: Wolfgang Kreuzer | last post by:
Hello all, I have two tables - Projects and ProjectStruct Table Projects contains master records of the projects, ProjectStruct allows to define a project herarchie and contains the fields PrjStructId, ProjectId, PrjStructName, ..., ParentId PrjStructParent contains a reference to the parent or to itselves if record is top-level-record for a project.
1
3346
by: poohnie08 | last post by:
i have a excel spreadsheet showing staff name, date,work hour, ot hour, slot1, slot2, slot3, slot4 and others). The "()" will keep repeating from day 1 until end of month. eg in excel spreadsheet, ============================================================================== A1 |A2 A3 A4 A5 A6 A7 A8 |A9 A10 A11 | 01/02/04 |02/02/04 StaffName |Work Hr OT Hr Slot1...
24
3098
by: flkeyman | last post by:
Work in legal office. Trying to create solid designed database structure. This is list of tables w/fields and primary keys. Any comments/advice greatly appreciated. tbl-Defendants CaseNumber (primary key) FirstName MiddleName LastName
6
7704
by: Peter Nurse | last post by:
For reasons that are not relevant (though I explain them below *), I want, for all my users whatever privelige level, an SP which creates and inserts into a temporary table and then another SP which reads and drops the same temporary table. My users are not able to create dbo tables (eg dbo.tblTest), but are permitted to create tables under their own user (eg MyUser.tblTest). I have found that I can achieve my aim by using code like...
27
3773
by: max | last post by:
Hello, I am a newbye, and I'm trying to write a simple application. I have five tables with three columns; all tables are identical; I need to change some data in the first table and let VB updates the same data in all other four tables in the right places. I know it would be possible by using the ForeignKeyConstraint object. I have created the tables using the DataSet Visual Tool and I know it doesn't create any ForeignKeyConstraint obj....
4
12427
by: etuncer | last post by:
Hello All, I have Access 2003, and am trying to build a database for my small company. I want to be able to create a word document based on the data entered through a form. the real question is this: can Access create the document and place it as an OLE object to the relevant table? Any help is greatly appreciated. Ricky
2
2426
by: lakuma | last post by:
Hi, I have a table called A (say) with columns called name, place, animal and thing. I would want to write an on insert trigger on this table, which would create a table with the name of the value entered in the name column. Let's say a new column is entered with the value of name column as mickey. I want to create a table called mickey, with the help of triggers. I'm really new to this and i would like some help. Thanks in advance for...
0
8174
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8118
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8618
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8257
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8423
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6083
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5537
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4047
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
1699
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.