You don't need the keyword values unless you are specifically specify them

insert into address   (name,phone,address)
select name, phone,address from prod_address

Marius Milosav
www.scorpiosoft.com
It's not about technology, it's about people.
Virtual Help Desk Demo (VHD)
www.scorpiosoft.com/vhd/login.cfm

----- Original Message -----
From: "Nathan Chen" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Saturday, August 18, 2001 1:36 AM
Subject: OT: another sql syntax


> Hi, There,
> Can someone show me how do this simple task?  I need to copy data from
> one table to another. The SQL Server book I have gives me an example
> that doesn't work. It says
> insert into address
>     (name,phone,address)
>     values (select name, phone,address from prod_address)
> I run it but the error message points to the select query.
>
>  I know you can declare variables and store the result of the select
> query in them, then insert into the table.
> Does anyone know this? I am using SQL Server 7.0 and I want to run it
> from Query Analyzer, not cfm page.
> Thanks a lot.
>
>
> Nathan Chen
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to