Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Changing a String in SPT Statement
Message
 
 
To
11/05/2005 17:25:10
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 6
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01013173
Message ID:
01013180
Views:
18
Steve,

If you cannot strip "-", add one extra.
dwgListString = [Select dm_drawing_number, dm_files3 From drawmstrp ] + ;
  [ Where drawmstrp.dm_job_order ='] + jobnumber + ['] ;
  [    OR drawmstrp.dm_job_order ='] + STRTRAN(jobnumber, "-", "--") + ['] 
>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 + "'"
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform