Hi,
Here is my assumption for your scenario. Lets say datasource1 is for
database A, and the other datasource2 is for database B.
If you want to copy a table from datasource1 to datasource2, I would do this
in SQL Server(I dont know what db you are using)
<cfquery datasource="#dsn#"
select * into B..testdummy
from A..testdummy
</cfquery>
I havent done this in CF, but I do this a lot in Query Analyzer. Helps me
create a table with same definition/structure in another database. If you
dont want to import data, then you can add a where clause like this
WHERE 1 = 2, and this way you will have table created without any rows in
it.
I Hope it helps.
Ajas.
On 7/13/07, Tepfer, Seth <[EMAIL PROTECTED]> wrote:
What is the quick and easy way to copy a table from one data source to
another? The table structure exists, it's just empty.
I was thinking of doing some SQL like:
INSERT INTO carrierLanesCopy
SELECT carrierLanes.*
FROM carrierLanes;
But then I realized there is no reference to DS in the query itself.
Stupid. I don't want to have to loop over each line of the table, reading
and writing. There has to be a better way, right?
seth
-------------------------------------------------------------
Annual Sponsor - Figleaf Software <http://www.figleaf.com>
To unsubscribe from this list, manage your profile @
http://www.acfug.org?fa=login.edituserform
For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by FusionLink <http://www.fusionlink.com>
-------------------------------------------------------------
--
<Ajas Mohammed />
http://ajashadi.blogspot.com
No matter what, find a way. Because thats what winners do.
You can't improve what you don't measure.
-------------------------------------------------------------
Annual Sponsor FigLeaf Software - http://www.figleaf.com
To unsubscribe from this list, manage your profile @
http://www.acfug.org?fa=login.edituserform
For more info, see http://www.acfug.org/mailinglists
Archive @ http://www.mail-archive.com/discussion%40acfug.org/
List hosted by http://www.fusionlink.com
-------------------------------------------------------------