473,231 Members | 1,643 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,231 software developers and data experts.

Copying table data from a different database

I am attempting to copy table data from our live production database to our development database. To do this, I need to specify the name of the database in addition to the table name. I'm running into some problems that I'm hoping are just syntax related. Here is a portion of the code that runs fine when I don't specify a database...

>> SELECT name,description FROM cec_cecil_permissions

And here is a portion of the code I'm trying to run that results in an error...

>> SELECT name,description FROM devsql01.cec_cecil_permissions

When I run this, I get the following error...

>> Invalid object name 'devsql01.cec_cecil_permissions'.

My first thought was that I need to specify the complete path to the table within the database, so I ran the following code...

>> SELECT name,description FROM devsql01.Databases.Intranet.Tables.cec_cecil_permi ssions

This resulted in the following error...

>> The object name 'devsql01.Databases.Intranet.Tables.cec_cecil_perm issions' contains more than the maximum number of prefixes. The maximum is 3.

I can't reduce the number of prefixes because I'd be leaving out part of the path to the table. I tried changing every "." to a "\" but that resulted in a syntax error...

>> Incorrect syntax near '\'.

What do I need to do to make this work? Thanks in advance for your help!
Sep 18 '06 #1
1 3369
Never mind. I realized I was putting the server name in instead of the database name.
Sep 18 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Jason | last post by:
In enterprise manager I am copying a table from one database to another. I am using the dts wizard to import the data. After I successfully import the data, I open both tables to compare the...
8
by: brian kaufmann | last post by:
Hi, I'm new to Access and this may be a basic question but I would appreciate it if you could let me know how to do this: I've created an Access table and would like to insert a column with...
2
by: Bob | last post by:
How do I program vb.net to copy a query or table from one MS Access database to another? I'd like to accomplish what import does when it copies Access objects (primarily queries but some tables)...
4
by: zMisc | last post by:
Is it possible to copy a table from one schema to another schema by just copying the frm file to the directory for the new schema? What is the best way to create a new database with all the...
0
by: berwiki | last post by:
I am trying to copy a table to another SQL 2000 Database, but I continually get errors. When I right-click, choose All-Tasks, Export-Data and go through the DTS settings, I get an 'Unspecified...
5
by: ozzii | last post by:
Hi I am using the following code to copy data from one database table into another database table: SELECT * INTO Products From exportdb.mdb.exporttable However the query simply deletes...
5
by: mark_aok | last post by:
Hi all, I have a situation where I have a split database. At the back end, I need to - create a new table (I will call it newTable) with the exact fields, and relationships as another table...
2
by: troy_lee | last post by:
What is the best way of copying all the records from a linked table into a replica table that is local on my computer? This is for development work at home where I can not access the main table. Is...
15
by: Michiel Rapati-Kekkonen | last post by:
my understanding is that you can copy a backend on condition that all recordsets are closed. But it is not what I experience. Is there a way to find out what keeps the backend connected? (maybe I...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...

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.