I just found my cursors example, which I would CERTAINLY rewrite, cause
I do this in MS SQL now with a one liner:
WRITE 'in p_addr1 and g_addr1, and moving to 2nd addr slot.' AT 6 5
SELECT COUNT(*) INTO vtest FROM patient WHERE p_addr1 LIKE '% APT %'
IF vtest >= 1 THEN
DECLARE c1 CURSOR FOR SELECT p_addr1 FROM patient +
WHERE p_addr1 LIKE '% APT %' OR p_addr1 LIKE '% APT%'
OPEN c1
FETCH c1 INTO vrepl INDICATOR vp_addr1
WHILE SQLCODE <> 100 THEN
SET VAR vrloc = (SLOC(.vrepl,'APT'))
SET VAR vrlen = (SLEN(.vrepl)) - .vrloc + 1
SET VAR vaddr2 = (SGET(.vrepl,.vrlen,.vrloc))
SET VAR vllen = .vrloc - 2
SET VAR vaddr1 = (SGET(.vrepl,.vllen,1))
UPDATE patient SET p_addr1 = .vaddr1, p_addr2 = .vaddr2 +
WHERE CURRENT OF c1
FETCH c1 INTO vrepl INDICATOR vp_addr1
ENDWHILE
DROP CURSOR c1
WRITE 'Fixed',.vtest,'APT occurrences.' AT 7 5
CLEAR VAR vtest, vrepl, vp_addr1, vrloc, vrlen, vaddr2, vllen, vaddr1
ENDIF
On 09/28/2010 08:55 AM, [email protected] wrote:
>
>
> I AM USING RBASE FOR WINDOWS 7.1 AND NEED TO TAKE AN ADDRESS COLUMN
> AND FILL TWO ADDITIONAL COLUMNS ONE COLUMN WITH ONLY THE STREET NUMBER
> (106) AND ONE COLUMN WITH THE STREET (MAIN). IS THIS POSSIBLE???
>
> THANK YOU,
>
> DAVID
--
John Croson
IT Manager
Integrated Healthcare Business Solutions, Inc.
9875 S. Franklin Drive
Franklin, WI. 53132
Tel: 414.858.2209
[email protected]
http://www.ihbsonline.com
*E-MAIL CONFIDENTIALITY DISCLAIMER:* This message is confidential, and
may contain highly sensitive information that is intended only for the
named recipient(s), which is privileged or exempt from disclosure under
applicable laws. If this e-mail has reached you in error, you are
notified that the dissemination, distribution or copying of this message
is strictly prohibited. If such is the case, please notify the sender
via e-mail address or telephone number (414) 858-2203 and destroy this
document immediately.