>I am tring to get a record set out of an AS400 database using SPT. I need to filter on a field that holds a job number.
>
>My trouble is the AS400 field was set up to use a "-"(Dash) in the string. I automaticatlly gets inserted into the fourh place of the string. Example:
>MES-5350. This is a carry-over from a former type of job number. Our job numbers today don't have dashes in them but the AS400 database hasn't been nor probably won't be changed. So when the job number is entered and someone mistakingly adds a dash the jobnumber can look like this MES--5350.
>
>My desire is to query the record for a specific job number with SPT stripping out any dashes to do my comparison.
>
>This will not work s I need some help:
>dwgListString = "Select dm_drawing_number, dm_files3 From drawmstrp Where StrTran(drawmstrp.dm_job_order,'-','') = '" + jobnumber + "'"
I am not a very familiar with AS400 but in t-SQL there is a REPLACE() function, Is there such a function in AS400?
something like:
dwgListString = "Select dm_drawing_number, dm_files3 From drawmstrp Where REPLACE(drawmstrp.dm_job_order,'-','') = '" + jobnumber + "'"
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.