CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: DBI:
Update-Problem with flat-ASCII and mysql


New User

Feb 6, 2012, 1:25 AM

Post #1 of 1 (26558 views)
Update-Problem with flat-ASCII and mysql Can't Post

Hi there,
I have a special type of flat-ascii file, where all data are written one after another. My perl-scills are very basic, but I tried my best to create a script.

with the "insert-part" everything work, but there is no check if the dataset is already in. I don't know how to manage this. If I load the script twice, I have dublettes in.

In the update-part I have 3 states of possiblities:
1) change of datafield
2) datafield is empty - new insert
3) datefield will be deleted to NULL
It seemes 1) and 2) work but 3) has an error in the SQL-String

UPDATE "adress" SET where Key_adr =5648
cause the value is missing after SET

Has anyone an idea?

I attach 2 scripts, one to create a db, and another for the update and a sample ascii-file.
I'm lucky about every hint

Attachments: (104 KB)


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives