Thanks Barry.  Could just do a loop, as hoping to do one big insert but you 
don't seem to be able get data form one datasource and insert into another, in 
the same cfquery.

Brian Knott 
ext 31221


-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of 
Barry Beattie
Sent: Wednesday, 22 July 2009 10:35 AM
To: [email protected]
Subject: [cfaussie] Re: Inserting Queries


Hi Brian

queryInMomory (sic: "momery"?) has multiple rows, yes?

if so, anything wrong with a loop over the in-memory query doing
individual db inserts for each loop iteration?

the thing to keep in mind is that the in-memory query is nothing more
than a CF memory data structure, not a db query, view or table.
basically a struct of arrays.

in other words, two different "layers", you need to take the data out
of the "CF layer" (in-memory query) and put it into the "db layer"
(inserts into db tables)

just a thought
barry.b








On Wed, Jul 22, 2009 at 10:21 AM, KNOTT,
Brian<[email protected]> wrote:
> Guys having a slow brain day.
>
> I have a query that I have created from code using the QueryNew command.
>
> I now want to insert this into a database, something like
>
> <cfquery name="data" datasource="SQLServer">
> INSERT INTO databaseTable
> SELECT Title, title as Modelname, ModelPath, ModelEmailString,
> CubePublishPath, PPESPublishPath, ModelUserSecurity,
> ModelBuildExtraCommandsPre, ModelBuildExtraCommandsPost, BuildLevel,
> BusinessName, Duration, Keywords, NotifyStatus, MajorGrouping,
> MinorGrouping, ModelLabel, Frequency, Status, PrimaryMDC, ItemType, Path
> FROM queryInMomory
> </cfquery>
>
> Thanks
>
> Brian Knott
> Software Engineer (COGNOS Developer) | MIS Front End | Banking & Life MIS
> ext 31221 ph 07 3333 1221
>
>
>   ________________________________
> This e-mail is sent by Suncorp-Metway Limited ABN 66 010 831 722 or one of
> its related entities "Suncorp".
> Suncorp may be contacted at Level 18, 36 Wickham Terrace, Brisbane or on 13
> 11 55 or at suncorp.com.au.
> The content of this e-mail is the view of the sender or stated author and
> does not necessarily reflect the view of Suncorp. The content, including
> attachments, is a confidential communication between Suncorp and the
> intended recipient. If you are not the intended recipient, any use,
> interference with, disclosure or copying of this e-mail, including
> attachments, is unauthorised and expressly prohibited. If you have received
> this e-mail in error please contact the sender immediately and delete the
> e-mail and any attachments from your system.
> If this e-mail constitutes a commercial message of a type that you no longer
> wish to receive please reply to this e-mail by typing Unsubscribe in the
> subject line.
>
> >
>



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to