Bill VERY cool- I look forward to trying it!
David BLocker ----- Original Message ----- From: "Bill Downall" <[EMAIL PROTECTED]> To: "Sami Aaron" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, June 11, 2002 1:06 PM Subject: Re: Removing blank from data > Sami, > > My apologies for expecting you to do the work for me. > > Here. Your job is the debugging. I didn't do that part yet. > > With this, you should be able to: > > SELECT COUNT(*) INTO vcount FROM table + > WHERE (call KeepNum(columnname)) = .vtest > > or even: > > UPDATE tablename + > SET columnname = (CALL KeepNum(columnname)) + > WHERE (columnname <> (CALL KeepNum(columnname)) > > Bill > ======================================= > *( > Return same string with all non-numeric characters removed > > (CALL KeepNum(TextValue)) > > To store this: > SET PROC KeepNum LOCK ON > PUT KeepNum.prc AS KeepNum + > pKN_InputText TEST (48) + > RETURN TEXT (48) + > 'Strip non-numeric characters from a string' > ) > CLEAR VAR Microrim_Return > > SET VAR pKN_ReturnText TEXT = NULL > IF pKN_InputText IS NULL THEN > goto lbExit > > SET VAR pKN_StringLen = (SLEN(.pKN_InputText)) > SET VAR pKN_Counter = 1 > WHILE pKN_Counter <= pKN_StringLen THEN > SET VAR pKN_Char = (SGET(.pKN_InputText, 1, pKN_Counter)) > IF '0123456789' CONTAINS .pKN_Char THEN > SET VAR pkn_ReturnText = (.pKN_ReturnText + .pKN_Char) > ENDIF > SET VAR pKN_Counter = (.pKN_Counter + 1) > ENDWHILE > > LABEL lbExit > CLEAR VAR pKN_Counter, pKN_StringLen, pKN_Char > > RETURN .pKN_REturnText > > ====================== > > > On Tue, 11 Jun 2002 10:50:06 -0500, Sami Aaron wrote: > > >I want to be able to issue the command: > > > >SELECT COUNT(*) INTO vcount FROM table WHERE (format > (columnname,something, > >something)) = .vtest. > > > >example: SELECT COUNT(*) INTO vcount FROM table WHERE > 00051334944 = > >00051334944 > > > > > > > > ================================================ > TO SEE MESSAGE POSTING GUIDELINES: > Send a plain text email to [EMAIL PROTECTED] > In the message body, put just two words: INTRO rbase-l > ================================================ > TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED] > In the message body, put just two words: UNSUBSCRIBE rbase-l > ================================================ > TO SEARCH ARCHIVES: > http://www.mail-archive.com/rbase-l%40sonetmail.com/ > ================================================ TO SEE MESSAGE POSTING GUIDELINES: Send a plain text email to [EMAIL PROTECTED] In the message body, put just two words: INTRO rbase-l ================================================ TO UNSUBSCRIBE: send a plain text email to [EMAIL PROTECTED] In the message body, put just two words: UNSUBSCRIBE rbase-l ================================================ TO SEARCH ARCHIVES: http://www.mail-archive.com/rbase-l%40sonetmail.com/
