Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help in Retrieve and Filter syntax for Multiple Database/Columns

Status
Not open for further replies.

marvin2010

Programmer
Mar 5, 2010
35
PH
Can someone please give me a format of a filter string that will have access to multiple database and tables?

I am to access 2 database and several tables to come up with a single report. I need to filter out some columns as the program needs to be able to allow the user to select if he wishes to include all or just a specific category (say, city).

I will have retrieval arguments. So my dw_retrieve will be dw_retrieve(arg1, arg2,...).

Can someone show me the correct format with example on how to go about this?

thanks...
 
The filter is applied to the datawindow object, regardless of the source of the data. Generally filtering is done:
Code:
integer li_rc
long ll_rows
string ls_filter, ls_city

ls_city = ....//however you get the value

ls_filter = "city = '" + ls_city + "'"

li_rc = dw_retrieve.setfilter(ls_filter)
ll_rows = dw_retrieve.filter()// apply the filter
// to remove the filter
dw_retrieve.setfilter('')
dw_retrieve.filter()

Matt


"Nature forges everything on the anvil of time"
 
Hi Matt,

A follow-up question re this...

In the format you gave,

"ls_filter = "city = '" + ls_city + "'"

is it possible to get the first three characters of the ls_city and that all records matching that will be filtered out?

Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top