I agree with Jean,
Lookup() doesn't move the record pointer. In fact I have used it in a sql 
statement to define a field using icase(). That may well be the way to 
accomplish what you are doing - or is the reason you need the case because you 
are involved in lots of inline code

Dave



-----Original Message-----
From: ProFox [mailto:profox-boun...@leafe.com] On Behalf Of Allen
Sent: 20 January 2015 14:01
To: profox@leafe.com
Subject: using select in a case

Hi Foxgang

I have a need in a case to read a field and select case depending on the result.
Normally I would just make a UDF and locate and return the field value.
I am wondering though if there is a simple way avoiding extra methods.

Example

Case GetVal(2) = 6


Function GetVal
LParameters LookFor
Select MyTable
Locate for Field1 = LookFor
Return Field2

Simplified but the idea is there.

I'm wondering if the case can handle that in the line rather than the separate 
proggy.

Sort of case select Field2 from MyTable where Field1 = 2 = 6

Al


---
This email is free from viruses and malware because avast! Antivirus protection 
is active.
http://www.avast.com


[excessive quoting removed by server]

_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/18725b8cd2d5d247873a2baf401d4ab2468ad...@ex2010-a-fpl.fpl.LOCAL
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to