f



To retrive a table from one database to and another database(same table)

hi
  i have emp table in one database , how to retrieve same table another
database
  through query analizer
                        give code ,,,

0
suryaitha (11)
3/17/2006 9:41:09 AM
comp.databases.ms-sqlserver 14567 articles. 1 followers. janinepelletier (108) is leader. Post Follow

2 Replies
1236 Views

Similar Articles

[PageSpeed] 38

Hi,

use the three part notation:

SELECT * FROM database.owner.Objectname

 (replace owner by schema for SQL2k5)

HTH, Jens Suessmeyer.

---
http://www.sqlserver2005.de
---

0
Jens1058 (119)
3/17/2006 11:02:02 AM
Hi surya

While the first database is "Current" as would result from:

Use FirstDatabaseName

select * from OtherDatabaseName..Emp
-- 
-Dick Christoph
"surya" <suryaitha@gmail.com> wrote in message 
news:1142588469.061525.268810@u72g2000cwu.googlegroups.com...
> hi
>  i have emp table in one database , how to retrieve same table another
> database
>  through query analizer
>                        give code ,,,
> 


0
dchristo99 (44)
3/17/2006 3:51:44 PM
Reply:

Similar Artilces:

How do I reference a table in one database from a SQL script running in another database?
I am construvcting a number of databases, some of which contain sensitive data and most of which do not. I am attempting to handle the security issues involved in protecting sensitive data in part by putting it in its own database. If the sensitive data is in a database called d_SensitiveData, and in that database there is a table called 't_A' (I know, not very informative, but this is only a trivially simple example :-), and I have a script running in a database 'NotSensitiveData' (i.e. there is a statement at the beginning of the script "USE NotSensitiveData"), how do I referenece the primary key in table 'A'? I tried a variety of things like: ALTER TABLE t_nsX ADD CONSTRAINT FK_PersonID FOREIGN KEY (p_idPerson) REFERENCES SensitiveData.t_A (p_idPerson); The above is, in fact, my latest attempt. Everything I tried has failed precisely at the point where I specify a table in a different database. So what is the trick to refering to a table in one database when using another database? This will be used in a ASP.NET v3 application where one of the things I want to do is have the authentication provider be a different database from the one used for the main application data. Does anyone know of an example I can download from the web that does the same sort of thing I want to try, with some discussion of security issues involved (i.e. what I can do to harden the application and data server)? NB: I am an application developer, not...

Link from one database to tables of other database
Hi, I am trying to Link one MS Access database to the tables of a second MS Access database using Tools-->Database Utilities-->Linked Table Manager. I receive the error "Method 'List' of Object 'IFieldListWnd' failed" I have been successful in doing this before, but do not understand why I can't seem to do this, this time? Thanks for your ideas! Zufie On Mar 24, 9:43=A0am, zufie <john.marru...@illinois.gov> wrote: > Hi, > I am trying to Link one MS Access database to the tables of a second > MS Access database using Tools-->Database Utilities-->Linked Table > Manager. > > I receive the error "Method 'List' of Object 'IFieldListWnd' failed" > > I have been successful in doing this before, but do not understand why > I can't seem to do this, this time? > > Thanks for your ideas! > > Zufie Figured it out. For whatever reason, I must first open the application MS Access 2000. Following this I must open the first Access database via the application MS Access 2000 and then proceed to linking the first Access database with the second Access database. Zuf ...

How to copy table from oracle database to sqlserver database ?
Hello, I need to copy a table from an 8i oracle database to a sqlserver 2000 database. Is it possible to use the command "COPY FROM ... TO ..." ? So, what is the correct syntax ? Thanks for your help Cyril "Cyril" <jewelk@free.fr> wrote in message news:cd38c3d6.0408100617.6f7b9f3e@posting.google.com... > Hello, > > I need to copy a table from an 8i oracle database to a sqlserver 2000 database. > > Is it possible to use the command "COPY FROM ... TO ..." ? > So, what is the correct syntax ? > > > Thanks for your help > &...

How to copy table from oracle database to sqlserver database ?
Hello, I need to copy a table from an 8i oracle database to a sqlserver 2000 database. Is it possible to use the command "COPY FROM ... TO ..." ? So, what is the correct syntax ? Thanks for your help Cyril On 10 Aug 2004, jewelk@free.fr wrote: > Hello, > > I need to copy a table from an 8i oracle database to a > sqlserver 2000 database. A few options exist. If this is one-off, just use sqlldr to drop the data to a file and then bcp to get it into SQLServer. > Is it possible to use the command "COPY FROM ... TO ..." ? > So, what is the correct syntax ? Well, I'm sure SQLServer has connectivity to Oracle? If you want to go this route, use that and do this from SQLServer. -- Galen Boyer On 10 Aug 2004 07:15:16 -0700, jewelk@free.fr (Cyril) wrote: >Hello, > >I need to copy a table from an 8i oracle database to a sqlserver 2000 database. > >Is it possible to use the command "COPY FROM ... TO ..." ? >So, what is the correct syntax ? > > >Thanks for your help > >Cyril Read up on using the Heterogeneous Gateway to Sqlserver. -- Sybrand Bakker, Senior Oracle DBA "Cyril" <jewelk@free.fr> wrote in message news:cd38c3d6.0408100615.6371b40e@posting.google.com... > Hello, > > I need to copy a table from an 8i oracle database to a sqlserver 2000 database. > > Is it possible to use the command "...

Database Database Database Database Software Cheap
Database Database Database Database Great Datase Software See Website Below. Ultra Easy to Learn (Typically 30 Seconds) Professional Programmable Database Ver. 2.3 2.1 Million Record Capacity, (New cond). Search Rate: 2000 / Records / Second. DataBase Type: Random Access. Can Create Unlimited Databases. Programmable fields for any Application. Has Six Seperate Field Sets All Programmable. Build Time One Second, (Auto Creates DB). Setup Time: Instantly, Just Enter DB Name. Ultra Cheap Price, Special $20, Paypal Accepted. Application Mailed Instantly (file Attached Email). http://www.vehiclerepair.org/dbPro/dbpro.html ...

Database Database Database Database Software Cheap
Database Database Database Database Software Cheap Great Datase Software See Website Below. Ultra Easy to Learn (Typically 30 Seconds) Professional Programmable Database Ver. 2.3 2.1 Million Record Capacity, (New cond). Search Rate: 2000 / Records / Second. DataBase Type: Random Access. Can Create Unlimited Databases. Programmable fields for any Application. Has Six Seperate Field Sets All Programmable. Build Time One Second, (Auto Creates DB). Setup Time: Instantly, Just Enter DB Name. Ultra Cheap Price, Special $20, Paypal Accepted. Application Mailed Instantly (file Attached Email). http://www.vehiclerepair.org/dbPro/dbpro.html ...

How to copy a sun-database in one informix database to another informix database?
Hi, Sorry I am not an informix dba, and I was faced to copy a sub-database(sorry I don't know the clear name of such concept, as informix is like sql-server, which used multiple database) from one informix database system to another informix database. I know in oracle, we can use transportable tablespace, copy the datafile and transport the metadata, and do something else. How can I do it in informix then? Is there document which talk about the detail step? Thanks It would really help if you knew the versions of the Informix databases. Assuming Informix IDS 7.x or IDS 9.x If the two systems are binary compatible the fastest method is to use onunload/onload. If the systems are not binary compatible the easiest way is to use dbexport/dbimport. Everything is well documented in the manual "IBM Informix Migration Guide". This manual covers all Informix databases from Standard Engine and Online to IDS and XPS. See http://www.ibm.com/informix/pubs zhu chao wrote: > Hi, > Sorry I am not an informix dba, and I was faced to copy a > sub-database(sorry I don't know the clear name of such concept, as > informix is like sql-server, which used multiple database) from one > informix database system to another informix database. > I know in oracle, we can use transportable tablespace, copy the > datafile and transport the metadata, and do something else. How can I > do it in informix then? Is there...

Link form another database table into current database
I copy a form from another database into my database. I need help how to i link the table which is in another database with that form. Thank you. In the database with the copied form select File then Get Extrernal Data then Link Tables... When the Link window opens, find the database that contains the table to which you want to link and select it and then select the Link button. Voila. Your form should see the linked table. colleen1980@gmail.com wrote: >I copy a form from another database into my database. I need help how >to i link the table which is in another database with that form. > >Thank you. -- Message posted via http://www.accessmonster.com ...

a database, is a database, is a err database
How many times can we see the same request from someone who wants to access data from a 'pick' database through what has come to be 'standard' practices (odbc, oledb) and still get the same old sloppy ' buy this proprietary utility (and above all, my services)' answer. I think most of these pick flavors should have some sort of layer (by now!) to handle this; If someone needs to do this, the service is really 'education' i.e to show them how. Lets cut the shit now and stop with this tired and silly BS and sad marketing schlock. Regards, -Jim Jim wrote: > How many times can we see the same request from someone who wants to > access data from a 'pick' database through what has come to be > 'standard' practices (odbc, oledb) > and still get the same old sloppy ' buy this proprietary utility (and > above all, my services)' answer. I think most of these pick flavors > should have some sort of layer (by now!) to handle this; If someone > needs to do this, the service is really 'education' i.e to show them > how. Lets cut the shit now and stop with this tired and silly BS and > sad marketing schlock. > > Regards, > > -Jim Jim who? I wonder? What is this? An attack on capitalism? Providing services for those who perhaps lack the time, skill, or knowledge to perform such tasks is hardly a crime. Maybe "standard" odbc and...

Need to Open Database from another Database and delete table within
I am trying to open Database #2 while in Database #1 and delete a table that is in #2 so that I can copy a table from #1 into #2 - all through a function. My Database #2, as part of the start up, opens a form for user sign in. It is not starting up with autoexec. I do not want the function to open the window and subsequently open the form in Database #2. Is there anyway to get around this? If I put the open form in the autoexec and not in the start up, can I work around it? And if so, can anyone offer any help or suggestions on the how to's. I have spent the day trying to find a way around it and have gotten nowhere, but confused. Thanks in advance for any help! > I am trying to open Database #2 while in Database #1 and delete a > table that is in #2 so that I can copy a table from #1 into #2 - all > through a function. My Database #2, as part of the start up, opens a > form for user sign in. It is not starting up with autoexec. I do not > want the function to open the window and subsequently open the form in > Database #2. Is there anyway to get around this? If I put the open > form in the autoexec and not in the start up, can I work around it? > And if so, can anyone offer any help or suggestions on the how to's. > I have spent the day trying to find a way around it and have gotten > nowhere, but confused. Have you considered simply exporting the table from the current db (#1) into db #2? Look up the "TransferDatabas...

Moving tables from one database to another
Ok I have a database application that collects data from sources and procudes output tables. Once created these tables need to be moved to other databases. Do I... a) have to do it manually? b) write some SQL to write the data to the other database (created in code first) c) use commands as yet unknown to me to transfer the data across seamlessly. Any good ideas? Thanks, Rob. On 16 Jun 2006 06:18:49 -0700, "dkintheuk" <rmcgregor@firenet.uk.com> wrote: Check out the TransferDatabase method in the Help file. -Tom. >Ok I have a database application that collects data from sources and >procudes output tables. > >Once created these tables need to be moved to other databases. > >Do I... > >a) have to do it manually? >b) write some SQL to write the data to the other database (created in >code first) >c) use commands as yet unknown to me to transfer the data across >seamlessly. > >Any good ideas? > >Thanks, > >Rob. Also, consider linking these table to the other databases unless you're concerned about the other db users screwing up the data. dkintheuk wrote: >Ok I have a database application that collects data from sources and >procudes output tables. > >Once created these tables need to be moved to other databases. > >Do I... > >a) have to do it manually? >b) write some SQL to write the data to the other database (created in >code first) >c) use commands as yet un...

Copy all tables from one database to another
If I wanted to be able to copy all of the tables in an existing database called Original.mde to another database called New.mde from a button click event in Original.mde, is there an easy way of coding it without naming every single table in Original.mde. I am looking for a way of updating a database on site without needing to access the database window and import the existing tables into a new empty database. dixie On Wed, 25 Feb 2004 15:37:43 +1100, "dixie" <dixiec@dogmail.com> wrote: Not sure why you're not just making a copy of the database. But that aside, you can walk the TableDefs collection to find the names of all tables. -Tom. >If I wanted to be able to copy all of the tables in an existing database >called Original.mde to another database called New.mde from a button click >event in Original.mde, is there an easy way of coding it without naming >every single table in Original.mde. I am looking for a way of updating a >database on site without needing to access the database window and import >the existing tables into a new empty database. > >dixie > Loop through the TableDefs collection and export each table... ? -- Bradley Software Developer www.hrsystems.com.au A Christian Response www.pastornet.net.au/response "dixie" <dixiec@dogmail.com> wrote in message news:zFV_b.174$ud3.2855@nnrp1.ozemail.com.au... > If I wanted to be able to copy all of the tables in an existing database > cal...

Using table from one database in another...
Hi I wonder if there's a posibility to use table from one database that's alredy made in another database? (without copying it ) Ho can I do it? Thanks for help Leszek Hi, you can access a table in another database by fully qualifying it, that is e.g. select * from [databasename].[tablename]; This way, you can also join two (or more) tables from different databases. Markus ...

Database Database Database Software Cheap
Database Database Database Database Software Cheap Great Datase Software See Website Below. Ultra Easy to Learn (Typically 30 Seconds) Professional Programmable Database Ver. 2.3 2.1 Million Record Capacity, (New cond). Search Rate: 2000 / Records / Second. DataBase Type: Random Access. Can Create Unlimited Databases. Programmable fields for any Application. Has Six Seperate Field Sets All Programmable. Build Time One Second, (Auto Creates DB). Setup Time: Instantly, Just Enter DB Name. Ultra Cheap Price, Special $20, Paypal Accepted. Application Mailed Instantly (file Attached Email). http://www.vehiclerepair.org/dbPro/dbpro.html ...

copying tables from one database to another
How do people copy tables from one database to another? The docs say that imp/exp are deprecated. I tried the copy command in sqlplus but it destroys the indexes and default attributes! Arrgghh. I have a feeling sql loader can be used to do the import but how do I do the export first? Obviously any export will have to produce a file that is suitable for use to sql loader. Excuse my ignorance: I am more used to sybase where you can use bcp to bcp-out followed by bcp-in. Regards, Andrew Marlow On 20 Jan, 11:35, Andrew <marlow.and...@googlemail.com> wrote: > How do pe...

Delete a record from a table in a Database with Database Connectivity
I can't find the function from the Database Connectivity library that allows me to delete a record from a table of the database. I tried to use DB Tools Free Object.vi function but this one deletes only the table created with a query. &nbsp; Thankyou Hi, I have the same problem to delete a record&nbsp;from a table in a Database. I couldn't understand your answers very well. Can anyone give some more&nbsp;details? If you&nbsp;already have got the solution, could you let&nbsp;me know? Thank you very much! Jane&nbsp; I have used the sql query as described above a...

copying data from one database to another database
I want to copy data from our production database to the development database. I want to move only the data. I do not need the table structure, constrains or anything else. I think I can use the db2move command to export out all the data like the following: db2move dbname export -tc schema1 When I load the data into our development database, will it recreate the tables? My problem is that I do not want to recreate the structure. I want to make sure that I am copying over only the data. Is db2move the best utility to move the data between two databases without making any stru...

Using Objects from one database in another database
I've looked around here to see if this can be done, but haven't found the answer. Here is what I want to do... I have a two databases -- One for Sales and one for Operations. These are used by two groups of people with some obvious overlap (like the boss, for example). Some of the data is the same, so I'm using only one backend database file to hold the data. However, I want to have one piece (projects) from the Operations database to also be used in the sales database. The projects piece of it consists of several forms, subforms, reports, queries, code, etc. To cut down on maintenance (so without actually importing) I want to be able to use those forms, subforms, etc. in the Sales database, exactly as they are in the Operations database. Is there a way to do this so that any changes made in the Operations database are also reflected in the Sales database? I've never created Add-ins before, but before I go trying to make this happen, is this the way I need to go? Would this even work? I guess what I'm saying is I want to link code, forms, reports, etc. just like I can link tables. Any ideas? ...

