SQL help

J

JB

can you use if , then statements with the frontpage 2002
database results.
If so can someone please tell me why this is not working?

IF :):Category:: = 'ALL') THEN SELECT * FROM Inventory
WHERE QTY > '0'
ELSE
SELECT * FROM Inventory WHERE (Category = '::Category::')
AND QTY > '0'
END IF
 
J

Jens Peter Karlsen [FP MVP]

If the QTY column is a number format, then remove the '' around the 0.

Regards Jens Peter Karlsen. Microsoft MVP - Frontpage.
 
M

MD WebsUnlimited.com

Hi JB,

Not directly like you've shown it. Instead you need to modify the ASP code
produced to change the FP_QRY variable.

If you have fp_sQry="SELECT * FROM Customers WHERE (CustomerID =
'::CustomerID::')"

Then you'll need to write code to change the above in the fpdbrgn1.inc file.
 
Top