Sample sql

Previous topic - Next topic

Karthikkumark

Hi All,

Can anyone help me how to frame the sql for odwek.

Thanks,
Karthik k

kbsiva

Karthik - Not sure if I understand your question.

Karthikkumark

Hi Siva,

In odwek, we can get the result set by pass the sql.

method : odfolder.search(sql);

Shall i know the how to frame the sql. or please provide me the sample sql string.

I pass like this but i am getting error.

sql = "when policy number like %"

where
policy number is display name.
like operator( i also used the equalent int value)
% search value.

Thanks,
Karthik k

Justin Derrick

sql uses 'where' not 'when', and field names can't have spaces in them, and anything after the 'like' parameter must be in single quotes...

If you want to learn more about SQL, consider downloading and installing DB2 Express-C.

-JD.

Call:  +1-866-533-7742  or  eMail:  jd@justinderrick.com
IBM CMOD Wiki:  https://CMOD.wiki/
FREE IBM CMOD Webinars:  https://CMOD.Training/
IBM CMOD Professional Services: https://CMOD.cloud

Interests: #AIX #Linux #Multiplatforms #DB2 #TSM #SP #Performance #Security #Audits #Customizing #Availability #HA #DR

RHPharr

folder.setApplGroupForSearchWithSQL(appGrp);
searchResults = new ArrayList<ODHit>();
searchResults.addAll(folder.search("where doc_name like '" + docName + "%'"));