naming the queries the same is liable to cause problems... I'd also
recommend using <cfqueryparam cfsqltype="cf_sql_varchar"
value="#ValueList(GetAlias.env_var)#"> -- use cf_sql_longvarchar if the
values of the files may be more than about 8000 characters.

> <cfquery name="GetAlias" datasource="data1" dbtype="ODBC">
>       SELECT      env_var
>       FROM        data1
> </cfquery>
> <cfquery name="GetAlias" datasource="data2" dbtype="ODBC">
>       INSERT INTO DATABASE2TABLENAME
>       (
>               STRVAR
>       )
>       VALUES
>       (
>               '#GetAlias.env_var#'
>       )
> </cfquery>

> ============================================
> Bryan F. Hogan
> Director of Internet Development
> Macromedia Certified ColdFusion MX Developer
> Digital Bay Media, Inc.
> 1-877-72DIGITAL
> ============================================

> -----Original Message-----
> From: FlashGuy [mailto:flashmx@;rogers.com]
> Sent: Tuesday, October 29, 2002 12:13 PM
> To: CF-Talk
> Subject: Reading database and inserting fields into another database


> HI,

> I need to read in the field "env_var" from one database ("data1") and
> insert
> the results into another database as a comma-delimited text.

> <cfquery name="GetAlias" datasource="data1" dbtype="ODBC">
>       SELECT      env_var
>       FROM        data1
> </cfquery>

> Output example:

> file1 file2 file3 file4 file5 etc...

> Insert results of GetAlias.env_var into database ("data2") into field
> "strVar" as a comma-delimited field.

> strVar = "file1,file2,file3,file4,file5,etc...

> Can I do this with just



> ---------------------------------------------------
> Colonel Nathan R. Jessop
> Commanding Officer
> Marine Ground Forces
> Guatanamo Bay, Cuba
> ---------------------------------------------------




> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

Reply via email to