Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How i will retrive data based variable condition
Message
 
 
To
04/06/2005 07:44:36
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01020224
Message ID:
01020231
Views:
14
>Hi Experts,
>
>I have an sql Query statement, i want retrive data based on condition like
>
>cCod = '1'
>cBranch = 'Brn1'
>
>IF Thisform.Check1.Value = 1
> cCondition = 'ItmMast.ItemCod = cCod'
>Else
> cCondition = 'ItmMast.ItemBrn = cBranch'
>Endif
>
>'Select ItmCod, ItmDes From ItmMast Where cCondition'
>
>How i will i convert this to an Sql Server statement.
lcSQL = 'Select ItmCod, ItmDes From ItmMast Where' + cCondition
SQLExec( ...., lcSQL )
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform