Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Equvivalent code to Vfp Code
Message
From
25/10/2005 01:45:53
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
SQL Equvivalent code to Vfp Code
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01061749
Message ID:
01061749
Views:
51
Dear Experts,

I have vfp code like and 3 tables

1.SalOrd
2.Sales
3.Stock

The purpose is i have to retrieve the price from 'SalOrd' Table Based on the price column
in the stock table, if Stock.Price > 0 i want take the price from Stock table Else
i want to seek the value in the 'SalOrd' Table.

the Vfp code is like this

Select a.code,a.des, iif(a.price = 0, iif(seek a.Code),'SalOrd','OrdCode'),a.Qty*SalOrd.Price,0 ),0)
as price a.Disc From Stock a, sales b where a.itemno = b .Itemcode

How i will convert this to sql code ?

How will do it, pls help

Thanks in advance

Regards
Abdulla
Next
Reply
Map
View

Click here to load this message in the networking platform