I've created the following sql statement, every thing in $() is a variable (comes from the module we're using on our site so $(varname) is the right format in this case, not @varname.
It keeps telling me there's an error near THEN... how am I supposed to format this properly?
IF ($(Shiptobilling) = 'yes') THEN
BEGIN
CardOrder_Add $(UserID), $(Firstname), $(Lastname), $(BillStreet1), $(BillCity), $(BillState), $(BillCountry), $(BillZip), getdate(), $(ExpiryDate)
END
ELSE
BEGIN
CardOrder_Add $(UserID), $(Firstname), $(Lastname), $(ShipStreet1), $(ShipCity), $(ShipState), $(ShipCountry), $(ShipZip), getdate(), $(ExpiryDate)
END
Thanks,
Matt