Welcome to dbFreaks.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

copy DB question

 
   Database Help (Home) -> Visual Basic RSS
Next:  Distribution  
Author Message
Alejandra Parra

External


Since: Jun 02, 2004
Posts: 8



(Msg. 1) Posted: Wed Jun 02, 2004 8:49 pm
Post subject: copy DB question
Archived from groups: microsoft>public>vb>database (more info?)

Hey

Well I have a question

How can I make a selection from table from a X database and create a table
with this result in a Y database?

Help! please!

 >> Stay informed about: copy DB question 
Back to top
Login to vote
Alan Barker

External


Since: Jun 01, 2004
Posts: 3



(Msg. 2) Posted: Thu Jun 03, 2004 10:49 am
Post subject: Re: copy DB question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

No sure what DB you are using but SQL command would be

(on a SQL Server at least)
SELECT <fields> INTO Y.dbo.<DestinationTable> FROM X.dbo<SourceTable> WHERE
<SelectionCriteria>


a (completely pointless) example:

select CategoryName,Description into Pubs.dbo.TempTable from
Northwind.dbo.Categories
where CategoryID > 3

A little more info would help
X database is SQL Server and Y Database is access 2000 etc.

hope this helps
al.




"Alejandra Parra" wrote in message

 > Hey
 >
 > Well I have a question
 >
 > How can I make a selection from table from a X database and create a table
 > with this result in a Y database?
 >
 > Help! please!
 >
 >

 >> Stay informed about: copy DB question 
Back to top
Login to vote
Alejandra Parra

External


Since: Jun 02, 2004
Posts: 8



(Msg. 3) Posted: Thu Jun 03, 2004 12:03 pm
Post subject: Re: copy DB question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Do you know how to do it in Access??

"Alan Barker" escribió en el mensaje

 > No sure what DB you are using but SQL command would be
 >
 > (on a SQL Server at least)
 > SELECT <fields> INTO Y.dbo.<DestinationTable> FROM X.dbo<SourceTable>
WHERE
 > <SelectionCriteria>
 >
 >
 > a (completely pointless) example:
 >
 > select CategoryName,Description into Pubs.dbo.TempTable from
 > Northwind.dbo.Categories
 > where CategoryID > 3
 >
 > A little more info would help
 > X database is SQL Server and Y Database is access 2000 etc.
 >
 > hope this helps
 > al.
 >
 >
 >
 >


  > > Hey
  > >
  > > Well I have a question
  > >
  > > How can I make a selection from table from a X database and create a
table
  > > with this result in a Y database?
  > >
  > > Help! please!
  > >
  > >
 >
 >
 >> Stay informed about: copy DB question 
Back to top
Login to vote
Utf-8BS2plbGw

External


Since: Jan 30, 2004
Posts: 29



(Msg. 4) Posted: Sun Jun 06, 2004 3:26 pm
Post subject: RE: copy DB question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

This is the querie to: from current Access-DB create a new table in an external Access-DB

SELECT fromtable.* INTO [C:\ANOTHERDB.mdb].[newtablename]
FROM [fromtable]
WHERE [fromtable].[idno] = 1020;

In the above example only one record will be copied to the new table in the external db but I think you can see how to change the SQL the way you want it to work. just remember: newtablename MUSt be non existing...

Kjell
 >> Stay informed about: copy DB question 
Back to top
Login to vote
Alejandra Parra

External


Since: Jun 02, 2004
Posts: 8



(Msg. 5) Posted: Tue Jun 08, 2004 3:33 pm
Post subject: Re: copy DB question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Thanks a lot... it was surely helpful
Another question
Do you know the querie to copy to an existing table?????

"Kjell" escribió en el mensaje

 > This is the querie to: from current Access-DB create a new table in an
external Access-DB
 >
 > SELECT fromtable.* INTO [C:\ANOTHERDB.mdb].[newtablename]
 > FROM [fromtable]
 > WHERE [fromtable].[idno] = 1020;
 >
 > In the above example only one record will be copied to the new table in
the external db but I think you can see how to change the SQL the way you
want it to work. just remember: newtablename MUSt be non existing...
 >
 > Kjell
 >> Stay informed about: copy DB question 
Back to top
Login to vote
Michael Cole2

External


Since: Apr 21, 2004
Posts: 3



(Msg. 6) Posted: Wed Jun 09, 2004 7:44 pm
Post subject: Re: copy DB question [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Alejandra Parra" wrote in message

 > Thanks a lot... it was surely helpful
 > Another question
 > Do you know the querie to copy to an existing table?????

INSERT INTO blah

Look up INSERT in the help files.



--
Regards,

Michael Cole
 >> Stay informed about: copy DB question 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
question about simple array - Hello, I'm looking for the best way to give an user the possiblity to search in multiple directories for certain photos. I was thinking about using an array to do so. This is the Command1_Click - code below. ## --- Private Sub Command1_Click() ' creat...

sql query returns in wrong format - Hi, Hope someone can help me with this. I have MS SQL 2000 database where i have Table "PriceList" and there a column "Pricemk" wich is data type "money". All data in this column is in form "10001,35". So why when...

arrays - is there a way to concatenate the contents of an array (looping through the array) and storing each item in a comma delimited string? Thanks!

DataReport PageBreak - Hi everyone, I would like to know how to force pagebreak in a datareport for example after 5 records printed. Thank you all

Possible Use of a Cursor - I have a complex query that I hope I can explain it well enough for everyone to understand. I have a table that contains information for work instructions. Contained in the table are "MACHINE_PROC" these are groupings of machining processes....
   Database Help (Home) -> Visual Basic All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]