Embedded SQL query in C - variable not in select list
Hello everyone,
I am new to using embedded SQL in C. I have written a query based on some very similar code I have found and I keep getting this error:
ID: ORA-XXXX
OVRD:
TEXT: Oracle Errors Found - Consult Application Development Team
INFO:
SQLC: -1007
GLM: ORA-01007: variable not in select list
If anyone could help me figure out what I am doing wrong that is causing this error it would be much appreciated. Thanks in advance!
Here is the query that is generating the error, I have changed the variable names but the syntax is the same:
SELECT TEMP_TABLE.tble,
TEMP_TABLE.item_date,
TEMP_TABLE.item_number,
TEMP_TABLE.item_id,
TEMP_TABLE.amount,
TEMP_TABLE.method
FROM (
SELECT 'C' tble,
item_date,
item_number,
item_id,
amount,
method
FROM current
WHERE (settlement_date IS NULL)
UNION ALL
SELECT '1' tble,
item_date,
item_number,
item_id,
amount,
method
FROM prev1
WHERE (date IS NULL)
UNION ALL
SELECT '2' tble,
item_date,
item_number,
item_id,
amount,
pay_method
FROM prev2
WHERE (date IS NULL)
UNION ALL
SELECT '3' tble,
item_date,
item_number,
item_id,
amount,
pay_method
FROM prev3
WHERE (date IS NULL)
UNION ALL
SELECT '4' tble,
item_date,
item_number,
item_id,
amount,
method
FROM prev4
WHERE (date IS NULL)) TEMP_TABLE
WHERE (TEMP_TABLE.item_date,
TEMP_TABLE.item_number,
TEMP_TABLE.item_id) IN
(SELECT item_date, item_number, item_id
FROM item
WHERE (source, location) IN
(SELECT source, location
FROM SOURCE_REF
WHERE online = 'O'
AND (source, location) IN
(SELECT source,
location
FROM SOURCE_METHOD_REF
WHERE type = 'P')))
Oh yeah I forgot to add that I have tested the query in TOAD and it works just fine so its something to do with embedding it into C I believe.
Similar Messages
-
Error while extending seeded page VO ORA-01007: variable not in select list
hi all,
i am trying to extend seeded vo on page after changing query of VO, i am getting this error on page
please help it urgent
oracle.apps.fnd.framework.OAException: oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement: SELECT PPF.PERSON_ID, PPF.EFFECTIVE_START_DATE, PPF.EFFECTIVE_END_DATE, VAC.VACANCY_ID, PPB.PAY_BASIS_ID, null as PAY_PROPOSAL_ID, POV.VENDOR_ID, IPC.POSTING_CONTENT_ID, Sex.LOOKUP_TYPE, Sex.LOOKUP_CODE, MAR.LOOKUP_TYPE AS LOOKUP_TYPE1, MAR.LOOKUP_CODE AS LOOKUP_CODE1, TIT.LOOKUP_TYPE AS LOOKUP_TYPE2, TIT.LOOKUP_CODE AS LOOKUP_CODE2, PPF.APPLICANT_NUMBER, PPF.DATE_OF_BIRTH, PPF.EMAIL_ADDRESS, TIT.MEANING, PPF.FULL_NAME, PPF.FIRST_NAME, PPF.HONORS, PPF.LAST_NAME, PPF.KNOWN_AS, PPF.MIDDLE_NAMES, NAT.MEANING AS NATIONALITY, PPF.NATIONAL_IDENTIFIER, PPF.PREVIOUS_LAST_NAME, PPF.SUFFIX, Sex.MEANING AS MEANING1, MAR.MEANING AS MARITAL_STATUS_MEANING, PPF.ATTRIBUTE_CATEGORY, PPF.ATTRIBUTE1, PPF.ATTRIBUTE2, PPF.ATTRIBUTE3, PPF.ATTRIBUTE4, PPF.ATTRIBUTE5, PPF.ATTRIBUTE6, PPF.ATTRIBUTE7, PPF.ATTRIBUTE8, PPF.ATTRIBUTE9, PPF.ATTRIBUTE10, PPF.ATTRIBUTE11, PPF.ATTRIBUTE12, PPF.ATTRIBUTE13, PPF.ATTRIBUTE14, PPF.ATTRIBUTE15, PPF.ATTRIBUTE16, PPF.ATTRIBUTE17, PPF.ATTRIBUTE18, PPF.ATTRIBUTE19, PPF.ATTRIBUTE20, PPF.ATTRIBUTE21, PPF.ATTRIBUTE22, PPF.ATTRIBUTE23, PPF.ATTRIBUTE24, PPF.ATTRIBUTE25, PPF.ATTRIBUTE26, PPF.ATTRIBUTE27, PPF.ATTRIBUTE28, PPF.ATTRIBUTE29, PPF.ATTRIBUTE30, PPF.PER_INFORMATION_CATEGORY, PPF.PER_INFORMATION1, PPF.PER_INFORMATION2, PPF.PER_INFORMATION3, PPF.PER_INFORMATION4, PPF.PER_INFORMATION5, PPF.PER_INFORMATION6, PPF.PER_INFORMATION7, PPF.PER_INFORMATION8, PPF.PER_INFORMATION9, PPF.PER_INFORMATION10, PPF.PER_INFORMATION11, PPF.PER_INFORMATION12, PPF.PER_INFORMATION13, PPF.PER_INFORMATION14, PPF.PER_INFORMATION15, PPF.PER_INFORMATION16, PPF.PER_INFORMATION17, PPF.PER_INFORMATION18, PPF.PER_INFORMATION19, PPF.PER_INFORMATION20, PPF.PER_INFORMATION21, PPF.PER_INFORMATION22, PPF.PER_INFORMATION23, PPF.PER_INFORMATION24, PPF.PER_INFORMATION25, PPF.PER_INFORMATION26, PPF.PER_INFORMATION27, PPF.PER_INFORMATION28, PPF.PER_INFORMATION29, PPF.PER_INFORMATION30, PPF.ORIGINAL_DATE_OF_HIRE, PPF.TOWN_OF_BIRTH, PPF.REGION_OF_BIRTH, COB.TERRITORY_SHORT_NAME AS COUNTRY_OF_BIRTH, ORG.NAME AS ORG_NAME, ORG.ORGANIZATION_ID, VAC.NAME, VAC.DESCRIPTION, PPB.NAME AS NAME3, PPB.PAY_BASIS, PPB.ANNUALIZED_HOURS, null as PROPOSED_SALARY_N, null as REVIEW_DATE, POV.VENDOR_NAME, IPC.NAME AS POSTING_NAME, ( Select pet.input_currency_code from PAY_INPUT_VALUES_F piv, PAY_ELEMENT_TYPES_F pet where piv.input_value_id = PPB.input_value_id AND trunc(sysdate) BETWEEN piv.effective_start_date AND piv.effective_end_date AND pet.element_type_id = piv.element_type_id AND trunc(sysdate) BETWEEN pet.effective_start_date AND pet.effective_end_date ) AS CURRENCY ,null as OFFER_ID, null as DISCRETIONARY_JOB_TITLE, null as PROPOSED_START_DATE, null as EXPIRY_DATE, null as ATTRIBUTE_CATEGORY1, null as OFFERS_ATTRIBUTE1, null as OFFERS_ATTRIBUTE2, null as OFFERS_ATTRIBUTE3, null as OFFERS_ATTRIBUTE4, null as OFFERS_ATTRIBUTE5, null as OFFERS_ATTRIBUTE6, null as OFFERS_ATTRIBUTE7, null as OFFERS_ATTRIBUTE8, null as OFFERS_ATTRIBUTE9, null as OFFERS_ATTRIBUTE10, null as OFFERS_ATTRIBUTE11, null as OFFERS_ATTRIBUTE12, null as OFFERS_ATTRIBUTE13, null as OFFERS_ATTRIBUTE14, null as OFFERS_ATTRIBUTE15, null as OFFERS_ATTRIBUTE16, null as OFFERS_ATTRIBUTE17, null as OFFERS_ATTRIBUTE18, null as OFFERS_ATTRIBUTE19, null as OFFERS_ATTRIBUTE20, null as OFFERS_ATTRIBUTE21, null as OFFERS_ATTRIBUTE22, null as OFFERS_ATTRIBUTE23, null as OFFERS_ATTRIBUTE24, null as OFFERS_ATTRIBUTE25, null as OFFERS_ATTRIBUTE26, null as OFFERS_ATTRIBUTE27, null as OFFERS_ATTRIBUTE28, null as OFFERS_ATTRIBUTE29, null as OFFERS_ATTRIBUTE30 ,null as ASSIGNMENT_ID, null as EFFECTIVE_START_DATE1, null as EFFECTIVE_END_DATE1, null as DATE_PROBATION_END, null as NORMAL_HOURS, null as PERF_REVIEW_PERIOD, null as PERF_REVIEW_PERIOD_FREQUENCY, null as SAL_REVIEW_PERIOD, null as SAL_REVIEW_PERIOD_FREQUENCY, null as TIME_NORMAL_START, null as TIME_NORMAL_FINISH, null as ASS_ATTRIBUTE_CATEGORY, null as ASS_ATTRIBUTE1, null as ASS_ATTRIBUTE2, null as ASS_ATTRIBUTE3, null as ASS_ATTRIBUTE4, null as ASS_ATTRIBUTE5, null as ASS_ATTRIBUTE6, null as ASS_ATTRIBUTE7, null as ASS_ATTRIBUTE8, null as ASS_ATTRIBUTE9, null as ASS_ATTRIBUTE10, null as ASS_ATTRIBUTE11, null as ASS_ATTRIBUTE12, null as ASS_ATTRIBUTE13, null as ASS_ATTRIBUTE14, null as ASS_ATTRIBUTE15, null as ASS_ATTRIBUTE16, null as ASS_ATTRIBUTE17, null as ASS_ATTRIBUTE18, null as ASS_ATTRIBUTE19, null as ASS_ATTRIBUTE20, null as ASS_ATTRIBUTE21, null as ASS_ATTRIBUTE22, null as ASS_ATTRIBUTE23, null as ASS_ATTRIBUTE24, null as ASS_ATTRIBUTE25, null as ASS_ATTRIBUTE26, null as ASS_ATTRIBUTE27, null as ASS_ATTRIBUTE28, null as ASS_ATTRIBUTE29, null as ASS_ATTRIBUTE30, null as PROJECT_TITLE ,JOB.JOB_ID, JOB.NAME AS NAME2 ,null AS ADDRESS_ID, null AS ADDRESS_LINE1, null AS ADDRESS_LINE2, null AS ADDRESS_LINE3, null AS ADDRESS_TYPE, null AS COUNTRY, null AS POSTAL_CODE, null AS REGION_1, null AS REGION_2, null AS REGION_3, null AS TOWN_OR_CITY, null AS DERIVED_LOCALE ,GRD.NAME AS NAME1, GRD.GRADE_ID ,LOC.STYLE, LOC.ADDRESS_LINE_1 AS ADDRESS_LINE11, LOC.ADDRESS_LINE_2 AS ADDRESS_LINE21, LOC.ADDRESS_LINE_3 AS ADDRESS_LINE31, LOC.TOWN_OR_CITY AS TOWN_OR_CITY1, LOC.COUNTRY AS COUNTRY1, LOC.POSTAL_CODE AS POSTAL_CODE1, LOC.REGION_1 AS REGION11, LOC.REGION_2 AS REGION21, LOC.REGION_3 AS REGION31, LOC.DERIVED_LOCALE AS DERIVED_LOCALE1, LOC.LOCATION_ID ,null as POSITION_NAME, null as POSITION_ID, null as POS_EFFECTIVE_START_DATE, null as POS_EFFECTIVE_END_DATE ,MGRTIT.MEANING AS MANAGER_TITLE_MEANING, MGR.FULL_NAME AS FULL_NAME1, MGR.EFFECTIVE_START_DATE AS MGR_EFFECTIVE_START_DATE, MGR.EFFECTIVE_END_DATE AS MGR_EFFECTIVE_END_DATE, MGR.FIRST_NAME AS MANAGER_FIRST_NAME, MGR.LAST_NAME AS MANAGER_LAST_NAME, MGR.HONORS AS MANAGER_HONORS, MGR.KNOWN_AS AS MANAGER_KNOWN_AS, MGR.PERSON_ID AS PERSON_ID1, MGRTIT.LOOKUP_TYPE AS LOOKUP_TYPE4, MGRTIT.LOOKUP_CODE AS LOOKUP_CODE4, MGRPHN.PHONE_NUMBER AS MGR_PHONE_NUMBER, MGRPHN.PHONE_ID, MGRFAX.PHONE_NUMBER AS MGR_FAX_NUMBER, MGRFAX.PHONE_ID AS PHONE_ID1 ,RECTIT.MEANING AS RECRUITER_TITLE_MEANING, REC.FULL_NAME AS RECRUITER_FULL_NAME, REC.EFFECTIVE_START_DATE AS EFFECTIVE_START_DATE2, REC.EFFECTIVE_END_DATE AS EFFECTIVE_END_DATE2, REC.FIRST_NAME AS FIRST_NAME2, REC.LAST_NAME AS LAST_NAME2, REC.HONORS AS HONORS2, REC.KNOWN_AS AS KNOWN_AS2, REC.PERSON_ID AS PERSON_ID2, RECTIT.LOOKUP_TYPE AS LOOKUP_TYPE3, RECTIT.LOOKUP_CODE AS LOOKUP_CODE3, RECPHN.PHONE_NUMBER AS REC_PHONE_NUMBER, RECPHN.PHONE_ID AS PHONE_ID2, RECFAX.PHONE_NUMBER AS REC_FAX_NUMBER3, RECFAX.PHONE_ID AS PHONE_ID3 FROM PER_ALL_PEOPLE_F PPF, PER_ALL_VACANCIES VAC, PER_PAY_BASES PPB, PO_VENDORS POV, HR_ALL_ORGANIZATION_UNITS_VL ORG, IRC_AGENCY_VACANCIES IAV, IRC_POSTING_CONTENTS_VL IPC, HR_LOOKUPS Sex, HR_LOOKUPS MAR, HR_LOOKUPS TIT, HR_LOOKUPS NAT, FND_TERRITORIES_VL COB ,PER_JOBS_VL JOB ,PER_GRADES_VL GRD ,HR_LOCATIONS_ALL_VL LOC ,PER_ALL_PEOPLE_F MGR, HR_LOOKUPS MGRTIT, PER_PHONES MGRPHN, PER_PHONES MGRFAX ,PER_ALL_PEOPLE_F REC, HR_LOOKUPS RECTIT, PER_PHONES RECPHN, PER_PHONES RECFAX WHERE PPF.person_id = 1476389 and trunc(sysdate) between PPF.effective_start_date and PPF.effective_end_date and VAC.vacancy_id = 52851 and PPB.pay_basis_id(+) = 350 and ORG.organization_id(+) = 7036 and VAC.vacancy_id = IAV.vacancy_id(+) and IAV.agency_id = POV.vendor_id(+) and VAC.primary_posting_id = IPC.posting_content_id(+) and PPF.sex = SEX.lookup_code(+) and SEX.lookup_type(+) = 'SEX' and PPF.title = TIT.lookup_code(+) and TIT.lookup_type(+) = 'TITLE' and PPF.marital_status = MAR.lookup_code(+) and MAR.lookup_type(+) = 'MAR_STATUS' and PPF.nationality = NAT.lookup_code(+) and NAT.lookup_type(+) = 'NATIONALITY' and PPF.COUNTRY_OF_BIRTH = COB.TERRITORY_CODE(+) and JOB.job_id(+) = 10772 and GRD.grade_id(+) = 2265 and LOC.location_id(+) = 1057 and MGR.person_id(+) = 730283 and trunc(sysdate) between MGR.effective_start_date(+) and MGR.effective_end_date(+) and MGR.title = MGRTIT.lookup_code(+) and MGRTIT.lookup_type(+) = 'TITLE' and MGR.PERSON_ID = MGRPHN.PARENT_ID(+) and MGRPHN.PARENT_TABLE(+) = 'PER_ALL_PEOPLE_F' and nvl(MGRPHN.phone_type(+), 'W1') = 'W1' and trunc(sysdate) between nvl(MGRPHN.date_from, trunc(sysdate)) and NVL(MGRPHN.date_to, trunc(sysdate)) and MGR.PERSON_ID = MGRFAX.PARENT_ID(+) and MGRFAX.PARENT_TABLE(+) = 'PER_ALL_PEOPLE_F' and nvl(MGRFAX.phone_type(+), 'WF') = 'WF' and trunc(sysdate) between nvl(MGRFAX.date_from, trunc(sysdate)) and NVL(MGRPHN.date_to, trunc(sysdate)) and REC.person_id(+) = 704260 and trunc(sysdate) between REC.effective_start_date(+) and REC.effective_end_date(+) and REC.title = RECTIT.lookup_code(+) and RECTIT.lookup_type(+) = 'TITLE' and REC.PERSON_ID = RECPHN.PARENT_ID(+) and RECPHN.PARENT_TABLE(+) = 'PER_ALL_PEOPLE_F' and nvl(RECPHN.phone_type(+), 'W1') = 'W1' and trunc(sysdate) between nvl(RECPHN.date_from, trunc(sysdate)) and NVL(RECPHN.date_to, trunc(sysdate)) and REC.PERSON_ID = RECFAX.PARENT_ID(+) and RECFAX.PARENT_TABLE(+) = 'PER_ALL_PEOPLE_F' and trunc(sysdate) between nvl(RECFAX.date_from, trunc(sysdate)) and NVL(RECFAX.date_to, trunc(sysdate))
at oracle.apps.fnd.framework.OAException.wrapperInvocationTargetException(OAException.java:975)
at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:211)
at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:133)
at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.invokeMethod(OAApplicationModuleImpl.java:784)
at oracle.apps.per.irc.offers.webui.IrcSaveForLaterCO.processFormRequest(IrcSaveForLaterCO.java:208)
at oracle.apps.per.irc.offers.webui.CreateOfferCO.processFormRequest(CreateOfferCO.java:181)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:810)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(OAPageLayoutHelper.java:1159)
at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(OAPageLayoutBean.java:1579)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1022)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:988)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:843)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(OAFormBean.java:395)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1022)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:988)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:843)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(OABodyBean.java:363)
at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2675)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1682)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:508)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:429)
at oa_html._OA._jspService(_OA.java:85)
at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
at oracle.jsp.JspServlet.service(JspServlet.java:156)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
at org.apache.jserv.JServConnection.processRequest(JServConnection.java:456)
at org.apache.jserv.JServConnection.run(JServConnection.java:294)
at java.lang.Thread.run(Thread.java:534)
## Detail 0 ##
java.sql.SQLException: ORA-01007: variable not in select list
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:590)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1973)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1119)
at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2566)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2963)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:658)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:584)
at oracle.jbo.server.QueryCollection.buildResultSet(QueryCollection.java:631)
at oracle.jbo.server.QueryCollection.executeQuery(QueryCollection.java:518)
at oracle.jbo.server.ViewObjectImpl.executeQueryForCollection(ViewObjectImpl.java:3375)
at oracle.jbo.server.OAJboViewObjectImpl.executeQueryForCollection(OAJboViewObjectImpl.java:828)
at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQueryForCollection(OAViewObjectImpl.java:4507)
at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:574)
at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:544)
at oracle.jbo.server.ViewRowSetImpl.executeDetailQuery(ViewRowSetImpl.java:619)
at oracle.jbo.server.ViewObjectImpl.executeDetailQuery(ViewObjectImpl.java:3339)
at oracle.jbo.server.ViewObjectImpl.executeQuery(ViewObjectImpl.java:3326)
at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQuery(OAViewObjectImpl.java:441)
at oracle.apps.per.irc.offers.server.OfferLetterDetailsVOImpl.executeQuery(OfferLetterDetailsVOImpl.java:621)
at oracle.apps.per.irc.offers.server.OffersAMImpl.getXMLDataFromBaseTables(OffersAMImpl.java:1523)
at oracle.apps.per.irc.offers.server.OffersAMImpl.getOfferLetterDataBlobDirect(OffersAMImpl.java:2186)
at oracle.apps.per.irc.offers.server.OffersAMImpl.getXMLData(OffersAMImpl.java:1627)
at oracle.apps.per.irc.offers.server.OffersAMImpl.apiValidate(OffersAMImpl.java:2167)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:190)
at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:133)
at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.invokeMethod(OAApplicationModuleImpl.java:784)
at oracle.apps.per.irc.offers.webui.IrcSaveForLaterCO.processFormRequest(IrcSaveForLaterCO.java:208)
at oracle.apps.per.irc.offers.webui.CreateOfferCO.processFormRequest(CreateOfferCO.java:181)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:810)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(OAPageLayoutHelper.java:1159)
at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(OAPageLayoutBean.java:1579)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1022)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:988)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:843)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(OAFormBean.java:395)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1022)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:988)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:843)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(OABodyBean.java:363)
at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2675)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1682)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:508)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:429)
at oa_html._OA._jspService(_OA.java:85)
at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
at oracle.jsp.JspServlet.service(JspServlet.java:156)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
at org.apache.jserv.JServConnection.processRequest(JServConnection.java:456)
at org.apache.jserv.JServConnection.run(JServConnection.java:294)
at java.lang.Thread.run(Thread.java:534)
java.sql.SQLException: ORA-01007: variable not in select list
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:590)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1973)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1119)
at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2566)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2963)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:658)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:584)
at oracle.jbo.server.QueryCollection.buildResultSet(QueryCollection.java:631)
at oracle.jbo.server.QueryCollection.executeQuery(QueryCollection.java:518)
at oracle.jbo.server.ViewObjectImpl.executeQueryForCollection(ViewObjectImpl.java:3375)
at oracle.jbo.server.OAJboViewObjectImpl.executeQueryForCollection(OAJboViewObjectImpl.java:828)
at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQueryForCollection(OAViewObjectImpl.java:4507)
at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:574)
at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:544)
at oracle.jbo.server.ViewRowSetImpl.executeDetailQuery(ViewRowSetImpl.java:619)
at oracle.jbo.server.ViewObjectImpl.executeDetailQuery(ViewObjectImpl.java:3339)
at oracle.jbo.server.ViewObjectImpl.executeQuery(ViewObjectImpl.java:3326)
at oracle.apps.fnd.framework.server.OAViewObjectImpl.executeQuery(OAViewObjectImpl.java:441)
at oracle.apps.per.irc.offers.server.OfferLetterDetailsVOImpl.executeQuery(OfferLetterDetailsVOImpl.java:621)
at oracle.apps.per.irc.offers.server.OffersAMImpl.getXMLDataFromBaseTables(OffersAMImpl.java:1523)
at oracle.apps.per.irc.offers.server.OffersAMImpl.getOfferLetterDataBlobDirect(OffersAMImpl.java:2186)
at oracle.apps.per.irc.offers.server.OffersAMImpl.getXMLData(OffersAMImpl.java:1627)
at oracle.apps.per.irc.offers.server.OffersAMImpl.apiValidate(OffersAMImpl.java:2167)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:190)
at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:133)
at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.invokeMethod(OAApplicationModuleImpl.java:784)
at oracle.apps.per.irc.offers.webui.IrcSaveForLaterCO.processFormRequest(IrcSaveForLaterCO.java:208)
at oracle.apps.per.irc.offers.webui.CreateOfferCO.processFormRequest(CreateOfferCO.java:181)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:810)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(OAPageLayoutHelper.java:1159)
at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(OAPageLayoutBean.java:1579)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1022)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:988)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:843)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(OAFormBean.java:395)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:1022)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:988)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:843)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(OABodyBean.java:363)
at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2675)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1682)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:508)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:429)
at oa_html._OA._jspService(_OA.java:85)
at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:417)
at oracle.jsp.JspServlet.doDispatch(JspServlet.java:267)
at oracle.jsp.JspServlet.internalService(JspServlet.java:186)
at oracle.jsp.JspServlet.service(JspServlet.java:156)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
at org.apache.jserv.JServConnection.processRequest(JServConnection.java:456)
at org.apache.jserv.JServConnection.run(JServConnection.java:294)
at java.lang.Thread.run(Thread.java:534)Hi Vivek,
have a look on below comments, it may help you.
This problem will occur if you have application developed in older JDeveloper version (i.e. 9.0.5) deployed on OAS 9.0.x. In older versions there was no syntax check of this type in a data source class. But there is a workaround. Instead of using oracle.jdbc.pool.OracleDataSource data source class within ojdbc14.jar you can use oracle.jdbc.pool.OracleDataSource within classes12.jar.
Classes12.jar was used in older OAS versions.
All you have to do is to copy classes12.jar to $ORACLE_HOME/jdbc/lib and then in OAS Server Properties screen in java options add:
-Xbootclasspath/p:/$ORACLE_HOME/jdbc/lib/classes12.jar statement.
Rename ojdbc14.jar to ojdbc14.zip, restart the OAS instance. This should work.
Regards,
Naren. -
Getting 'variable not in select list' error after extending VO
Hi,
My page is based on two VO. one VO has all transient attribute(LearnerSearchCritVO) and used to capture Search Criteria, The other VO is used for query(LearnerSearchVO).
I have exteneded LearnerSearchCritVO to add 4 new additional Transient attributes
and LearnerSerachVO and its IMPL class to add additional where clause.
After substitution and personalization when I am querying through page I am getting the following error -
## Detail 0 ##
java.sql.SQLException: ORA-01007: variable not in select list
The query is working fine at backend and the same thing was working fine before instance is refreshed.
I am not able to find why this error is coming.
please help me out to sort this issue.Hi All
Sorry to bring this one up again, but I've had a bit of a look around and done as much as I can based on the information given in this and other threads on the subject.
I'm getting the java.sql.SQLException: ORA-01007: variable not in select list error from my extended VO/substitution.
The query is based on a view for easy editing after deployment, so could that have anything to do with it?
Here's the query from the error message:
oracle.apps.fnd.framework.OAException: oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement:
SELECT * FROM (SELECT
SSH.FULL_NAME,
SSH.ASSIGNMENT_NUMBER,
SSH.JOB,
SSH.GRADE,
SSH.ANNUALIZED_SALARY,
SSH.CURRENCY,
SSH.CHANGE_DATE,
SSH.SALARY_BASIS,
SSH.PERSON_ID,
SSH.ASSIGNMENT_ID,
SSH.SUPERVISOR_ID,
SSH.LAST_CHANGE_DATE,
SSH.PAYROLL_NAME,
SSH.NEXT_CHANGE_DATE,
SSH.EMPLOYEE_NUMBER,
SSH.CWK_NUMBER,
SSH.PERSON_TYPE,
SSH.EFFECTIVE_DATE,
SSH.SUPERVISOR_ASSIGNMENT_ID,
SSH.LEGISLATIONCODE,
SSH.MANAGER_ENABLED
FROM XX_SAL_SUP_HRCHY_VO_V SSH) QRSLT
WHERE (((:1 = SUPERVISOR_ID)
AND (:2 = EFFECTIVE_DATE)
AND (:3 = SUPERVISOR_ASSIGNMENT_ID
OR hr_general2.supervisor_assignments_in_use = 'FALSE')))
ORDER BY FULL_NAME
So... What's missing?
Any help appreciated.
CK -
ORA-01007 - variable not in select list error in pl\sql code
Hi,
When I tried to run this program I am getting below error:
ORA-01007 - variable not in select list.Please help to resolve.
Code:
create or replace procedure "XX_BPM_DATA_P" (P_PROCESS_ID IN VARCHAR2)
is
TYPE l_entity_type IS TABLE OF xx_BPM_data.ENTITY%TYPE INDEX BY PLS_INTEGER;
TYPE l_data_type IS TABLE OF XX_BPM_DATA.DATA%TYPE INDEX BY PLS_INTEGER;
TYPE l_count_type IS TABLE OF XX_BPM_DATA.count%TYPE INDEX BY PLS_INTEGER;
l_Entity_v l_Entity_type;
l_data_v l_data_type;
l_count_v l_count_type;
l_security_group_id number;
app_id number(20);
l_Actual_value XX_BPM_DATA.DATA%TYPE;
cursor BPM_CUR is select id,process_id , sequence, to_char(query) query,report_num from xx_test_bpm_dynamic
where
process_id = p_process_id
and report_num=1
order by process_id, sequence;
BEGIN
--delete xx_bpm_data where process_id = p_process_id;
for bpm_rec in bpm_cur
loop
delete xx_bpm_data
where process_id = bpm_rec.process_id
and sequence = bpm_rec.sequence
and report_num = bpm_rec.report_num;
l_security_group_id := apex_custom_auth.get_session_id_from_cookie;
--dbms_output.put_line(l_security_group_id);
execute immediate bpm_rec.query BULK COLLECT INTO l_ENTITY_v,l_DATA_v,l_count_v;
if (bpm_rec.report_num=2) then
app_id:= 108;--NV('APP_ID');
FORALL i IN l_ENTITY_v.FIRST..L_ENTITY_V.LAST
INSERT INTO XX_BPM_DATA
(EnTITY,
value,data,count,
Process_ID,
Sequence,report_num)
VALUES(l_entity_v(i),
l_data_v(i),
'<A HREF="f?p='||app_id||':301:'||':APP_SESSION'||'::::P301_process_id,p301_sequence,p301_id,p301_entity:'||bpm_rec.process_id||','||bpm_rec.sequence||','||bpm_rec.id||','||l_entity_v(i)||':">'||l_data_v(i)||'</A>',
l_count_v(i),bpm_rec.process_id,
BPM_rec.sequence,
bpm_rec.report_num);
else
FORALL i IN l_ENTITY_v.FIRST..L_ENTITY_V.LAST
INSERT INTO XX_BPM_DATA(EnTITY,data,
count,
Process_ID,
Sequence,report_num)
VALUES(l_entity_v(i),
l_data_v(i),
l_count_v(i),
bpm_rec.process_id,
BPM_rec.sequence,
bpm_rec.report_num);
end if;
select round(avg(value),2) into l_actual_value from xx_bpm_data where process_id=bpm_rec.process_id and sequence=bpm_rec.sequence and report_num=bpm_rec.report_num;
update xx_test_bpm_dynamic set value=l_actual_value where process_id=bpm_rec.process_id and sequence=Bpm_rec.sequence and report_num= bpm_rec.report_num;
end loop;
Commit;
END;When I tried to run this program I am getting below error:
ORA-01007 - variable not in select list.Please help to resolve.
You likely would not need any help in you wrote and tested your code using standard best practices.
Your code has NO exception handler and you are NOT identifying each step in the code so that the exception handler could print/log a message telling you EXACTLY which step raised the exception.,
v_step NUMBER;
-- before step 1
v_step := 1;
-- before step 2
v_step := 2;
Then in the exception handler the value of 'v_step' will tell you which step raised the exception.
The exception you posted refers to a 'select list' so examine ALL of the select lists in your code. If you do that you will see that the primary query being run is obtained from a database table and then executed using dynamic SQL
execute immediate bpm_rec.query BULK COLLECT INTO l_ENTITY_v,l_DATA_v,l_count_v;
We have no way of knowing what query is in 'bpm_rec.query' when the exception happens or what columns that query returns. For all we know the query returns 2 columns and you are trying to load 3 collections. Or maybe the query returns 8 columns and you are trying to load 3 collections.
Why don't you print out the query and execute it manually so you can see exactly what the result set looks like?
dbms_output.put_line(bpm_rec.query);
And don't even get us started on why you are using such security-prone dynamic sql to perform this processing instead of using ordinary SQL statements. Or why you are using associative arrays for the BULK COLLECT instead of nested tables.
In short your code could blow up in several places and, because you have NO logging statements, control statements or exception handlers, anyone having to troubleshoot that code would have absolutely no idea what part of it may be the problem. -
Variable not in select list issue
Hi friends,
To the existing OBIA mapping, that is for one of the SDE mapping i dragged a single column from source to source qualifier and also updated that column in the sql query of the source qualifier and finally dragged it to my target staging table.
After that if i tried to run that SDE task in my DAC means, it is failing and returning the below error in log
ora-01007 variable not in select list in informatica
since i have checked and verified the order of the column in the source qualifier port and the query. It is same, but then too returning the above error.
What is the fix for it.
Thanks in advance.
Regards,
SaroHi Svee,
Thanks for the reply.
I followed the below link for adding the extra column to the per-built mapping
http://www.rittmanmead.com/2008/07/amending-existing-category-1-sde-and-sil-mappings-in-oracle-bi-apps-795/+_
Hence for example, i copied the workflow of SDE_ORA_AbsenceEvent to my new custom folder. In that i just tried only with SDE mapping(from source to staging)
i had three source tables for it
per_absence_attendances
per_absence_attendance_types
per_abs_attendance_reasons
Target(staging table)
W_absence_event_ds
i tried of adding a date column "last_updated_by" from the table "per_absence_attendances" to the staging table "W_absence_event_ds"
Before adding the date column, i just tried by copying the SDE_ORA_AbsenceEvent to my custom folder and tried to execute that in DAC as it is loading successfully in my target(staging table) "W_absence_event_ds".
After that i added the date column to the target(staging table) "W_absence_event_ds" and tried to execute the same in DAC, but @ that time only im receiving the variable error.
Like you said
since its OOB mapping you should have 2 workflows(full and incr) for the same mapping, make sure your changes are affected to workflow ending with _Full.I dint copied the workflow SDE_ORA_AbsenceEvent_full to my custom folder. Whether is this the problem for this variable error whether can i copy the full(workflow) and can i try.
And also a good news that OBIA 7.9.6.4 and DAC 11g released.
http://www.oracle.com/technetwork/middleware/bi-enterprise-edition/downloads/bi-downloads-1525270.html_+
Regards,
Saro -
Variable not in select list -- Error in VO substitution
I substitution VO using the query below it show message error "variable not in select list". I tested to removed bind variables from the query and substitution again it still show this error message.
What is the cause of this problems.
Please provide me the solution step by step for this issue.
SELECT poe.objective_id, poe.NAME, poe.target_date, poe.start_date,
poe.business_group_id, poe.object_version_number,
poe.owning_person_id, poe.achievement_date, poe.detail,
poe.comments, poe.success_criteria, poe.appraisal_id,
poe.attribute_category, poe.attribute1, poe.attribute2,
poe.attribute3, poe.attribute4, poe.attribute5,
poe.attribute6, poe.attribute7, poe.attribute8,
poe.attribute9, poe.attribute10, poe.attribute11,
poe.attribute12, poe.attribute13, poe.attribute14,
poe.attribute15, poe.attribute16, poe.attribute17,
poe.attribute18, poe.attribute19, poe.attribute20,
ppr.performance_rating_id,
ppr.objective_id AS perf_objective_id,
ppr.object_version_number AS perf_object_version_number,
ppr.appraisal_id AS perf_appraisal_id,
ppr.performance_level_id, ppr.comments AS perf_comments,
ppr.person_id,
DECODE
(fnd_global.employee_id,
pap.main_appraiser_id, 'EnableUpdate',
(DECODE (owning_person_id,
:1, DECODE (pap.appraisee_person_id,
owning_person_id, 'EnableUpdate',
'EnableRatUpdate'
-3, 'EnableUpdate',
NVL2 (:2, 'EnableRatUpdate', 'DisableUpdate')
) AS creator,
ppr.performance_level_id AS perf_level_id,
DECODE
(fnd_global.employee_id,
pap.main_appraiser_id, (NVL
((SELECT DISTINCT 'DisableDelete'
FROM per_performance_ratings ratings
WHERE ratings.objective_id =
poe.objective_id
AND ratings.person_id <>
pap.main_appraiser_id),
'EnableDelete'
(DECODE (owning_person_id,
:3, NVL ((SELECT DISTINCT 'DisableDelete'
FROM per_performance_ratings ratings
WHERE ratings.objective_id =
poe.objective_id
AND ratings.person_id <>
poe.owning_person_id),
'EnableDelete'
'DisableDelete'
) AS delete_obj,
ppr.attribute_category AS perf_attr_category,
ppr.attribute1 AS perf_attribute1,
ppr.attribute2 AS perf_attribute2,
ppr.attribute3 AS perf_attribute3,
ppr.attribute4 AS perf_attribute4,
ppr.attribute5 AS perf_attribute5,
ppr.attribute6 AS perf_attribute6,
ppr.attribute7 AS perf_attribute7,
ppr.attribute8 AS perf_attribute8,
ppr.attribute9 AS perf_attribute9,
ppr.attribute10 AS perf_attribute10,
ppr.attribute11 AS perf_attribute11,
ppr.attribute12 AS perf_attribute12,
ppr.attribute13 AS perf_attribute13,
ppr.attribute14 AS perf_attribute14,
ppr.attribute15 AS perf_attribute15,
ppr.attribute16 AS perf_attribute16,
ppr.attribute17 AS perf_attribute17,
ppr.attribute18 AS perf_attribute18,
ppr.attribute19 AS perf_attribute19,
ppr.attribute20 AS perf_attribute20,
ppr.comments AS perf_comments_oa,
ppr1.performance_rating_id AS ref1_perf_rating_id,
ppr1.performance_level_id AS ref1_perf_level_id,
ppr1.comments AS ref1_comments,
ppr1.attribute_category AS ref1_attribute_category,
ppr1.attribute1 AS ref1_attribute1,
ppr1.attribute2 AS ref1_attribute2,
ppr1.attribute3 AS ref1_attribute3,
ppr1.attribute4 AS ref1_attribute4,
ppr1.attribute5 AS ref1_attribute5,
ppr1.attribute6 AS ref1_attribute6,
ppr1.attribute7 AS ref1_attribute7,
ppr1.attribute8 AS ref1_attribute8,
ppr1.attribute9 AS ref1_attribute9,
ppr1.attribute10 AS ref1_attribute10,
ppr1.attribute11 AS ref1_attribute11,
ppr1.attribute12 AS ref1_attribute12,
ppr1.attribute13 AS ref1_attribute13,
ppr1.attribute14 AS ref1_attribute14,
ppr1.attribute15 AS ref1_attribute15,
ppr1.attribute16 AS ref1_attribute16,
ppr1.attribute17 AS ref1_attribute17,
ppr1.attribute18 AS ref1_attribute18,
ppr1.attribute19 AS ref1_attribute19,
ppr1.attribute20 AS ref1_attribute20,
ppr2.performance_rating_id AS ref2_perf_rating_id,
ppr2.performance_level_id AS ref2_perf_level_id,
ppr2.comments AS ref2_comments,
ppr2.attribute_category AS ref2_attribute_category,
ppr2.attribute1 AS ref2_attribute1,
ppr2.attribute2 AS ref2_attribute2,
ppr2.attribute3 AS ref2_attribute3,
ppr2.attribute4 AS ref2_attribute4,
ppr2.attribute5 AS ref2_attribute5,
ppr2.attribute6 AS ref2_attribute6,
ppr2.attribute7 AS ref2_attribute7,
ppr2.attribute8 AS ref2_attribute8,
ppr2.attribute9 AS ref2_attribute9,
ppr2.attribute10 AS ref2_attribute10,
ppr2.attribute11 AS ref2_attribute11,
ppr2.attribute12 AS ref2_attribute12,
ppr2.attribute13 AS ref2_attribute13,
ppr2.attribute14 AS ref2_attribute14,
ppr2.attribute15 AS ref2_attribute15,
ppr2.attribute16 AS ref2_attribute16,
ppr2.attribute17 AS ref2_attribute17,
ppr2.attribute18 AS ref2_attribute18,
ppr2.attribute19 AS ref2_attribute19,
ppr2.attribute20 AS ref2_attribute20, poe.scorecard_id,
poe.attribute21, poe.attribute22, poe.attribute23,
poe.attribute24, poe.attribute25, poe.attribute26,
poe.attribute27, poe.attribute28, poe.attribute29,
poe.attribute30, poe.copied_from_library_id,
poe.copied_from_objective_id, poe.aligned_with_objective_id,
poe.next_review_date, poe.group_code, poe.priority_code,
poe.appraise_flag, poe.verified_flag, poe.weighting_percent,
poe.complete_percent, poe.target_value, poe.actual_value,
poe.uom_code, poe.measurement_style_code, poe.measure_name,
poe.measure_type_code, poe.measure_comments,
poe.sharing_access_code,
DECODE (NVL (poe.measurement_style_code, 'N_M'),
'N_M', 0,
1
) render_none,
DECODE (NVL (poe.measurement_style_code, 'QUALIT_M'),
'QUALIT_M', 0,
(DECODE (poe.measurement_style_code,
'QUANT_M', 1,
0
) render_quant,
DECODE (NVL (poe.measurement_style_code, 'QUANT_M'),
'QUANT_M', 0,
(DECODE (poe.measurement_style_code,
'QUALIT_M', 1,
0
) render_quali
,Fao_pems_utility.Avg_step_value(POE.APPRAISAL_ID,
'MULTIRATER',
'WO',
PPR.OBJECTIVE_ID) MULTIRATERS_AVERAGE,
Fao_pems_utility.Count_ratings(Null,
Null,
POE.APPRAISAL_ID,
PPR.OBJECTIVE_ID,
NULL,
'MULTIRATER',
'WO') || ' out of ' ||
(Fao_pems_utility.How_many_rating(POE.APPRAISAL_ID,
'GROUPAPPRAISER') +
Fao_pems_utility.How_many_rating(POE.APPRAISAL_ID,
'REVIEWER')) COUNT_MULTIRATERS
FROM per_objectives poe,
per_performance_ratings ppr,
per_performance_ratings ppr1,
per_performance_ratings ppr2,
per_appraisals pap
WHERE poe.objective_id = ppr.objective_id(+)
AND poe.objective_id = ppr1.objective_id(+)
AND poe.objective_id = ppr2.objective_id(+)
AND poe.appraisal_id = :4
AND ppr.person_id(+) = :5
AND ppr1.person_id(+) = :6
AND ppr2.person_id(+) = :7
AND pap.appraisal_id = poe.appraisal_idHi,
I think the error is due to the following column
DECODE
(fnd_global.employee_id,
pap.main_appraiser_id, (NVL
((SELECT DISTINCT 'DisableDelete'
FROM per_performance_ratings ratings
WHERE ratings.objective_id =
poe.objective_id
AND ratings.person_id
pap.main_appraiser_id),
'EnableDelete'
(DECODE (owning_person_id,
:3, NVL ((SELECT DISTINCT 'DisableDelete'
FROM per_performance_ratings ratings
WHERE ratings.objective_id =
poe.objective_id
AND ratings.person_id
poe.owning_person_id),
'EnableDelete'
'DisableDelete'
) AS delete_obj
Verify it and let us know ..
Thanks,
Kumar -
ORA-01007 - variable not in select list - Oracle forms 6i
Hi!
I´m creating an form with one field called "txtquery". The user can write a query on this field and click on button with code above. The form will create a text file with the result of the query writing. I managed to create a function in oracle and it worked perfectly but I want to solve without creating any object in the database.
Sorry for my bad english!
I wrote the following code:
DECLARE
VISCONNECTED BOOLEAN;
VCONEXAO EXEC_SQL.CONNTYPE;
VARQUIVO_SAIDA TEXT_IO.FILE_TYPE;
VCURSOR EXEC_SQL.CURSTYPE;
VCOLUMNVALUE VARCHAR2(2000);
VSTATUS PLS_INTEGER;
VNUMCOLUNAS NUMBER DEFAULT 0;
VSEPARADOR VARCHAR2(10) DEFAULT ';';
VCONTADOR NUMBER DEFAULT 0;
BEGIN
VCONEXAO := EXEC_SQL.DEFAULT_CONNECTION;
VISCONNECTED := EXEC_SQL.IS_CONNECTED;
IF NOT VISCONNECTED THEN
MSG_ALERT('Não conectado.', 'E', TRUE);
ELSE
VCURSOR := EXEC_SQL.OPEN_CURSOR;
END IF;
BEGIN
EXEC_SQL.PARSE(VCONEXAO, VCURSOR, :BLK.TXTQUERY, EXEC_SQL.V7);
EXCEPTION
WHEN OTHERS THEN
MSG_ALERT('Ocorreu o erro ' || SQLERRM || ' executando parse da query!', 'E', TRUE);
END;
BEGIN
IF TEXT_IO.IS_OPEN(VARQUIVO_SAIDA) THEN
TEXT_IO.FCLOSE(VARQUIVO_SAIDA);
END IF;
VARQUIVO_SAIDA := TEXT_IO.FOPEN(:BLK.TXTDIRECTORY || :BLK.TXTFILENAME, 'w');
EXCEPTION
WHEN OTHERS THEN
MSG_ALERT('Ocorreu o erro ' || SQLERRM || ' criando arquivo no disco!', 'E', TRUE);
END;
BEGIN
FOR I IN 1 .. 255 LOOP
BEGIN
EXEC_SQL.DEFINE_COLUMN(VCURSOR, I, VCOLUMNVALUE, 2000);
VNUMCOLUNAS := I;
EXCEPTION
WHEN OTHERS THEN
IF (SQLCODE = -1007) THEN
EXIT;
ELSE
RAISE FORM_TRIGGER_FAILURE;
END IF;
END;
END LOOP;
EXCEPTION
WHEN OTHERS THEN
MSG_ALERT('Ocorreu o erro ' || SQLERRM || ' executando define_column!', 'E', TRUE);
END;
EXEC_SQL.DEFINE_COLUMN(VCURSOR, 1, VCOLUMNVALUE, 20000);
BEGIN
VSTATUS := EXEC_SQL.EXECUTE(VCURSOR); -- ----------------------->> ERROR HERE!!!!!!!!
EXCEPTION
WHEN OTHERS THEN
MSG_ALERT('Ocorreu o erro ' || EXEC_SQL.LAST_ERROR_MESG || ' fazendo execute para a query!', 'E', TRUE);
END;
BEGIN
LOOP
EXIT WHEN(EXEC_SQL.FETCH_ROWS(VCURSOR) <= 0);
VSEPARADOR := '';
FOR I IN 1 .. VNUMCOLUNAS LOOP
EXEC_SQL.COLUMN_VALUE(VCURSOR, I, VCOLUMNVALUE);
TEXT_IO.PUT_LINE(VARQUIVO_SAIDA, VSEPARADOR || VCOLUMNVALUE);
VSEPARADOR := :BLK.TXTSEPARATOR;
END LOOP;
TEXT_IO.NEW_LINE(VARQUIVO_SAIDA);
VCONTADOR := VCONTADOR + 1;
END LOOP;
EXCEPTION
WHEN OTHERS THEN
MSG_ALERT('Ocorreu o erro ' || SQLERRM || ' criando linhas no arquivo texto!', 'E', TRUE);
END;
BEGIN
EXEC_SQL.CLOSE_CURSOR(VCURSOR);
EXCEPTION
WHEN OTHERS THEN
MSG_ALERT('Ocorreu o erro ' || SQLERRM || ' fechando cursor!', 'E', TRUE);
END;
BEGIN
TEXT_IO.FCLOSE(VARQUIVO_SAIDA);
EXCEPTION
WHEN OTHERS THEN
MSG_ALERT('Ocorreu o erro ' || SQLERRM || ' fechando arquivo!', 'E', TRUE);
END;
END;------------------------------------------
But, on line "VSTATUS := EXEC_SQL.EXECUTE(VCURSOR);" i get the error (ORA-01007 - VARIABLE NOT IN SELECT LIST). Whats is wrong?
Thanks a lot!!!The user can write a query on this field and click on button with code above.This is such a big NO NO NO! A user writing his own queries? You are really asking for problems.
VSTATUS := EXEC_SQL.EXECUTE(VCURSOR); -- ----------------------->> ERROR HERE!!!!!!!!What is the value of vcursor? -
Hi!
I have a problem with List View Report in mobile application (theme 50 in apex) after updating to apex 4.2.2. I created Report -> List View. I used select from pipelined function in Region Source. Then when page is running and submited three times (or refreshed three times) I get an error:
Error during rendering of region "LIST VIEW".
ORA-01007: variable not in select list
Technical Info (only visible for developers)
is_internal_error: true
apex_error_code: APEX.REGION.UNHANDLED_ERROR
ora_sqlcode: -1007
ora_sqlerrm: ORA-01007: variable not in select list
component.type: APEX_APPLICATION_PAGE_REGIONS
component.id: 21230833903737364557
component.name: LIST VIEW
error_backtrace:
ORA-06512: at "APEX_040200.WWV_FLOW_DISP_PAGE_PLUGS", line 4613
ORA-06512: at "APEX_040200.WWV_FLOW_DISP_PAGE_PLUGS", line 3220
I get this error only when I use select from pipelined function in Region Source (for example: "select value1, value2 from table(some_pipelined_function(param1, param2)) ").
You can check it on http://apex.oracle.com/pls/apex/f?p=50591 (login - demo, password - demo).
In this application:
- I created package TAB_TYPES_PKG:
create or replace PACKAGE TAB_TYPES_PKG IS
TYPE cur_rest_r IS RECORD (
STR_NAME VARCHAR2(128),
INFO VARCHAR2(128)
TYPE cur_rest_t IS TABLE OF cur_rest_r;
END TAB_TYPES_PKG;
- I created pipelined function TEST_FUNC:
create or replace
FUNCTION TEST_FUNC
RETURN TAB_TYPES_PKG.cur_rest_t PIPELINED IS
r_cur_rest TAB_TYPES_PKG.cur_rest_r;
BEGIN
r_cur_rest.STR_NAME := 'ROW 1';
r_cur_rest.INFO := '10';
PIPE ROW (r_cur_rest);
r_cur_rest.STR_NAME := 'ROW 2';
r_cur_rest.INFO := '20';
PIPE ROW (r_cur_rest);
r_cur_rest.STR_NAME := 'ROW 3';
r_cur_rest.INFO := '30';
PIPE ROW (r_cur_rest);
r_cur_rest.STR_NAME := 'ROW 4';
r_cur_rest.INFO := '40';
PIPE ROW (r_cur_rest);
r_cur_rest.STR_NAME := 'ROW 5';
r_cur_rest.INFO := '50';
PIPE ROW (r_cur_rest);
RETURN;
END TEST_FUNC;
- I created List View Report on Page 1:
Region Source:
SELECT str_name,
info
FROM TABLE (TEST_FUNC)
We can see error ORA-01007 after refresing (or submiting) Page 1 three times or more.
How to fix it?Hi all
I'm experiencing the same issue. Predictably on every third refresh I receive:
Error
Error during rendering of region "Results".
ORA-01007: variable not in select list
Technical Info (only visible for developers)
is_internal_error: true
apex_error_code: APEX.REGION.UNHANDLED_ERROR
ora_sqlcode: -1007
ora_sqlerrm: ORA-01007: variable not in select list
component.type: APEX_APPLICATION_PAGE_REGIONS
component.id: 6910805644140264
component.name: Results
error_backtrace: ORA-06512: at "APEX_040200.WWV_FLOW_DISP_PAGE_PLUGS", line 4613 ORA-06512: at "APEX_040200.WWV_FLOW_DISP_PAGE_PLUGS", line 3220
OK
I am running Application Express 4.2.2.00.11 on GlassFish 4 using Apex Listener 2.0.3.221.10.13.
Please note: this works perfectly using a classic report in my desktop application; however, no joy on the mobile side with a list view. I will use a classic report in the interim.
My region source is as follows:
SELECT description AS "DESCRIPTION", reference AS "REFERENCE" FROM TABLE(AUTOCOMPLETE_LIST_VIEW_FNC('RESULTS'))
The procedure:
FUNCTION AUTOCOMPLETE_LIST_VIEW_FNC(
p_collection_name IN VARCHAR2)
RETURN list_row_table_type
AS
v_tab list_row_table_type := list_row_table_type();
BEGIN
DECLARE
jsonarray json_list;
jsonobj json;
json_clob CLOB;
BEGIN
SELECT clob001
INTO json_clob
FROM apex_collections
WHERE collection_name = p_collection_name;
jsonobj := json(json_clob);
jsonarray := json_ext.get_json_list(jsonobj, 'predictions');
FOR i IN 1..jsonArray.count
LOOP
jsonobj := json(jsonArray.get(i));
v_tab.extend;
v_tab(v_tab.LAST) := list_row_type(json_ext.get_string(jsonobj, 'description'), json_ext.get_string(jsonobj, 'reference'));
END LOOP;
RETURN(v_tab);
END;
END AUTOCOMPLETE_LIST_VIEW_FNC;
Thanks!
Tim -
Error - Variable not in select list
Hi everybody;
I get an error with this code :
type t_doubl_mod_port is table of COUPLE_BOOL_A%rowtype;
doublons t_doubl_mod_port;
FUNCTION recherche_doublon (tabl IN VARCHAR2)
RETURN t_doubl
IS
return_doubl t_doubl
BEGIN
EXECUTE IMMEDIATE 'SELECT MODELE,PORT FROM '|| tabl ||' group by MODELE,PORT having count(*) > 1' BULK COLLECT INTO return_doubl;
RETURN return_doubl;
END recherche_doublon;I got this error :
ERROR at line 1:
ORA-01007: variable not in select list
ORA-06512: at line 10
ORA-06512: at line 16Need help please. :/
Edited by: Moostiq on 7 janv. 2010 15:46I created the type triplet like that :
CREATE TYPE triplet AS OBJECT (MODELE VARCHAR2(16), PORT VARCHAR2(16), N0_OCCURRENCE NUMERIC(2));OK.
Then I change the type of what I want to display with dbms_output:
type t_doubl_mod_port_occ is table of triplet;
doublons t_doubl_mod_port_occ;But I get this error :
*** table : COUPLE
DECLARE
ERROR at line 1:
ORA-00932: inconsistent datatypes: expected UDT got CHAR
ORA-06512: at line 27 ==> EXECUTE IMMEDIATE etc...
ORA-06512: at line 36 ==> doublons:=recherche_doublon_mod_port (collection(i));My actual code :
FUNCTION recherche_doublon_mod_port (tabl IN VARCHAR2)
RETURN t_doubl_mod_port_occ
IS
return_doubl t_doubl_mod_port_occ;
BEGIN
EXECUTE IMMEDIATE 'SELECT MODELE,PORT,N0_OCCURRENCE FROM '|| tabl ||' group by MODELE,PORT,N0_OCCURRENCE having count(*) > 1' BULK COLLECT INTO return_doubl;
RETURN return_doubl;
END recherche_doublon_mod_port;
BEGIN
collection := get_tables_with_columns('MODELE','PORT');
IF collection IS NOT NULL AND collection.count()> 0 THEN
FOR i IN collection.first()..collection.last() LOOP
dbms_output.put_line(' *** table : '|| collection(i));
doublons:=recherche_doublon_mod_port (collection(i));
IF doublons IS NOT null AND doublons.count() > 0 THEN
FOR i IN doublons.first()..doublons.last()
LOOP
dbms_output.put_line('doublons modele/port MODELE:'||doublons(i).MODELE);
END LOOP;
END IF;
END LOOP;
END IF;
END;
/Someone could help me ?
Edited by: Moostiq on 7 janv. 2010 16:38
Edited by: Moostiq on 7 janv. 2010 16:43
Edited by: Moostiq on 7 janv. 2010 16:44
Edited by: Moostiq on 7 janv. 2010 16:44 -
ORA-01007: variable not in select list
Using Oracle 8 on Linux, I have editted one main Pro*C program (tpc1.pc) which logon database and called two functions each implemented in separate source Pro*C program (txna.pc and txnb.pc). After linking into an executable program and running it, the mentioned error occurs. I tried to look into the source code and I cannot locate the error. Please help.
nullI hate to say this, but you ever get this running you are going to kill whatever database you put it into.
-
SQL query with Bind variable with slower execution plan
I have a 'normal' sql select-insert statement (not using bind variable) and it yields the following execution plan:-
Execution Plan
0 INSERT STATEMENT Optimizer=CHOOSE (Cost=7 Card=1 Bytes=148)
1 0 HASH JOIN (Cost=7 Card=1 Bytes=148)
2 1 TABLE ACCESS (BY INDEX ROWID) OF 'TABLEA' (Cost=4 Card=1 Bytes=100)
3 2 INDEX (RANGE SCAN) OF 'TABLEA_IDX_2' (NON-UNIQUE) (Cost=3 Card=1)
4 1 INDEX (FAST FULL SCAN) OF 'TABLEB_IDX_003' (NON-UNIQUE)
(Cost=2 Card=135 Bytes=6480)
Statistics
0 recursive calls
18 db block gets
15558 consistent gets
47 physical reads
9896 redo size
423 bytes sent via SQL*Net to client
1095 bytes received via SQL*Net from client
3 SQL*Net roundtrips to/from client
1 sorts (memory)
0 sorts (disk)
55 rows processed
I have the same query but instead running using bind variable (I test it with both oracle form and SQL*plus), it takes considerably longer with a different execution plan:-
Execution Plan
0 INSERT STATEMENT Optimizer=CHOOSE (Cost=407 Card=1 Bytes=148)
1 0 TABLE ACCESS (BY INDEX ROWID) OF 'TABLEA' (Cost=3 Card=1 Bytes=100)
2 1 NESTED LOOPS (Cost=407 Card=1 Bytes=148)
3 2 INDEX (FAST FULL SCAN) OF TABLEB_IDX_003' (NON-UNIQUE) (Cost=2 Card=135 Bytes=6480)
4 2 INDEX (RANGE SCAN) OF 'TABLEA_IDX_2' (NON-UNIQUE) (Cost=2 Card=1)
Statistics
0 recursive calls
12 db block gets
3003199 consistent gets
54 physical reads
9448 redo size
423 bytes sent via SQL*Net to client
1258 bytes received via SQL*Net from client
3 SQL*Net roundtrips to/from client
1 sorts (memory)
0 sorts (disk)
55 rows processed
TABLEA has around 3million record while TABLEB has 300 records. Is there anyway I can improve the speed of the sql query with bind variable? I have DBA Access to the database
Regards
IvanMany thanks for your reply.
I have run the statistic already for the both tableA and tableB as well all the indexes associated with both table (using dbms_stats, I am on 9i db ) but not the indexed columns.
for table I use:-
begin
dbms_stats.gather_table_stats(ownname=> 'IVAN', tabname=> 'TABLEA', partname=> NULL);
end;
for index I use:-
begin
dbms_stats.gather_index_stats(ownname=> 'IVAN', indname=> 'TABLEB_IDX_003', partname=> NULL);
end;
Is it possible to show me a sample of how to collect statisc for INDEX columns stats?
regards
Ivan -
Issue with SQL Query with Presentation Variable as Data Source in BI Publisher
Hello All
I have an issue with creating BIP report based on OBIEE reports which is done using direct SQL. There is this one report in OBIEE dashboard, which is written using direct SQL. To create the pixel perfect version of this report, I am creating BIP data model using SQL Query as data source. The physical query that is used to create OBIEE report has several presentation variables in its where clause.
select TILE4,max(APPTS), 'Top Count' from
SELECT c5 as division,nvl(DECODE (C2,0,0,(c1/c2)*100),0) AS APPTS,NTILE (4) OVER ( ORDER BY nvl(DECODE (C2,0,0,(c1/c2)*100),0)) AS TILE4,
c4 as dept,c6 as month FROM
select sum(case when T6736.TYPE = 'ATM' then T7608.COUNT end ) as c1,
sum(case when T6736.TYPE in ('Call Center', 'LSM') then T7608.CONFIRMED_COUNT end ) as c2,
T802.NAME_LEVEL_6 as c3,
T802.NAME_LEVEL_1 as c4,
T6172.CALENDARMONTHNAMEANDYEAR as c5,
T6172.CALENDARMONTHNUMBERINYEAR as c6,
T802.DEPT_CODE as c7
from
DW_date_DIM T6736 /* z_dim_date */ ,
DW_MONTH_DIM T6172 /* z_dim_month */ ,
DW_GEOS_DIM T802 /* z_dim_dept_geo_hierarchy */ ,
DW_Count_MONTH_AGG T7608 /* z_fact_Count_month_agg */
where ( T802.DEpt_CODE = T7608.DEPT_CODE and T802.NAME_LEVEL_1 = '@{PV_D}{RSD}'
and T802.CALENDARMONTHNAMEANDYEAR = 'July 2013'
and T6172.MONTH_KEY = T7608.MONTH_KEY and T6736.DATE_KEY = T7608.DATE_KEY
and (T6172.CALENDARMONTHNUMBERINYEAR between substr('@{Month_Start}',0,6) and substr('@{Month_END}',8,13))
and (T6736.TYPE in ('Call Center', 'LSM')) )
group by T802.DEPT_CODE, T802.NAME_LEVEL_6, T802.NAME_LEVEL_1, T6172.CALENDARMONTHNAMEANDYEAR, T6172.CALENDARMONTHNUMBERINYEAR
order by c4, c3, c6, c7, c5
))where tile4=3 group by tile4
When I try to view data after creating the data set, I get the following error:
Failed to load XML
XML Parsing Error: mismatched tag. Expected: . Location: http://172.20.17.142:9704/xmlpserver/servlet/xdo Line Number 2, Column 580:
Now when I remove those Presention variables (@{PV1}, @{PV2}) in the query with some hard coded values, it is working fine.
So I know it is the PV that's causing this error.
How can I work around it?
There is no way to create equivalent report without using the direct sql..
Thanks in advanceI have found a solution to this problem after some more investigation. PowerQuery does not support to use SQL statement as source for Teradata (possibly same for other sources as well). This is "by design" according to Microsoft. Hence the problem
is not because different PowerQuery versions as mentioned above. When designing the query in PowerQuery in Excel make sure to use the interface/navigation to create the query/select tables and NOT a SQL statement. The SQL statement as source works fine on
a client machine but not when scheduling it in Power BI in the cloud. I would like to see that the functionality within PowerQuery and Excel should be the same as in Power BI in the cloud. And at least when there is a difference it would be nice with documentation
or more descriptive errors.
//Jonas -
SQL Query with a variable?
In Inventory > Item Master Data > Properties
There are 'Property Name' and a column of checkboxes..
How can I write a query to select the Property Names when the checkboxes are checked?
My problem is the column of checkboxes does not show a table or column where its located, it only shows a variable..
Is there away I can use variables in my SQL query?
Any help is appreciated, thank you.Hi David,
Each of those properties are linked to a field named QryGroupX, where the X starts at 1 and ends at 64. Each columns takes a "Y" ou "N" value.
Don't know if this is what you want:
Public Function GetBPProperties(ByRef oCompany As SAPbobsCOM.Company, ByRef oApplication As SAPbouiCOM.Application, ByRef CardCode As String) As String
GetBPProperties = ""
Try
Dim oRS As SAPbobsCOM.Recordset = oCompany.GetBusinessObject(BoObjectTypes.BoRecordset)
For i As Integer = 1 To 64
oRS.DoQuery("SELECT * FROM [dbo].[OCRD] T0 WHERE T0.CardCode='" & CardCode & "' AND T0.QryGroup" & i.ToString & " = 'Y'")
If oRS.RecordCount > 0 Then
GetBPProperties += ", " & i
End If
Next
Catch ex As Exception
oApplication.MessageBox(ex.Message)
End Try
End Function
Hope it helps,
Vítor Vieira -
How do I Send in a value to the SQL Query Expression's variable created using Declare in Power Query
I have gone through the other posts where in a parameter is sent to query created by power query but my ask is a bit different.
I am using a sql query to retrieve data using Power query which has 2 variables declared in the DECLARE section in the query.
Ex:
declare @Name varchar(1000)
SET @Name= 'Alpha'
declare @location nvarchar(1000)
SET @location= 'Bravo'
Select * from Infotable where Name = @Name and location = @location.
Now in the following query I would want to send in the values for the declared variables using a table in my worksheet. I have followed the stuff present in the following post
http://blog.oraylis.de/2013/05/using-dynamic-parameter-values-in-power-query-queries/
but when using the value name (let Name_parameter = Excel.Currentworkbook(), Name_Value = Name_Parameter [0][value]) in the Advance Editor as mentioned in the above post I am being thrown an error stating Name_Value column doesn't exist.
I am having a tough time figuring out what the problem could be..I have gone through the other posts where in a parameter is sent to query created by power query but my ask is a bit different.
I am using a sql query to retrieve data using Power query which has 2 variables declared in the DECLARE section in the query.
Ex:
declare @Name varchar(1000)
SET @Name= 'Alpha'
declare @location nvarchar(1000)
SET @location= 'Bravo'
Select * from Infotable where Name = @Name and location = @location.
Now in the following query I would want to send in the values for the declared variables using a table in my worksheet. I have followed the stuff present in the following post
http://blog.oraylis.de/2013/05/using-dynamic-parameter-values-in-power-query-queries/
but when using the value name (let Name_parameter = Excel.Currentworkbook(), Name_Value = Name_Parameter [0][value]) in the Advance Editor as mentioned in the above post I am being thrown an error stating Name_Value column doesn't exist.
I am having a tough time figuring out what the problem could be.. -
Problem creating an sql query with a parameter which is a list
Hi,
Im having a problem creating a certain SQL query.
The query looks like this:
SELECT gstock_id FROM germplasm_stock gps, germplasm gp WHERE gps.germplasm_id = gp.germplasm_id AND organism_id IN ($childList:VARCHAR).
the organism_id field is of DECIMAL type.
the parameter childList is actually a list of Id's, something like: 123,124,789
and it is created dynamically by an other function, so I cant just put it there staticlly.
I tried using the ARRAY type instead of VARCHAR, but that didn't work,
anyone knows how can I give this query a parameter which is a list of numbers ?
ThanksI have tried all the following options and the same issue occurs:
EXEC dbo.uspGetSiteChanges @ChangeVersion = ?
With Parameter: 0, @ChangeVersion, ChangeVersion
EXEC dbo.uspGetSiteChanges ?
With Parameter: 0, @ChangeVersion, ChangeVersion
In my first data flow I use the following and it works on two OLE DB Sources:
EXEC dbo.uspGetSiteChanges @ChangeVersion = ?
With:
In my second data flow task, I use the same command and parameter mappings and it fails, very strange.
Maybe you are looking for
-
Month view off "Date" app on Palm Desktop by ACCESS 6.2.2
I have Windows XP (Home) with Palm Desktop by ACCESS 6.2.2. I also have a Palm Z22 and a HP TouchPad. My problem is with the Palm Desktop. In the "Date" application it will not display the Month view. There is no problem with the Day or Week view, bu
-
Hi, I just installed the IPCC exprss in my call manager publisher. No error during the instalation. But I got a error message in even log. Cisco desktop enterprise type: Information Event ID: 2 SS3101 setup monitor failed connection failed, end
-
IN SM51- Need to change Application server hostname as small lock
Dear All, In my SAP R3 4.6D system setup is like 1. R3 Database server (CI+DB) with one application server(DI). In Application server SM51 transaction screen application server host name is shows as Caps lock. But DB server hostname is in small lock
-
Is there any way to work with 1440 x 1080 footage into FCP 4.5 ?
-
Show/hide based on Multiple selections in a select box
In my http header I have the following code... it works great as long as only one value is selected: if you highlight the ARRAMO value the DUNS field appears... if you highlight anything else the DUNS field disappears... but if I highlight both ARRAM