Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using IF with LIKE
Message
From
14/10/2014 15:26:03
 
 
To
14/10/2014 14:50:51
Luis Santos
Biglevel-Soluções Informáticas, Lda
Portugal
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 8.1
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Desktop
Miscellaneous
Thread ID:
01609335
Message ID:
01609346
Views:
46
Luís, make sure bi.ref value is really what you're expecting (and the cursor is not EOF(), for instance).
CREATE CURSOR bi (ref C(20))

INSERT INTO bi (ref) VALUES ('0.600/1182')
GO TOP

IF LIKE('0.600/*', bi.ref)
	MESSAGEBOX("True: " + bi.ref)
ELSE
	MESSAGEBOX("False: " + bi.ref)
ENDIF

SKIP

IF LIKE('0.600/*', bi.ref)
	MESSAGEBOX("True: " + bi.ref)
ELSE
	MESSAGEBOX("False: " + bi.ref)
ENDIF
>Hello comunity
>
>I need help about using na IF condition with LIKE
>
>for exemple on my code i have:
>IF LIKE('0.600/*',bi.ref)
> replace qtt with 1
>ELSE
>return
>ENDIF
>
>Note the field bi.ref = '0.600/1182'
>the problem is my IF with LIKE never work and i don´t know how to solve this problem.
>
>Many thanks,
>Luis Santos
----------------------------------
António Tavares Lopes
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform