Hi,
I need help with writing where clauses for a view. Here is a sample...
How do I construct a where clause for a view like this to select,
1. all rows where full_name contains 'Chris' or full_name contains 'Mike' full_name contains 'Andy' and in any order? I see the =, ==, <>, like, and other operators, but not a contains ($) operator. I also saw the "field IN (value1, value2, and value3)" form, but that stops evaluating after 1st hit, so that won't work.
2. should the view be created above the dowhile loop while iterating a table? If so, what part of the view do I need to change while iterating (changing the parameter's values) then requery().
3. Are the syntax and commands used for the where construction SQL, VFP or mixed?
4. Is it acceptable and efficient to delete the view and recreate everytime something changes about it, like any of the where clause stuff?
Thanks,
Stanley
I need help with writing where clauses for a view. Here is a sample...
Code:
lcWord1 = 'Chris'
lcWord2 = 'Friley'
lcWord3 = 'Stanley'
Create Sql View 'rv_MailingList' Connection AppData ;
AS Select company_name, full_name, address1, address2, city, state, postal_code, county_name, pk ;
From MailingList ;
WHERE full_name ????????
How do I construct a where clause for a view like this to select,
1. all rows where full_name contains 'Chris' or full_name contains 'Mike' full_name contains 'Andy' and in any order? I see the =, ==, <>, like, and other operators, but not a contains ($) operator. I also saw the "field IN (value1, value2, and value3)" form, but that stops evaluating after 1st hit, so that won't work.
2. should the view be created above the dowhile loop while iterating a table? If so, what part of the view do I need to change while iterating (changing the parameter's values) then requery().
3. Are the syntax and commands used for the where construction SQL, VFP or mixed?
4. Is it acceptable and efficient to delete the view and recreate everytime something changes about it, like any of the where clause stuff?
Thanks,
Stanley