Use cfsearch query to query database

Does anyone have an example of using a cfsearch to return all columns in a database. I've been using cfsearch and it seems that I am limited to the Summary attribute. I am not having any luck finding a tutorial on this subject and the Ben Forta books don't have a good example.
Please Help. Thank you

I though you could reference the (Table_ID field) from the cfsearch.criteria results located in the (cfcollection KEY) and use that to query the db. Is that not possible?
Thank you for taking the time to respond to my post.

Similar Messages

  • Problem in using oraext:query-database() command in xslt

    Hi,
    I am querying a function through the query-database() command in a certain xslt within a BPEL Process as below:
    <xsl:variable name="Corporation">
                    <xsl:value-of select="string('CORPORATION')"/>
      </xsl:variable>
    <xsl:variable name="CustAccIdFrmDB">
                    <xsl:value-of select='orext:query-database(concat("select xx_egytrans_integration.get_xid(",$getCustAccID,",",$Corporation,") from dual"),false(),false(),string("jdbc/otmdatasource"))'/>
    </xsl:variable>
    But, after deploying the BPEL Process and while running it, I am getting error at run-time.
    Below is the error,
    <bpelFault><faultType>0</faultType><subLanguageExecutionFault xmlns="http://schemas.oracle.com/bpel/extension"><part name="summary"><summary>XPath expression failed to execute. An error occurs while processing the XPath expression; the expression is ora:doXSLTransformForDoc('xsl/Transformation__CustomerUpdate.xsl', $Invoke_getProfileOptions_getProfileOptions_OutputVariable.getProfileOptionsOutputCollection, 'Invoke_CustomerUpdateProc_Customer_UpdateProc_OutputVariable.OutputParameters', $Invoke_CustomerUpdateProc_Customer_UpdateProc_OutputVariable.OutputParameters, 'Invoke_CustAccProc_getCustAccID_OutputVariable_1.OutputParameters', $Invoke_CustAccProc_getCustAccID_OutputVariable_1.OutputParameters, 'Invoke_GetCustTaxExempt_getCustTaxExempStatus__Update_OutputVariable.OutputParameters', $Invoke_GetCustTaxExempt_getCustTaxExempStatus__Update_OutputVariable.OutputParameters, 'Invoke_getCustContactUpd_get_cust_acc_site_contactUpd_OutputVariable.OutputParameters', $Invoke_getCustContactUpd_get_cust_acc_site_contactUpd_OutputVariable.OutputParameters). The XPath expression failed to execute; the reason was: javax.xml.transform.TransformerException: XML-22900: (Fatal Error) An internal error condition occurred.. Check the detailed root cause described in the exception message text and verify that the XPath query is correct. </summary></part><part name="code"><code>XPathExecutionError</code></part></subLanguageExecutionFault></bpelFault>
    Could you please let me know the probable reason for the error? Please help at the earliest.
    Thanks,
    Promit

    Hi Anshul,
    Thanks for replying.
    The query upon executing in SQL Plus returns proper value. The result is either a concatenated string or 'NO_DATA'.
    Please note that: $getCustAccID --> x-path expression and $Corporation --> hardcoded value - 'CORPORATION'.
    I have tried formatting the string of the query in various ways, but no luck.. In all cases the error is same.
    Waiting for your reply.
    Thanks in advance..
    Regards,
    Promit

  • Using orcl:query-database to return a number of Columns

    I have a BPEL process that is pulling data from some Database tables everything is working fine.
    I now need to perform a lookup on the database to pull in some additional information (3 additional attributes) within the stylesheet, where each attribute comes from a separate table.
    i.e.
    select a.col1, b.col1, c.col1
    from tab1 a
    ,tab2 b
    , tab3 c
    where a.col2 = b.col2
    and .......blah blah blah....
    I have used the orcl:database-query successfully to retrieve a single column and a single row and it works great.
    However i'd like to run the above query as one statement, rather than 3 separate queries.
    I've googled the fucntion for examples where it returns a nodelist or XML snippet, but to no avail.
    I've tried it before and couldn't get it to work.
    Does anyone have any examples.
    Thanks in advance.
    Stuart

    I have a BPEL process that is pulling data from some Database tables everything is working fine.
    I now need to perform a lookup on the database to pull in some additional information (3 additional attributes) within the stylesheet, where each attribute comes from a separate table.
    i.e.
    select a.col1, b.col1, c.col1
    from tab1 a
    ,tab2 b
    , tab3 c
    where a.col2 = b.col2
    and .......blah blah blah....
    I have used the orcl:database-query successfully to retrieve a single column and a single row and it works great.
    However i'd like to run the above query as one statement, rather than 3 separate queries.
    I've googled the fucntion for examples where it returns a nodelist or XML snippet, but to no avail.
    I've tried it before and couldn't get it to work.
    Does anyone have any examples.
    Thanks in advance.
    Stuart

  • Problem in using query-database() function in Transformation

    Hi All,
    I am using JDev and SOA 10.1.3.4.
    I have an async process.
    In that I am doing a transformation in which source is InputVariable and target is result.
    In Transformation I am using query-database function to fetch a record from DB and am assigning that to result.
    *<xsl:value-of select='orcl:query-database(concat("select ename from emp where empid=",/ns1:DBXSLProcessRequest/ns1:input),false(),false(),"jdbc:oracle:thin:scott/tiger@localhost:1521:abcd")'/>*
    I am not getting any error but query-database is not returning any thing I maen it is returning null.
    If i run that query in SQL prompt it is returning the empname.
    Please help me out.
    Regards
    PavanKumar.M

    Hi Pavan
    I tried following in BPEL transform actvity's XSL file, and it works fine and returns the sysdate for me.
    <xsl:value-of select='orcl:query-database("select sysdate from dual",false,false,"jdbc/myDS")'/>
    Can you try above in new XSL file of Transform activity and let me know its gives you the result? if it works you can start making changes according to your requirement.
    steps to follow:
    1.create connection pool in EM, and make sure its working fine by using test on connection pool.
    2.create Datasource and point to above created connection pool. and restart the oc4j_soa
    3.rename the xsl file name of transform activity in BPEL and use above query-database function.some times xsl files are cached even if you make changes it will not take effect so for testing if you rename it will be good.
    Thanks
    Seshagiri.Rayala
    http://soabpel.wordpress.com/

  • Query Database - Write to Database

    I am querying a SQL DB which has 10 results in total with 15 fields each. The run book will filter out 2 eventually based on some rules.
    Once all the activities are complete as per the runbook, I want to write back to the database as 'Complete' under Field called Status
    The write works, however it creates a new item completely. I want to update the existing request
    Regards, Vik Singh "If this thread answered your question, please click on "Mark as Answer"

    So if I understand correctly you are querying a database and based on the response you do some activities and then you want to update the records you queried in order to indicate that the activities have been completed?
    If you just want to update the existing records then I would probably just do an Update query based on the primary-key of the record you queried using the "Query Database" activity instead of the "Write to Database" (which always writes
    a new record).
    Something like: Update [Table Name] set Status = 'Completed' where PrimaryKey = 'xxx'
    You will probably need to cut up the Query Result from your first query first in order to get the Primary Key.
    Usually I do this by reading Published Data "Full Line as String Seperated by ;" with a PowerShell Script (Run .NET Activity).
    For example:
    $Query = <Full Line as String >   //Published Data from the Query activity
    $All_Records = $Query.Split(";") //this creates an array where every record is a column from the query result
    $PrimaryKey = $All_Records[0]  (if the primarykey is found in the first record of the array of course)
    Then use that $PrimaryKey value in your new query.

  • Orcl:query-database ERROR

    I am getting following error when I use orcl:query-database() function. JNDI name is correct and working for DB adapters. I dont knwo whats wrong with this..
    <subLanguageExecutionFault xmlns="http://schemas.oracle.com/bpel/extension"><part name="code"><code>XPathExecutionError</code>
    </part><part name="summary"><summary>XPath expression failed to execute.
    Error while processing xpath expression, the expression is "orcl:query-database('select testan_s.nextval from dual',false(),false(),'eis/DB/TEST)", the reason is message can't be null.
    Please verify the xpath query.
    </summary>
    </part></subLanguageExecutionFault>

    Using JNDI name gives this freak error. If you use jdbc url string then it works in the last parameter.
    It is really sad that these kind of simple functions are not working even in 10.1.3.3 which makes it very difficult to design the process in a simple way.
    When will these will be fixed? is there any workaround? I need to use this in XSL transformations. any one has a clue?

  • How to pass parameters to query-database function [Solved]

    Dear All,
    I'm working on a BPEL process which reads a file and the data is passes on
    to a web service. In the transform activity to transform data from the source to the
    web serivice parameters, I want to use the query-database function to check if
    the value given in the file exists in the database. I have added a 'If' XSL construct
    for this. Now when the query is static (given with hardcoded where clause), the
    query-database function works fine. But I want to use one of the column in the
    source variable in the SQL query I'm using in the query-database function.
    i.e. If I give the query as below it is working:
    <xsl:if test="orcl:query-database("select empno from emp
    where empno='10'",.....) > 0">
    I want to replace the hardcoded value 10 with the value from the source variable.
    I'm not sure how this should be done. If I refer to the element directly in the XSL
    it is not working. I've shown this below.
    <xsl:if test="orcl:query-database("select empno from emp
    where empno='/tns:Root-Element/tns:Data/:tns:Empno'",.....) > 0">
    Something like above does not work. I'm not sure also if the syntax is correct. It
    does not give any error, but the transformation does not happen.
    Is there any way you can pass any input value as a parameter to the
    query-database function?
    Thanks in advance
    -Ruban

    Hi Dipal,
    The concat works! Thank you very much for the help. I didn't try concat before.
    I was using a alphanumeric field, so it was required to add one more concat
    for enclosing the value with single quotes. For numerical fields, one concat would
    be enough as you had shown.
    My xsl looks like this now:
    <xsl:if test="orcl:query-database(concat(concat("select empno from emp
    where empno='",/tns:Root-Element/tns:Data/:tns:Empno),"'"),
    false(),false(),"jdbc/DbConnection") > 0">
    This works properly.
    Regards,
    -Ruban

  • Orcl:query-database gives error when using to_char function in select stmt

    hi
    Use Case : We get a csv file ("bank_import_<MMDDYYYYY>.csv") from the bank containing the transactions occured for the month. The date in the filename is retrieved into string and i need to convert this string to the format "MON-DD-YYYY". This is the required format for an header table which takes this string as primary key.
    Code:
    statement_name = '11302206'.........
    <copy>
    <from expression="concat("'select to_char(to_date('",bpws:getVariableData('statement_name') ,"','MMDDYYYY'),'MON-DD-YYYY') from dual'")"/>
    <to variable="xpath"/>
    </copy>
    <copy>
    <from expression="orcl:query-database(bpws:getVariableData('xpath'),false(),false(),'jdbc:oracle:thin:apps/apps@croaker:1529:RSICMI')"/>
    <to variable="statement_name"/>
    </copy>
    Error:
    [2006/12/06 19:13:04] Updated variable "xpath" less
    <xpath>'select to_char(to_date('10302006','MMDDYYYY'),'MON-DD-YYYY') from dual'</xpath>
    [2006/12/06 19:13:04] "XPathException" has been thrown. less
    XPath expression failed to execute.
    Error while processing xpath expression, the expression is "orcl:query-database(bpws:getVariableData("xpath"), false(), false(), "jdbc:oracle:thin:apps/apps@croaker:1529:RSICMI")", the reason is .
    Please verify the xpath query.
    Log Message:
    <2006-12-06 19:13:04,595> <DEBUG> <UAT.collaxa.cube.xml> <XPathUtil::evaluate> XPathQuery[concat("'select to_char(to_date('", bpws:getVariableData("statement_name"), "','MMDDYYYY'),'MON-DD-YYYY') from dual'")], XPath Result: class=java.lang.String value='select to_char(to_date('10302006','MMDDYYYY'),'MON-DD-YYYY') from dual'
    <2006-12-06 19:13:04,595> <DEBUG> <UAT.collaxa.cube.xml> <XPathUtil::initXPath> namespaceMapping is: rootMap: {bpws=http://schemas.xmlsoap.org/ws/2003/03/business-process/, xp20=http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20, ns4=http://xmlns.oracle.com/pcbpel/adapter/db/top/BAIBankUpload, ldap=http://schemas.oracle.com/xpath/extension/ldap, xsd=http://www.w3.org/2001/XMLSchema, ns5=http://xmlns.oracle.com/pcbpel/adapter/file/, client=http://xmlns.oracle.com/BAI_BankUpload, ora=http://schemas.oracle.com/xpath/extension, ns1=http://xmlns.oracle.com/pcbpel/adapter/file/readBAIBankImportCSV/, ns3=http://TargetNamespace.com/readBAIBankImportCSV, ns2=http://xmlns.oracle.com/pcbpel/adapter/db/Insert_SI_CE_STATEMENT_LINES_INT/, bpelx=http://schemas.oracle.com/bpel/extension, orcl=http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc, =http://schemas.xmlsoap.org/ws/2003/03/business-process/}
    scopedMap: {}
    <2006-12-06 19:13:04,751> <DEBUG> <UAT.collaxa.cube.xml> <XPathUtil::evaluate> XPathQuery :orcl:query-database(bpws:getVariableData("xpath"), false(), false(), "jdbc:oracle:thin:apps/apps@croakercom:1529:RSICMI")
    org.collaxa.thirdparty.jaxen.FunctionCallException
         at org.collaxa.thirdparty.jaxen.FunctionCallException.fillInStackTrace(FunctionCallException.java:124)
         at java.lang.Throwable.<init>(Throwable.java:195)
         at java.lang.Exception.<init>(Exception.java:41)
         at org.collaxa.thirdparty.jaxen.saxpath.SAXPathException.<init>(SAXPathException.java:83)
         at org.collaxa.thirdparty.jaxen.JaxenException.<init>(JaxenException.java:82)
         at org.collaxa.thirdparty.jaxen.FunctionCallException.<init>(FunctionCallException.java:86)
         at oracle.tip.pc.services.functions.ExtFuncFunction$QueryDatabaseFunction.call(ExtFuncFunction.java:190)
         at org.collaxa.thirdparty.jaxen.expr.DefaultFunctionCallExpr.evaluate(DefaultFunctionCallExpr.java:184)
         at org.collaxa.thirdparty.jaxen.expr.DefaultXPathExpr.asList(DefaultXPathExpr.java:107)
         at org.collaxa.thirdparty.jaxen.BaseXPath.selectNodesForContext(BaseXPath.java:724)
         at org.collaxa.thirdparty.jaxen.BaseXPath.selectNodes(BaseXPath.java:253)
         at org.collaxa.thirdparty.jaxen.BaseXPath.evaluate(BaseXPath.java:210)
         at com.collaxa.cube.xml.xpath.XPathUtil.evaluate(XPathUtil.java:93)
         at com.collaxa.cube.engine.ext.wmp.BPELAssignWMP.evalFromValue(BPELAssignWMP.java:501)
         at com.collaxa.cube.engine.ext.wmp.BPELAssignWMP.__executeStatements(BPELAssignWMP.java:122)
         at com.collaxa.cube.engine.ext.wmp.BPELActivityWMP.perform(BPELActivityWMP.java:188)
         at com.collaxa.cube.engine.CubeEngine.performActivity(CubeEngine.java:3408)
         at com.collaxa.cube.engine.CubeEngine.handleWorkItem(CubeEngine.java:1836)
         at com.collaxa.cube.engine.dispatch.message.instance.PerformMessageHandler.handleLocal(PerformMessageHandler.java:75)
         at com.collaxa.cube.engine.dispatch.DispatchHelper.handleLocalMessage(DispatchHelper.java:166)
         at com.collaxa.cube.engine.dispatch.DispatchHelper.sendMemory(DispatchHelper.java:252)
         at com.collaxa.cube.engine.CubeEngine.endRequest(CubeEngine.java:5438)
         at com.collaxa.cube.engine.CubeEngine.createAndInvoke(CubeEngine.java:1217)
         at com.collaxa.cube.engine.delivery.DeliveryService.handleInvoke(DeliveryService.java:511)
         at com.collaxa.cube.engine.ejb.impl.CubeDeliveryBean.handleInvoke(CubeDeliveryBean.java:335)
         at ICubeDeliveryLocalBean_StatelessSessionBeanWrapper16.handleInvoke(ICubeDeliveryLocalBean_StatelessSessionBeanWrapper16.java:1796)
         at com.collaxa.cube.engine.dispatch.message.invoke.InvokeInstanceMessageHandler.handle(InvokeInstanceMessageHandler.java:37)
         at com.collaxa.cube.engine.dispatch.DispatchHelper.handleMessage(DispatchHelper.java:125)
         at com.collaxa.cube.engine.dispatch.BaseScheduledWorker.process(BaseScheduledWorker.java:70)
         at com.collaxa.cube.engine.ejb.impl.WorkerBean.onMessage(WorkerBean.java:86)
         at com.evermind.server.ejb.MessageDrivenBeanInvocation.run(MessageDrivenBeanInvocation.java:123)
         at com.evermind.server.ejb.MessageDrivenHome.onMessage(MessageDrivenHome.java:755)
         at com.evermind.server.ejb.MessageDrivenHome.run(MessageDrivenHome.java:928)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
         at java.lang.Thread.run(Thread.java:534)
    Root cause:
    java.lang.ClassCastException
         at oracle.tip.pc.services.functions.ExtFuncFunction$QueryDatabaseFunction.call(ExtFuncFunction.java:158)
         at org.collaxa.thirdparty.jaxen.expr.DefaultFunctionCallExpr.evaluate(DefaultFunctionCallExpr.java:184)
         at org.collaxa.thirdparty.jaxen.expr.DefaultXPathExpr.asList(DefaultXPathExpr.java:107)
         at org.collaxa.thirdparty.jaxen.BaseXPath.selectNodesForContext(BaseXPath.java:724)
         at org.collaxa.thirdparty.jaxen.BaseXPath.selectNodes(BaseXPath.java:253)
         at org.collaxa.thirdparty.jaxen.BaseXPath.evaluate(BaseXPath.java:210)
         at com.collaxa.cube.xml.xpath.XPathUtil.evaluate(XPathUtil.java:93)
         at com.collaxa.cube.engine.ext.wmp.BPELAssignWMP.evalFromValue(BPELAssignWMP.java:501)
         at com.collaxa.cube.engine.ext.wmp.BPELAssignWMP.__executeStatements(BPELAssignWMP.java:122)
         at com.collaxa.cube.engine.ext.wmp.BPELActivityWMP.perform(BPELActivityWMP.java:188)
         at com.collaxa.cube.engine.CubeEngine.performActivity(CubeEngine.java:3408)
         at com.collaxa.cube.engine.CubeEngine.handleWorkItem(CubeEngine.java:1836)
         at com.collaxa.cube.engine.dispatch.message.instance.PerformMessageHandler.handleLocal(PerformMessageHandler.java:75)
         at com.collaxa.cube.engine.dispatch.DispatchHelper.handleLocalMessage(DispatchHelper.java:166)
         at com.collaxa.cube.engine.dispatch.DispatchHelper.sendMemory(DispatchHelper.java:252)
         at com.collaxa.cube.engine.CubeEngine.endRequest(CubeEngine.java:5438)
         at com.collaxa.cube.engine.CubeEngine.createAndInvoke(CubeEngine.java:1217)
         at com.collaxa.cube.engine.delivery.DeliveryService.handleInvoke(DeliveryService.java:511)
         at com.collaxa.cube.engine.ejb.impl.CubeDeliveryBean.handleInvoke(CubeDeliveryBean.java:335)
         at ICubeDeliveryLocalBean_StatelessSessionBeanWrapper16.handleInvoke(ICubeDeliveryLocalBean_StatelessSessionBeanWrapper16.java:1796)
         at com.collaxa.cube.engine.dispatch.message.invoke.InvokeInstanceMessageHandler.handle(InvokeInstanceMessageHandler.java:37)
         at com.collaxa.cube.engine.dispatch.DispatchHelper.handleMessage(DispatchHelper.java:125)
         at com.collaxa.cube.engine.dispatch.BaseScheduledWorker.process(BaseScheduledWorker.java:70)
         at com.collaxa.cube.engine.ejb.impl.WorkerBean.onMessage(WorkerBean.java:86)
         at com.evermind.server.ejb.MessageDrivenBeanInvocation.run(MessageDrivenBeanInvocation.java:123)
         at com.evermind.server.ejb.MessageDrivenHome.onMessage(MessageDrivenHome.java:755)
         at com.evermind.server.ejb.MessageDrivenHome.run(MessageDrivenHome.java:928)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
         at java.lang.Thread.run(Thread.java:534)
    <2006-12-06 19:13:04,751> <ERROR> <UAT.collaxa.cube.xml> ORABPEL-09500
    XPath expression failed to execute.
    Error while processing xpath expression, the expression is "orcl:query-database(bpws:getVariableData("xpath"), false(), false(), "jdbc:oracle:thin:apps/apps@croaker:1529:RSICMI")", the reason is .
    Please verify the xpath query.

    Hi,
    QAbdul wrote:
    when I tried to execute the followingin XMLQuery by calling TO_CHAR() whithin this query I am getting this error"ORA-19237: XP0017 - unable to resolve call to function - fn:TO_CHARTO_CHAR is a SQL function, XQuery is unaware of it.
    XPath 2.0 specifications define a fn:format-date function but Oracle has not included yet in its XQuery implementation.
    Easiest way to go is A_Non's solution, but if you need to format at multiple places in the query, you can declare a local XQuery function.
    For example, to format to "DD/MM/YYYY" from the canonical xs:date format "YYYY-MM-DD" :
    {code}
    declare function local:format-date($d as xs:date) as xs:string
    let $s := xs:string($d)
    return concat(
    substring($s, 10, 2), "/",
    substring($s, 7, 2), "/",
    substring($s, 2, 4)
    {code}
    and an example of use :
    {code}
    SQL> CREATE TABLE test_xqdate AS SELECT sysdate dt FROM dual;
    Table created
    SQL> SELECT *
    2 FROM XMLTable(
    3 'declare function local:format-date($d as xs:date) as xs:string
    4 {
    5 let $s := xs:string($d)
    6 return concat(
    7 substring($s, 10, 2), "/",
    8 substring($s, 7, 2), "/",
    9 substring($s, 2, 4)
    10 )
    11 }; (: :)
    12 for $i in ora:view("TEST_XQDATE")/ROW/DT
    13 return element e {
    14 attribute xs_date_format { $i/text() },
    15 attribute local_format { local:format-date($i) }
    16 }'
    17 COLUMNS
    18 xs_date_format VARCHAR2(10) PATH '@xs_date_format',
    19 local_format VARCHAR2(10) PATH '@local_format'
    20 )
    21 ;
    XS_DATE_FORMAT LOCAL_FORMAT
    2010-10-28 28/10/2010
    {code}

  • Use of sql group function in orcl:query-database - urgent

    All,
    Version: 10.1.3.4
    Two requirements for me:
    1. I want to use sum function in orcl:query-database. How to use it?
    For ex: I tried the following
    <xsl:value-of select='orcl:query-database("select sum(salary) from emp",false(),false(),"jdbc/DB1")'/>
    I got the following error
    oracle.xml.sql.OracleXMLSQLException: Character ')' is not allowed in an XML tag name.
    When I tried without sum function, it works fine
    2. I used the same table, but without the sum function as below
    <xsl:value-of select='orcl:query-database("select salary from emp",false(),false(),"jdbc/DB1")'/>
    This time, it returns the first employees salary!! I dont understand this logic. I expected either the query returns all the rows else it throws error, but none of them were true!
    Can anyone pls explain what is the behavior? I want your reply for both the queries!
    Currently I'm in a project where I'm working in the similar scenario, so please guru's let me know ASAP.
    Thanks,
    Sen

    Hi Sen,
    Create a normal variable variable in XSLT.
    Then use that variable.
    I mean variable name='Var_1' select='Your Query'
    Now use Var_1/yourcollection/...
    I am giving some example
    <xsl:variable name="Stopdetails" select="/ns0:MyEBM/ns0:DataArea/ns0:MyEBO/ns0:Stops/ns0:Stop[ns0:StopID=$TempStopId]"/>
                <xsl:variable name="AccStopTypeVar">
                        <xsl:value-of select="$Stopdetails/ns0:StopType"/>
    </xsl:variable>If you want you can loop on the created variable.
    You can do these in XSL.
    But DB calls those things ...it would be better , if u take them out. Spme debugging problems are there with XSL.
    Regards
    PavanKumar.M

  • How to use query-database() function in transformation?

    Hi All,
    How to use query-database() function in transformation?
    It is giving four fields but if i write select query in sqlquery field it is saying select node is not found....
    plz help me out
    Regards
    Pavankumar
    Edited by: [email protected] on Jul 29, 2009 2:49 AM

    Hi,
    To answer your query:-
    http://abhishek-soablog.blogspot.com/2008/08/orclquery-database.html
    Cheers,
    Abhi...

  • How to backup database using sql query?

    Hello,i'm student, i'm researching oracle database,i want to backup database that using sql query (like backup query in SQL SERVER) ,how to do that ??
    Thank!

    No, database backups cannot be done from within the database.
    Commands for backups are outside of the database.
    See the "2 Day DBA Guide" http://download.oracle.com/docs/cd/E11882_01/server.112/e10897/toc.htm
    and the "Backup and Recovery Users's (actually Adminsitrator's) Guide : http://download.oracle.com/docs/cd/E11882_01/backup.112/e10642/toc.htm
    Hemant K Chitale

  • Lookup-table and query-database do not use global transaction

    Hi,
    following problem:
    DbAdapter inserts data into DB (i.e. an invoice).
    Process takes part in global transaction.
    After the insert there is a transformation which uses query-database and / or lookup-table.
    It seems these XPath / XSLT functions are NOT taking part in the transaction and so we can not access information from the current db transaction.
    I know workarounds like using DbAdapter for every query needed, etc. but this will cost a lot of time to change.
    Is there any way to share transaction in both DbAdapter insert AND lookup-table and query-database?
    Thanks, Best Regards,
    Martin

    One dba contacted me and made this statement:
    Import & export utilities are not independent from characterset. All
    user data in text related datatypes is exported using the character set
    of the source database. If the character sets of the source and target
    databases do not match a single conversion is performed.So far, that does not appear to be correct.
    nls_characterset = AL32UTF8
    nls_nchar_characterset = UTF8
    Running on Windows.
    EXP produces a backup in WE8MSWIN1252.
    I found that if I change the setting of the NLS_LANG registry setting for my oracle home, the exp utility exports to that character set.
    I changed the nls_lang
    from AMERICAN_AMERICA.WE8MSWIN1252
    to AMERICAN_AMERICA.UTF8
    Unfortunately , the export isn't working right, although it did change character sets.
    I get a warning on a possible character set conversion issue from AL32UTF8 to UTF8.
    Plus, I get an EXP_00056 Oracle error 932 encountered
    ORA-00932: inconsistent datatypes: expected BLOB, CLOB, get CHAR.
    EXP-00000: export terminated unsuccessfully.
    The schema I'm exporting with has exactly one procedure in it. Nothing else.
    I guess getting a new error message is progress. :)
    Still can't store multi-lingual characters in data tables.

  • Trouble connecting to SQL 2014 Database using Power Query

    I am trying to connect to a SQL 2014 Database using Power Query.  My connection string requires that I set the "Application Intent" setting to a value of "readonly", The connection parameter is required by SQL 2014 because of
    the failover cluster configuration.   
    I have successfully been able to connect via PowerPivot with the following connection string:
    Provider=SQLNCLI11;Data Source=<Server>;Persist Security Info=False;Integrated Security=SSPI;Initial Catalog=<DB>;Application Intent=readonly
    I cannot seem to find the correct syntax to connect via SQL 2014.  This is the syntax that I have been attempting: 
    Sql.Database("<Server>", "<DB>",[Application Intent=readonly])
    Is this currently supported?
    Thanks, Barbara

    It's not yet, I'm afraid, but it's something we're aware of and have vague plans to address :/.

  • How to define a JPA "Entity" used to query multiple database tables

    While using JPA to access database, I have a need to define a generic "Entity" class to use for query different tables. The reason is I have a lot of non-business tables (reference tables) I need to query. I intend to use Native SQL to do the query. Most query will only return 1 - 3 columns. It is tedious to define many JPA entities only to use them sparsely.
    For example, if I have two Native query, and define a JavaBean that has 3 properties, how do I implement this in JPA?
    Thanks for your help.
    query 1:
    select LASTNAME as f1, AGE as f2 from PERSON
    query 2:
    select zipcode as f1 from LOCATION
    package model.uti;
    public class SimpleBean {
    private String f1;
    private String f2;
    private String f3;
    public SimpleBean() {
    public void setF1(String f1) {
    this.f1 = f1;
    public String getF1() {
    return f1;
    public void setF2(String f2) {
    this.f2 = f2;
    public String getF2() {
    return f2;
    public void setF3(String f3) {
    this.f3 = f3;
    public String getF3() {
    return f3;
    }

    An @Entity is mapped to a specific table. You can't fill it with totally random data from a collection of tables.
    If you want to access data from multiple tables within the one entity, then the JPA spec defines an annotation @SecondaryTable, which allows you to specify a
    second table and the join condition.
    http://java.sun.com/javaee/5/docs/api/javax/persistence/SecondaryTable.html
    The JPA spec talks about this as do most good EJB/JPA books.
    -steve-

  • How to use unload query using JDBC with Informix database

    Hi friends,
    How can i use unload query using JDBC with Informix database?
    When i use it as "unload to 'abc.txt' select * from ........" it gives syntax error.I want to take the data of a table to a file.With dbaccess i can use it but i need to do it using jdbc.
    Thanks,
    Raneesh.

    To the best of my ability to tell, the right way to use this product from within Power Query would be to use its API. Unfortunately, we don't currently support either of the methods needed to be able to authenticate with the service (OAuth 2.0 and a relatively-custom
    digest-based method). Adding a mechanism to allow use of arbitrary OAuth-protected resources is a fairly high priority for us, and I hope we'll be able to deliver something before mid-2015.
    Scraping the website is very hard to do well -- both from an authentication and from a data discovery perspective.

Maybe you are looking for

  • How do I set up my 3G to send/receive mail from MS exchange?

    How do I set up my 3G to send/receive mail from MS exchange?

  • Sim Card Not Found

    Each day at random times my phone goes out stating Sim card not found. i was hoping there was a fix in todays update but of course no update. i have been travelling so i cannot back up etc. I have done the reset, the hard reset, and plug into the ele

  • Can't erase DVD+RW disc

    I've used this disc a couple of times now to copy movies for viewing on a TV and it's worked just fine. After I have watched the DVD I then erase it and copy another movie to it but this time it won't let me erase. If I check out Info. for the Owners

  • Re install of Windows and I have a problem with CS5

    Hi there. I have CS5 on my laptop and my desktop. I understand this is allowed. Problem is that my laptop went AWOL and went to the doctors. They had to do a clean re install of Windows to rescue the position. I had everything well backed up so that'

  • HP p1006 won't print after upgrade to Mavericks

    After upgrading from 10.8 to 10.9 my computer won't print anymore.  It says "Pages not found!"  The printer is attached to a Mac server running 10.8 which is printing fine, but my computer (running 10.9) won't print unless I boot it from the 10.8 par