I am trying to set up a database using the database connectivity toolkit and 8.5. I have tables setup and each one has an autoincrementing primary ID key.
I have very little experience with databases, but I have to set one up. I am setting up a relational BD, I have several tables set up, each has a primary key set up as a ID, autoincrement. &nbsp; How can I not send this column data, and let it autoincrement like it should so that it is a unique entry. I keep on getting an error that says that the number of colums don't match. Is there any way to do this. &nbsp; I want the database to keep track of the line count for this, and increment when each new entry arrives.&nbsp; Does this make any sense? The insert data VI has a Columns input which is a 1D string array. Each element in the array corresponds to an element in the cluster, so you can just use the names of the columns and not use the ID column. I think that is what I was doing, but it did not like it, I kept getting an error saying that the array that I was sending did not have the same number of columns as the table I was sending it to. When I read the database and list out the tables and the columns, I see that ID as one column in each table. That is my problem, It seems like I have to define each element and I have to send the same number of elements as there are in the table. I am using that as the primary key so I can not by definition send that a null, it has to be&nbsp;unique.&nbsp;&nbsp; questionable wrote: It seems like I have to define each element and I have to send the same number of elements as there are in the table. No, the...

Import records from one database table to another
How do I import the records from one database table to another? Can anyone tell me the steps to do it brosuryanarayanaa@gmail.com wrote: > How do I import the records from one database table to another? > Can anyone tell me the steps to do it > There are several ways to do this. You could use a query: INSERT INTO tblJourney SELECT * FROM tblJourney IN 'c:\src\access\journey.mdb'; is an example that assumes all the fields and field data types in the source and destination tables match. You could also use code to do this. The exact code would depend on whether you use the DAO or ADO object model. -- '--------------- 'John Mishefske '--------------- Thanks John I got it ...

