This content has been marked as final. Show 4 replies
One issue is that in your final query, the input values are not matched, you have 7 fields but 8 values
So, assuming that in your version the struct value is the extra value, and assuming that the box_number is a unique value you should be able to do this...
SELECT item_type ,
(select b.box_id from box_detail b where ird.box_number = b.box_number) AS box_id,
FROM ImportRITSData ird
If you join the tables, you should be able to do it all in one query.
> This isn't a tough thing to do normally but this is a little abnormal.
> Basically I am migrating about 1.5 million records from a single table data
> dump into a relational database.
Just to cut you off @ the pass a bit... CF is not the right tool for the
job here. Try to get all this done on the DB server itself. None of your
CF code suggests there's anything going on that couldn't be better handled
but the DB.
CF excels @ doing quick DB queries to build web pages, but it's pretty
shite at coping with large record sets. You could monkey around splitting
the process across multiple requests and forcing GC and what not, but... if
you're manipulating data, use the right tool for the job: the database.
Thanks for all the help out there!!! I did forget to take out the Box_number from my third query before I posted it... that was just part of me playing around. But the nested sub query did what I needed it to do perfectly. Thanks again!!!
Have an Ordinary Day...