|
Posted by Ian Robinson on 09/29/09 11:42
Yes, that's a sort of option except that all the records in this field
contain a variety of chars other than "ERR******". I could find/replace "R
A"/"A", then "B" and so on. Cannot simply find/replace "R "/"" since I would
loose values from other fields such as "DEFENDER 90"/"DEFENDE90".
I am moving a desktop application written in delphi and using paradox tables
to the web with PHP and MySql. I have all the data manipluation routines
written for Delphi but I would like to import directly into MySql from the
file I'm supplied with. I'm supplied with 4 others on a monthly basis and
manually tidying them all is an additional chore. Since 'LTRIM' is an SQL
function I *should* be able to get it to work and if I can then on going
admin when the application is web based will be better facilitated.
Thanks for your input
Ian
"strawberry" <zac.carey@gmail.com> wrote in message
news:1142523595.980637.80480@v46g2000cwv.googlegroups.com...
> Just a thought - why not find/replace "R ERR"/"ERR" prior to importing
>
>
> Ian Robinson wrote:
>> Hi,
>>
>> A newbie to php and mySql so please bear with me.
>>
>> I have imported some data into a table but the first field has a leading
>> "R
>> " which I need to trim off all 4,000 records.
>>
>> Typically the field content is "R ERR3340" and I need to modify this
>> value
>> to be "ERR3340"
>>
>> I have tried
>>
>>
>> UPDATE part_num,
>> LTRIM( part_num, "R " ) FROM `source_premier`
>>
>>
>> to no avail
>>
>> TIA
>> Ian
>
Navigation:
[Reply to this message]
|