![]() | |
![]() |
| | Thread Tools | Display Modes |
#11
| |||
| |||
|
#12
| |||
| |||
|
#13
| |||
| |||
|
|
Joe, Also note... if a transaction history has been established for one of these items... such as "16L0A1061A"... then your historical reporting will be all wrong.. because the sales data was based on that item number. Your inventory values and totals will be all wrong too. Typically, it should be impossible to delete an inventory item once a transaction on it has occurred... such as purchase or sale. Doing so will effect the entire system. If you change the item number, it will also have to be changed on every invoice, sales reciept, historical report, etc., etc., etc... That is whay it is illadvised. If a customer would bring one of these items back for a refund, their reciept will no longer have a valid item listed on it. |
#14
| |||
| |||
|
#15
| |||
| |||
|
|
I suspect this can't be done, but who knows? I've got a field that should contain only UPC numbers, but the raw data file often contains quite a few erroneous alpha chars. They're just a visual annoyance for the viewer, but it would be nice to get rid of them. Is there a way to do this with a query, or would I need to scan the table with a script that hunts for ascii values within a certain range? I'm using PdoxDOS 4.x. |
#16
| |||
| |||
|
|
perhaps you can translate into Pdox 4 |
|
You can use a scan and chr() to determine whether a character is to be removed. The following script, where "thestr" is the sample value, will remove all non numerical characters regardless of where they are located in the string. Also removed are symbol characters. It involves a pair of FOR loops. One to remove the Low and one to remove High ascii characters. It is written in pdox for windows, perhaps you can translate into Pdox 4 -- or maybe someone else can. method run(var eventInfo Event) var sval,cv smallint i longint thestr string endvar thestr = "!!FRHabd1155mLOz99ssZXS~" ignoreCaseInStringCompares (No) cv=58 ;REMOVE HIGH CHARS for i from 1 to 69 while(true) sval=thestr.search(chr(cv)) if sval=0 then quitloop endif if sval<thestr.size() then thestr=thestr.substr(1,sval-1)+""+thestr.substr(sval+1,255) else thestr=thestr.substr(1,sval-1) endif endwhile cv=cv+1 endfor thestr.view("High chars eliminated") ;REMOVE LOW CHARS cv=33 for i from 1 to 15 while(true) sval=thestr.search(chr(cv)) if sval=0 then quitloop endif if sval<thestr.size() then thestr=thestr.substr(1,sval-1)+""+thestr.substr(sval+1,255) else thestr=thestr.substr(1,sval-1) endif endwhile cv=cv+1 endfor thestr.view("Low chars eliminated") ignoreCaseInStringCompares (No) endMethod Good luck with this. Randy On Mar 30, 7:26?am, "JoeSpareBedroom" <dishborea... (AT) yahoo (DOT) com> wrote: I suspect this can't be done, but who knows? I've got a field that should contain only UPC numbers, but the raw data file often contains quite a few erroneous alpha chars. They're just a visual annoyance for the viewer, but it would be nice to get rid of them. Is there a way to do this with a query, or would I need to scan the table with a script that hunts for ascii values within a certain range? I'm using PdoxDOS 4.x. |
#17
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |