>I have a view with 4 parameters. If only one of the parameters has a value, what do I fill the other parameters with so that I get back records that match the one parameter I have? For instance, if my view parameters are vp_idnum, vp_last, vp_first & vp_middle and I only have a value in vp_idnum, how do I keep from getting back all the records in the table (because the other parameters have "")? Also, if vp_last contains only "A", how do I get back all records that have last name beginning with "A"?
Try something like this:
CREATE SQL VIEW vCustomer AS ;
SELECT * FROM customer WHERE cu_fname LIKE ?m.fname AND cu_lname LIKE ?m.lname
To find all the customers that begin with 'A':
fname = "A%"
lname = "%"
USE vCustomer IN 0
The '%' is the ANSI wildcard character that matches zero or more characters.
-Mike