SQLite
I am having trouble figuring out how to copy one table in one database, to another table in a separate database. I've tried the following db1 eval {INSERT INTO db1.Headers SELECT * FROM db2.HeaderName} I receive this error: no such table: db2.HeaderName If I run queries on both databases, they both return successfully. Casey <casey.ackels@gmail.com> wrote: > I am having trouble figuring out how to copy one table in one > database, to another table in a separate database. > I've tried the following > db1 eval {INSERT INTO db1.Headers SELECT * FRO...

Update records from one database table to another
I have used this code to append my records: INSERT INTO EducationTbl SELECT * FROM EducationTbl IN 'C:\ProgramFiles\AMSRepUpdate.mdb'; but I now need to UPDATE the records because some of the data has altered slightly. What I need is essentially: UPDATE INTO EducationTbl SELECT * FROM EducationTbl IN 'C:\ProgramFiles\AMSRepUpdate.mdb'; but I do not know how to correctly write this? Any Help? Thanks in advance Momo I suggest a two step approach, eg: With DBEngine(0)(0) .Execute "DELETE * FROM Suppliers WHERE SupplierID IN (SELECT SupplierID FROM Northwind.mdb.Suppliers)" .Execute "INSERT INTO Suppliers SELECT * FROM Northwind.mdb.Suppliers" End With This may seem inefficient, but TTBOMK it's what databases do for an update anyway (that is mark for deletion and append). Momo666 wrote: > What I need is essentially: > UPDATE INTO EducationTbl > SELECT * > FROM EducationTbl IN 'C:\ProgramFiles\AMSRepUpdate.mdb'; > > but I do not know how to correctly write this? Look up help on update queries in Access help. You obviously come from a SQL writing background 8) but one of the nice things about Access with Jet is the query builder. It's a relatively easy way to construct queries and you can always switch to SQL view to see how Access constructs the Jet SQL after you put something together on the query design interface. -- Tim http://www.ucs.mun.ca/~tmarshal/ ^o< /...

MS Access VBA making multiple tables in database from a main table.
I have a database table called "tbl_personal" and struggling to VBA program a bit of code to create multiple tables in a database from the main "tbl_personal" table. In this case the 'color' column is the field I would like to look at. 1. Identify the number of unique records in column 'color' 2. For each color record that is label as red in the "tbl_personal" table, create a table called 'red' and populate with all red records in from the "tbl_personal" table. 3.Then move onto the next unique color and repeat the whole process again. 4. When all unique color tables are created in MS Access database end with a msg "batch process done" name surname age color country aa aaa 1 red UK bb bbb 10 green USA cc ccc 20 blue China dd ddd 30 red Germany ee eee 40 green France ff fff 1 blue Italy gg ggg 20 red Spain hh hhh 40 yellow Canada ii iii 34 black Italy =85 Is this doable automatically in MS Access? Many thanks. brenda Are you sure you want to do this? I would expect 3 tables vis: Table of Personel with PersonelID, Suname, FirstName, ColourID, CountryID & DateOfBirth (Age will be out of date next birthday and should be calculated), Table of Colours ColourID & Colour Table of Countries CountryID & Country. You can then use simple queries to return all the red people or people who live in UK. Am I missing something? Phil <bbcdancer@hotmail.com> wrote in message news:495c4ca6...

FE database not showing new table added to BE database
Hello All, I've checked around a little on Google (and this group) and have found info similar to what I'm trying to do (i.e., changes that were made in the BE's tables are not reflected in the FE database) and have heard suggestions using code, etcetera. But I need a bit more clarification please. What I'm doing/have done is this (MS Access 2007, FE stored on WXP clients, BE stored on a W2K3 server): My database has been split. A copy of the FE is on each user PC, the BE is stored in shared folder on the server. I've had to (don't ask why please, its one of those things where people don't spend enough time on their biz requirements up front and instead rush to start using a database) add a new table to the system. I added it in the BE file, but when I run the FE, it's not showing up (the other tables from the BE are showing as linked tables with the arrows). I've used the Linked Table Manager in the FE (which isn't available in the BE), but only see the original set of tables from my BE, no mention of the new table that I had to add to the BE. Which brings me to my question, the new table is there in the BE, but its now showing up in the FE's, how can this be accomplished? Is the only way to do this via coding? Rgds, Amit Open the FE. Click on Get External Data. Navigate to your BE and select the missing table. Click Link. You should now see the missing table in your FE. Steve <reelrave@gmail.com> wrote in messag...

Web resources about - To retrive a table from one database to and another database(same table) - comp.databases.ms-sqlserver

Database - Wikipedia, the free encyclopedia
... requiring information. For example, modelling the availability of rooms in hotels in a way that supports finding a hotel with vacancies. Database ...

Database - Wikipedia, the free encyclopedia
A database is an organized collection of data . The data are typically organized to model aspects of reality in a way that supports processes ...

Fearing no punishment, Denver cops abuse crime databases for personal gain
(credit: Noel Hidalgo ) Denver police officers performed searches on state and federal criminal justice databases that were not work-related ...

Open source database improves protection and performance
Most enterprises rely on databases in some form or another, but they can be vulnerable to attack from people looking to steal information. They ...

Larry Ellison shrugs off Amazon, Microsoft play for Oracle database business
... companies – Amazon (Nasdaq: AMZN) and Microsoft (Nasdaq: MSFT) – both made it easier for Oracle's (NYSE: ORCL) customers to move their databases ...

NTTC's Liquid Products Database making steady progress
NTTC's Liquid Products Database making steady progress Modern Bulk Transporter NTTC is asking carriers to suggest “proprietary blends” for ...

Amazon Web Services Announces that over 1,000 Databases Have Migrated to AWS since January 1, 2016
Amazon Web Services, Inc. (AWS), today announced that the AWS Database Migration Service is now generally available.

Taiwan launches database on areas vulnerable to quake damage
BEIJING (AP) — Earthquake-prone Taiwan is launching a database to inform residents which areas might be susceptible to creating potentially catastrophic ...

Interior Dept Spent $15 Million On A Crime Database That Doesn’t Work
Interior Dept Spent $15 Million On A Crime Database That Doesn’t Work

Microsoft's SQL database software now runs on Linux
Remember when Steve Ballmer likened Linux to cancer, and the notion of Microsoft courting the open source crowd was virtually unimaginable? The ...

Resources last updated: 3/22/2016 4:22:54 AM