All messages should be posted in plain text. HTML will be converted to
attachments. The meditech-l web site is MTUsers.com
======================================
Locate/Length Function
This function serves two purposes. When two arguments are defined, the
locate/length function allows you to search a string for a particular
character or sub-string. If the character or sub-string is found, the
function returns the position number at which the character or
sub-string was found. If the character or sub-string is not found, the
function returns the length of the string being searched. When only one
argument is defined, the function returns the length of that argument
(the length of the string). These two formats can be combined with the
string extraction operators.
If the value of @name = Smith,Tom
Example Result Returns
L(@name) 9 The length of the 1
argument
L(@name,"T") 6 The position in the first
argument
where it first finds the
second
argument
L(@name,"X") 9 The length of the first argument
since it cannot find the
second
argument within it
@name$L(@name,"," SMITH All Characters to the left of the
position where it first
finds a comma
Using the definition and examples above, you could do the following:
VAL=IF{L(@PP.PER.ss.number,"401")'=L(@PP.PER.ss.number) "FOUND";"NOT
FOUND"}
Thank you,
Mitch Lawrence
Senior Applications Analyst - Advanced Report Writer
General Financials Support
CHRISTUS Information Management
Tel 361.881.3408 Fax 361.888.6117
Mob 361.549.8456
[EMAIL PROTECTED]
If someone has "Made your day", send them a Spirit Buck!
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Davison, Regina
Sent: Wednesday, March 01, 2006 2:43 PM
To: [EMAIL PROTECTED]
Cc: [email protected]
Subject: [MEDITECH-L] NPR Question-Search a specific field for a string
ofdata-Please Post
All messages should be posted in plain text. HTML will be converted to
attachments. The meditech-l web site is MTUsers.com
======================================
Is there a quick/easy way to search a data field for a string of
characters if you don' t know what position in that field that the
string begins in? For instance, if I wanted to search the
PP.PER.ss.number field for "401" how is the best way to do that, without
knowing what posiiton that the 401 resides in?
Regina Davison
Financial Systems Specialist
Murray-Calloway County Hospital
Phone: 270 762 1273
Fax: 270 762 1332
[EMAIL PROTECTED]
Visit us on the web at <http://www.murrayhospital.org>
NOTICE: This message originates from Murray-Calloway County Hospital
(MCCH) and contains information that may be confidential or privileged
and is intended only for the individuals or the entity named above. It
is prohibited for anyone else to disclose, copy, distribute or use the
contents of this message. This message may not be copied or distributed
without this disclaimer. All personal messages express views solely of
the sender, which are not to be attributed to MCCH. If you received this
message in error, please notify us immediately at
[EMAIL PROTECTED]
_______________________________________________
meditech-l mailing list
[email protected]
http://mtusers.com/mailman/listinfo/meditech-l
_______________________________________________
meditech-l mailing list
[email protected]
http://mtusers.com/mailman/listinfo/meditech-l