Glad it helped, Bret!  [?]

Rick

On Thu, Apr 23, 2009 at 2:41 PM, Bret McDermitt <[email protected]>wrote:

>
> Rick's the man. Worked like a charm.
>
> >What database are you using, Bret?
> >
> >I use MySQL 5 and I import MLS data from two different MLS's every day,
> >but I use SQL to do it in a cfquery, rather than CFML only.  Very, very
> fast
> >this way.
> >
> >For example, after downloading all the data from one of the MLS sites,
> >I first run a cfdirectory function on the folder that has the files:
> >
> ><cfdirectory
>
> >directory='e:\inetpub\webroot\real_estate_data\smlc\daily_downloads\text_files\#today#'
> >                      action = 'list'
> >                      type = 'file'
> >                      name='filelist'>
> >
> >Then I loop over the filelist and process the various delimited text
> files:
> >
> ><cfloop query="filelist">
> >
> >     <cfquery name="load_data" datasource="#application.dsn#">
> >
> >          load data infile
>
> >'e:\inetpub\webroot\real_estate_data\smlc\daily_downloads\text_files\#today#\#name#'
> >
> >          <cfif #name# contains 'ACR'>
> >               into table smlc_acr_temp
> >          <cfelseif #name# contains 'COM'>
> >               into table smlc_com_temp
> >          <cfelseif #name# contains 'LOT'>
> >               into table smlc_lot_temp
> >          <cfelseif #name# contains 'MUL'>
> >               into table smlc_mul_temp
> >          <cfelseif #name# contains 'OFF'>
> >               into table smlc_off_temp
> >          <cfesleif #name# contains 'REN'>
> >               into table smlc_ren_temp
> >          <cfelseif #name# contains 'RES'>
> >               into table smlc_res_temp
> >          </cfif>
> >
> >          fields terminated by '|'
> >          lines terminated by '\r\n'
> >
> >     </cfquery>
> >
> >That gets all the data from the MLS text files and into
> >my database.  From there, I run further queries to extract
> >just the columns of data that I want to use on a client's site
> >and insert that data into my final production database tables.
> >
> >If you're not using MySQL 5, then perhaps your database has
> >something equivalment to "load data infile".
> >
> >hth,
> >
> >Rick
> >
> >
> >
> >
> >On Sun, Apr 19, 2009 at 12:52 PM, Bret McDermitt <[email protected]
> >wrote:
> >
> >>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:321895
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to