This discussion is archived
1 2 Previous Next 16 Replies Latest reply: Mar 10, 2010 11:49 AM by mikereiche Go to original post RSS
  • 15. Re: Search Functionality
    718594 Newbie
    Currently Being Moderated
    its not top secret...its just that, Im not in office @ this hour.. :)

    Code:

    declare function tns:getData($inp as xs:string?, $inp1 as xs:string?) as element(ns1:Emp){*
    for $PLOC in pre:PLOC()
    where

    fn-bea:sql-like(fn:upper-case($PLOC /LOCATIONSEQ), $inp) or fn:empty($inp)

    where
    fn-bea:sql-like(fn:upper-case($PLOC /LOCNAME), $inp1) or fn:empty($inp1)



    return
    *<ns1:Emp>*
    *<ns1:LocId>{fn:data($PLOC /PID)}</ns1:LocId>*
    *<ns1:LocSeq>{fn:data($PLOC /LOCATIONSEQ)}</ns1:LocSeq>*
    *<ns1:locName>{fn:data($PLOC /LOCNAME)}</ns1:locName>*
    *</ns1:Emp>*



    *};*



    query/wrappers/relational
    source: emp_demo
    sql:
    SELECT t3.c1, t3.c2, t3.c3
    FROM (
    SELECT ROWNUM AS c4, t2.c1, t2.c2, t2.c3
    FROM (
    SELECT t1."LOCATIONSEQ" AS c1, t1."LOCNAME" AS c2, t1."PID" AS c3
    FROM "EMP_DEMO"."PLOC" t1
    WHERE (((UPPER(t1."LOCATIONSEQ") LIKE ?) OR (? = 1)) AND ((UPPER(t1."LOCNAME") LIKE ?) OR (
    ? = 1)))
    ) t2
    WHERE (ROWNUM < 501)
    ) t3
    basesql:
    SELECT t3.c1, t3.c2, t3.c3
    FROM (
    SELECT ROWNUM AS c4, t2.c1, t2.c2, t2.c3
    FROM (
    SELECT t1."LOCATIONSEQ" AS c1, t1."LOCNAME" AS c2, t1."PID" AS c3
    FROM {EMP_DEMO}.{PLOC} t1
    WHERE (((UPPER(t1."LOCATIONSEQ") LIKE ?) OR (? = 1)) AND ((UPPER(t1."LOCNAME") LIKE ?) OR (
    ? = 1)))
    ) t2
    WHERE (ROWNUM < 501)
    ) t3
    time: 0

    query/performance
    evaltime: 0

    query/service
    result:

    parameters:
    1
    null

    common/time
    duration: 1
    timestamp: Thu Mar 11 01:03:48 IST 2010

    [Thu Mar 11 01:03:48 IST 2010] End
    ------------------------------------------------------------------------

    Edited by: Is916 on Mar 10, 2010 11:37 AM
  • 16. Re: Search Functionality
    mikereiche Pro
    Currently Being Moderated
    Good. Now go read Jeff's post and implement that.

    It did not occur to me that you have not been reading the responses to your questions.

    - Mike
1 2 Previous Next

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points