Thank you so much, Dick and Marius. It works.
Dick Applebaum wrote:
> Try:
>
> insert into address
> (name,phone,address)
>
> select name, phone,address from prod_address
>
> HTH
>
> Dick
>
> At 11:36 PM -0600 8/17/01, Nathan Chen wrote:
> >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/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists