> i have a text file with data like this:
>
> Student_ID Lic_No
> ---
> 333
> 444
> 555
>
> ... and so on.
>
> This is pure text file. In the database, I have a
> column called 'Student_ID'. I have created a new
> column called Lic_No in the database. I want to put
> the Lic_No info into the database.
>
> If I do it individually I would say:
>
> Update tbl_Student
> set Lic_No = ''
> where Student_ID = '333'
>
> But, it is going to be very painful to do it
> individually. I am sure there is an easy way. Can
> someone tell me how.
If you're going to do this from CF, you can read in the text file as a
variable, parse it as a list, then loop over the update:
UPDATE tbl_Student
SET Lic_No = '#ListFirst(i, " ")#'
WHEREStudent_ID = '#ListLast(i, " ")#'
However, you might do this using another tool instead of CF, if you can. For
example, if you can get the data to the database directly, you could parse
and import it within a stored procedure.
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444
--
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.