(URGENT)Problem in PL/SQL package with date.
Hi,
When I am running this query
"SELECT a.street_addr address, a.mailing_city_name city,
d.pa_cust_name county, a.zip_cd zip,
a.last_update_dt lastdate, a.status_cd status
FROM CWT003_PEND_ADDR a,
CWT004_ACTVITY_LOG b,
CWT005_PUBLIC_AUTH c,
CWT005_PUBLIC_AUTH d
WHERE a.address_id = b.address_id(+)
AND a.city_cust_num = c.pa_cust_num(+)
AND c.parent_pa_num = d.pa_cust_num(+)
AND (b.action_flag = 'A' OR b.action_flag = 'I')
AND b.user_prof_id = NVL(NULL,b.user_prof_id)
AND ( NVL (TO_DATE('01-oct-2006'),
TO_DATE ('1-1-1900', 'MM-DD-YYYY')) =
TO_DATE ('1-1-1900', 'MM-DD-YYYY')
OR b.activity_tstmp >= TO_DATE('01-oct-2006')
AND ( NVL (TO_DATE('01-nov-2006'),
TO_DATE ('1-1-1900', 'MM-DD-YYYY')
) = TO_DATE ('1-1-1900', 'MM-DD-YYYY')
OR b.activity_tstmp <= TO_DATE('01-nov-2006')
AND ( NVL (NULL, -1) = -1
OR a.district_no = ''
AND a.city_cust_num IN (SELECT pa_cust_num
FROM CWT005_PUBLIC_AUTH Y
WHERE NVL(Y.parent_pa_num,-1) =
NVL(NULL,NVL(Y.parent_pa_num,-1)))
AND NVL(a.city_cust_num,-1) = NVL(NULL,NVL(a.CITY_CUST_NUM,-1))"
I am getting the desired o/p.
But when I call the following package;
CREATE OR REPLACE PACKAGE Test_Pkg_Dip
AS
PROCEDURE test_proc;
END Test_Pkg_Dip;
CREATE OR REPLACE PACKAGE BODY Test_Pkg_Dip
AS
PROCEDURE test_proc
IS
l_report_req_date CWT009_REPORT_RQST.report_req_dt%TYPE;
l_report_type CWT009_REPORT_RQST.report_type%TYPE;
l_req_user_prof_id CWT009_REPORT_RQST.req_user_prof_id%TYPE;
l_rqst_city_num CWT009_REPORT_RQST.rqst_city_num%TYPE;
l_rqst_county_num CWT009_REPORT_RQST.rqst_county_num%TYPE;
l_rqst_from_dt VARCHAR2 (50);
l_rqst_org_num CWT009_REPORT_RQST.rqst_org_num%TYPE;
l_rqst_to_dt VARCHAR2 (50);
l_rqst_user_prof_id CWT009_REPORT_RQST.rqst_user_prof_id%TYPE;
l_city_cust_num CWT002_USR_CTY_REL.city_cust_num%TYPE;
l_count NUMBER := 0;
l_address CWT003_PEND_ADDR.street_addr%TYPE;
l_city CWT003_PEND_ADDR.mailing_city_name%TYPE;
l_county CWT005_PUBLIC_AUTH.pa_cust_name%TYPE;
l_zip CWT003_PEND_ADDR.zip_cd%TYPE;
l_last_worked_date CWT003_PEND_ADDR.last_update_dt%TYPE;
l_status CWT003_PEND_ADDR.status_cd%TYPE;
CURSOR cur_report_entries
IS
SELECT a.report_req_dt, a.report_type, a.req_user_prof_id,
a.rqst_city_num, a.rqst_county_num,
TO_CHAR (a.rqst_from_dt, 'DD-MON-YYYY'), a.rqst_org_num,
TO_CHAR (a.rqst_to_dt, 'DD-MON-YYYY'), a.rqst_user_prof_id
FROM (SELECT x.report_req_dt, x.report_type, x.req_user_prof_id,
x.rqst_city_num, x.rqst_county_num, x.rqst_from_dt,
x.rqst_org_num, x.rqst_to_dt, x.rqst_user_prof_id
FROM CWT009_REPORT_RQST x
ORDER BY report_type) a
WHERE ROWNUM <= 1;
CURSOR test_cur
IS
SELECT a.street_addr address, a.mailing_city_name city,
d.pa_cust_name county, a.zip_cd zip,
a.last_update_dt lastdate, a.status_cd status
FROM CWT003_PEND_ADDR a,
CWT004_ACTVITY_LOG b,
CWT005_PUBLIC_AUTH c,
CWT005_PUBLIC_AUTH d
WHERE a.address_id = b.address_id(+)
AND a.city_cust_num = c.pa_cust_num(+)
AND c.parent_pa_num = d.pa_cust_num(+)
AND (b.action_flag = 'A' OR b.action_flag = 'I')
AND b.user_prof_id = NVL (l_rqst_user_prof_id, b.user_prof_id)
AND ( NVL (TO_DATE (l_rqst_from_dt, 'DD-MON-YYYY'),
TO_DATE ('01-JAN-1900', 'DD-MON-YYYY')
) = TO_DATE ('01-JAN-1900', 'DD-MON-YYYY')
OR b.activity_tstmp >=
TO_DATE (l_rqst_from_dt, 'DD-MON-YYYY')
AND ( NVL (TO_DATE (l_rqst_to_dt, 'DD-MON-YYYY'),
TO_DATE ('01-JAN-1900', 'DD-MON-YYYY')
) = TO_DATE ('01-JAN-1900', 'DD-MON-YYYY')
OR b.activity_tstmp <=
TO_DATE (l_rqst_to_dt, 'DD-MON-YYYY')
AND (NVL (l_rqst_org_num, -1) = -1
OR a.district_no = l_rqst_org_num
AND a.city_cust_num IN (
SELECT pa_cust_num
FROM CWT005_PUBLIC_AUTH y
WHERE NVL (y.parent_pa_num, -1) =
NVL (l_rqst_county_num, NVL (y.parent_pa_num, -1)))
AND NVL (a.city_cust_num, -1) =
NVL (l_rqst_city_num, NVL (a.city_cust_num, -1));
BEGIN
DBMS_OUTPUT.put_line ('11111' || CHR (10));
OPEN cur_report_entries;
FETCH cur_report_entries
INTO l_report_req_date, l_report_type, l_req_user_prof_id,
l_rqst_city_num, l_rqst_county_num, l_rqst_from_dt,
l_rqst_org_num, l_rqst_to_dt, l_rqst_user_prof_id;
CLOSE cur_report_entries;
DBMS_OUTPUT.put_line ( l_req_user_prof_id
|| '---'
|| l_report_req_date
|| '---'
|| l_report_type
|| '---'
|| l_rqst_user_prof_id
|| '---'
|| l_rqst_from_dt
|| '---'
|| l_rqst_to_dt
|| '---'
|| l_rqst_org_num
|| '---'
|| l_rqst_city_num
|| '---'
|| l_rqst_county_num
DBMS_OUTPUT.put_line
|| CHR (10)
IF l_rqst_city_num = 0
THEN
l_rqst_city_num := NULL;
END IF;
IF l_rqst_county_num = 0
THEN
l_rqst_county_num := NULL;
END IF;
IF l_rqst_user_prof_id = 0
THEN
l_rqst_user_prof_id := NULL;
END IF;
--l_rqst_from_dt := NULL;
--l_rqst_to_dt := NULL;
l_count := l_count + 1;
--FOR rec1 IN test_cur
OPEN test_cur;
LOOP
BEGIN
FETCH test_cur
INTO l_address, l_city, l_county, l_zip, l_last_worked_date,
l_status;
EXIT WHEN test_cur%NOTFOUND;
DBMS_OUTPUT.put_line
|| l_count
|| ' ] street_addr::'
|| l_address
|| CHR (10)
|| 'mailing_city_name::'
|| l_city
|| CHR (10)
|| 'pa_cust_name::'
|| l_county
|| CHR (10)
|| 'zip_cd::'
|| l_zip
|| CHR (10)
|| 'last_update_dt::'
|| l_last_worked_date
|| CHR (10)
|| 'status_cd::'
|| l_status
|| CHR (10)
|| '-------------------------------------------------------------------------------------------'
|| CHR (10)
l_count := l_count + 1;
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.put_line ( 'Inside Error::'
|| SQLCODE
|| '------'
|| SQLERRM
END;
END LOOP;
CLOSE test_cur;
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.put_line ('Error::' || SQLCODE || '------' || SQLERRM);
END test_proc;
END Test_Pkg_Dip;
as
BEGIN
Test_Pkg_Dip.test_proc;
END;
I do not get any output. And also if I remove the date comparison from the query it works.
Thanks & regards,
Dipankar Kushari.
Yeh.
But the real error was "ERROR:
ORA-06502: PL/SQL: numeric or value error: host bind array too small
ORA-06512: at line 1"
I found that it was coming due to more than 255 characters in a single line in dbms_output.put_line.
Anyway, thanks for the answer.
Dipankar.
Similar Messages
-
How to compare result from sql query with data writen in html input tag?
how to compare result
from sql query with data
writen in html input tag?
I need to compare
user and password in html form
with all user and password in database
how to do this?
or put the resulr from sql query
in array
please help me?Hi dejani
first get the user name and password enter by the user
using
String sUsername=request.getParameter("name of the textfield");
String sPassword=request.getParameter("name of the textfield");
after executeQuery() statement
int exist=0;
while(rs.next())
String sUserId= rs.getString("username");
String sPass_wd= rs.getString("password");
if(sUserId.equals(sUsername) && sPass_wd.equals(sPassword))
exist=1;
if(exist==1)
out.println("user exist");
else
out.println("not exist"); -
PL/SQL Package with only Constants
We have created a PL/SQL package with a Spec and NO BODY with only constant values.
When a user logs onto the Database for the first time, and runs a program the first time the "Constants" package is called you get a ORA-06502, but every time after the first there is no issues. This only happens the first the user logs onto the database ( Session based ).
CoryYou have a wrong declaration in your package, some like c2 in the following example.
EDV@mtso> create or replace package xxx
2 is
3 c1 number := 1;
4 c2 number := 'aa';
5 c3 number := 3;
6 end;
7 /
Package created.
EDV@mtso> var t number
EDV@mtso> exec :t := xxx.c1;
BEGIN :t := xxx.c1; END;
ERROR at line 1:
ORA-06502: PL/SQL: numeric or value error: character to number conversion error
ORA-06512: at "EDV.XXX", line 4
ORA-06512: at line 1
EDV@mtso> print t
T
EDV@mtso> exec :t := xxx.c1;
PL/SQL procedure successfully completed.
EDV@mtso> print t
T
1
EDV@mtso> exec :t := xxx.c3;
PL/SQL procedure successfully completed.
EDV@mtso> print t
T
EDV@mtso> Note that constants declared before the errorous one have a value, constants declare after that one have no value.
Anton
Message was edited by:
ascheffer -
Populate SQL table with data from Oracle DB in ODI
Hi,
I am trying to populate a source SQL table with fields from an Oracle db in ODI. I am trying to perform this using a procedure and I am am getting the following error:
ODI-1226: Step PROC_1_Contract_Sls_Person_Lookup fails after 1 attempt(s).
ODI-1232: Procedure PROC_1_Contract_Sls_Person_Lookup execution fails.
ODI-1228: Task PROC_1_Contract_Sls_Person_Lookup (Procedure) fails on the target MICROSOFT_SQL_SERVER connection Phys_HypCMSDatamart.
Caused By: weblogic.jdbc.sqlserverbase.ddc: [FMWGEN][SQLServer JDBC Driver][SQLServer]Invalid object name 'C2C_APP.CON_V'.
My question is what is the best method to populate SQL db with data from an Oracle db? Using a procedure? A specific LKM?
I found threads referring to using an LKM to populate Oracle tables with data from a SQL table....but nothing for the opposite.
Any information would help.
thanks,
EricHi Eric,
If using an Interface, I would recommend the LKM SQL to MSSQL (BULK) knowledge module. This will unload the data from Oracle into a file, then bulk load the staging db on the target using a BULK INSERT.
Regards,
Michael Rainey -
Hi All
I have following problem in My wrapper package, Kindly help me to figure out this issue.
My Package:
type ebs_pricelistHeader_row is record(
REQUEST_ID NUMBER,
PRICE_LIST_NAME VARCHAR2(240 BYTE),
DESCRIPTION VARCHAR2(2000 BYTE),
CURRENCY_CODE VARCHAR2(30 BYTE),
BRANCH VARCHAR2(40 BYTE),
EFFECTIVE_FROM DATE,
EFFECTIVE_TO DATE,
PRICE_LIST_ID NUMBER,
PROCESS_FLAG VARCHAR2(1 BYTE)
My Package body is working fine and also return result that i need
Problem in Wrapper Package body:
When i use my above package in SOA Suite a wrapper package and its body gets created but the wrapper package body gives the following errors. this is very strange as i already did these types of tasks that are working fine and no issue with their wrappers.
Please see the error in my wrapper package body
http://s24.postimg.org/tco1o0951/wrapper.jpg
errors are
Error(12,1): PL/SQL: Statement ignored
Error(12,10): PLS-00302: component 'DESCRIPTION' must be declared
Error(13,1): PL/SQL: Statement ignored
Error(13,10): PLS-00302: component 'CURRENCY_CODE' must be declared
Error(14,1): PL/SQL: Statement ignored
Error(14,10): PLS-00302: component 'BRANCH' must be declared
Please let me know if any other thing is required.
Kindly help me to resolve this issue. thanks a lot
Muhammad NasirWrapper package code
create or replace
PACKAGE BODY WRAPPER_EBSPRICELISTSPRCDATA IS
FUNCTION PL_TO_SQL2(aPlsqlItem APPS.EBS_SOA_PRICELIST_PKG.EBS_PRICELISTHEADER_ROW)
RETURN EBS_SOA_PRICELIX1199385X1X20 IS
aSqlItem EBS_SOA_PRICELIX1199385X1X20;
BEGIN
-- initialize the object
aSqlItem := EBS_SOA_PRICELIX1199385X1X20(NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
, NULL, NULL, NULL, NULL);
aSqlItem.REQUEST_ID := aPlsqlItem.REQUEST_ID;
aSqlItem.PRICE_LIST_NAME := aPlsqlItem.PRICE_LIST_NAME;
aSqlItem.DESCRIPTION := aPlsqlItem.DESCRIPTION;
aSqlItem.CURRENCY_CODE := aPlsqlItem.CURRENCY_CODE;
aSqlItem.BRANCH := aPlsqlItem.BRANCH;
aSqlItem.EFFECTIVE_FROM := aPlsqlItem.EFFECTIVE_FROM;
aSqlItem.EFFECTIVE_TO := aPlsqlItem.EFFECTIVE_TO;
aSqlItem.PRICE_LIST_ID := aPlsqlItem.PRICE_LIST_ID;
aSqlItem.PROCESS_FLAG := aPlsqlItem.PROCESS_FLAG;
aSqlItem.CREATED_BY := aPlsqlItem.CREATED_BY;
aSqlItem.CREATION_DATE := aPlsqlItem.CREATION_DATE;
aSqlItem.LAST_UPDATED_BY := aPlsqlItem.LAST_UPDATED_BY;
aSqlItem.LAST_UPDATE_DATE := aPlsqlItem.LAST_UPDATE_DATE;
aSqlItem.LAST_UPDATE_LOGIN := aPlsqlItem.LAST_UPDATE_LOGIN;
aSqlItem.EN_PRICE_LIST_NAME := aPlsqlItem.EN_PRICE_LIST_NAME;
aSqlItem.AR_PRICE_LIST_NAME := aPlsqlItem.AR_PRICE_LIST_NAME;
RETURN aSqlItem;
END PL_TO_SQL2;
FUNCTION SQL_TO_PL2(aSqlItem EBS_SOA_PRICELIX1199385X1X20)
RETURN APPS.EBS_SOA_PRICELIST_PKG.EBS_PRICELISTHEADER_ROW IS
aPlsqlItem APPS.EBS_SOA_PRICELIST_PKG.EBS_PRICELISTHEADER_ROW;
BEGIN
aPlsqlItem.REQUEST_ID := aSqlItem.REQUEST_ID;
aPlsqlItem.PRICE_LIST_NAME := aSqlItem.PRICE_LIST_NAME;
aPlsqlItem.DESCRIPTION := aSqlItem.DESCRIPTION;
aPlsqlItem.CURRENCY_CODE := aSqlItem.CURRENCY_CODE;
aPlsqlItem.BRANCH := aSqlItem.BRANCH;
aPlsqlItem.EFFECTIVE_FROM := aSqlItem.EFFECTIVE_FROM;
aPlsqlItem.EFFECTIVE_TO := aSqlItem.EFFECTIVE_TO;
aPlsqlItem.PRICE_LIST_ID := aSqlItem.PRICE_LIST_ID;
aPlsqlItem.PROCESS_FLAG := aSqlItem.PROCESS_FLAG;
aPlsqlItem.CREATED_BY := aSqlItem.CREATED_BY;
aPlsqlItem.CREATION_DATE := aSqlItem.CREATION_DATE;
aPlsqlItem.LAST_UPDATED_BY := aSqlItem.LAST_UPDATED_BY;
aPlsqlItem.LAST_UPDATE_DATE := aSqlItem.LAST_UPDATE_DATE;
aPlsqlItem.LAST_UPDATE_LOGIN := aSqlItem.LAST_UPDATE_LOGIN;
aPlsqlItem.EN_PRICE_LIST_NAME := aSqlItem.EN_PRICE_LIST_NAME;
aPlsqlItem.AR_PRICE_LIST_NAME := aSqlItem.AR_PRICE_LIST_NAME;
RETURN aPlsqlItem;
END SQL_TO_PL2;
FUNCTION PL_TO_SQL1(aPlsqlItem APPS.EBS_SOA_PRICELIST_PKG.EBS_PRICELISTHEADER_TAB)
RETURN EBS_SOA_PRICELIX1199385X1X19 IS
aSqlItem EBS_SOA_PRICELIX1199385X1X19;
BEGIN
-- initialize the table
aSqlItem := EBS_SOA_PRICELIX1199385X1X19();
IF aPlsqlItem IS NOT NULL THEN
aSqlItem.EXTEND(aPlsqlItem.COUNT);
IF aPlsqlItem.COUNT>0 THEN
FOR I IN aPlsqlItem.FIRST..aPlsqlItem.LAST LOOP
aSqlItem(I + 1 - aPlsqlItem.FIRST) := PL_TO_SQL2(aPlsqlItem(I));
END LOOP;
END IF;
END IF;
RETURN aSqlItem;
END PL_TO_SQL1;
FUNCTION SQL_TO_PL1(aSqlItem EBS_SOA_PRICELIX1199385X1X19)
RETURN APPS.EBS_SOA_PRICELIST_PKG.EBS_PRICELISTHEADER_TAB IS
aPlsqlItem APPS.EBS_SOA_PRICELIST_PKG.EBS_PRICELISTHEADER_TAB;
BEGIN
aPlsqlItem := EBS_SOA_PRICELIST_PKG.EBS_PRICELISTHEADER_TAB();
aPlsqlItem.EXTEND(aSqlItem.COUNT);
IF aSqlItem.COUNT>0 THEN
FOR I IN 1..aSqlItem.COUNT LOOP
aPlsqlItem(I) := SQL_TO_PL2(aSqlItem(I));
END LOOP;
END IF;
RETURN aPlsqlItem;
END SQL_TO_PL1;
FUNCTION PL_TO_SQL3(aPlsqlItem APPS.EBS_SOA_PRICELIST_PKG.EBS_PRICELISTLINE_ROW)
RETURN EBS_SOA_PRICELISX1199385X1X2 IS
aSqlItem EBS_SOA_PRICELISX1199385X1X2;
BEGIN
-- initialize the object
aSqlItem := EBS_SOA_PRICELISX1199385X1X2(NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL
, NULL, NULL, NULL, NULL);
aSqlItem.REQUEST_ID := aPlsqlItem.REQUEST_ID;
aSqlItem.PRICE_LIST_NAME := aPlsqlItem.PRICE_LIST_NAME;
aSqlItem.PRODUCT_VALUE := aPlsqlItem.PRODUCT_VALUE;
aSqlItem.PRODUCT_DESC := aPlsqlItem.PRODUCT_DESC;
aSqlItem.UOM := aPlsqlItem.UOM;
aSqlItem.PRIMARY := aPlsqlItem.PRIMARY;
aSqlItem.VALUE := aPlsqlItem.VALUE;
aSqlItem.EFFECTIVE_FROM := aPlsqlItem.EFFECTIVE_FROM;
aSqlItem.EFFECTIVE_TO := aPlsqlItem.EFFECTIVE_TO;
aSqlItem.PROCESS_FLAG := aPlsqlItem.PROCESS_FLAG;
aSqlItem.CREATED_BY := aPlsqlItem.CREATED_BY;
aSqlItem.CREATION_DATE := aPlsqlItem.CREATION_DATE;
aSqlItem.LAST_UPDATED_BY := aPlsqlItem.LAST_UPDATED_BY;
aSqlItem.LAST_UPDATE_DATE := aPlsqlItem.LAST_UPDATE_DATE;
aSqlItem.LAST_UPDATE_LOGIN := aPlsqlItem.LAST_UPDATE_LOGIN;
aSqlItem.PRICE_LIST_ID := aPlsqlItem.PRICE_LIST_ID;
RETURN aSqlItem;
END PL_TO_SQL3;
FUNCTION SQL_TO_PL3(aSqlItem EBS_SOA_PRICELISX1199385X1X2)
RETURN APPS.EBS_SOA_PRICELIST_PKG.EBS_PRICELISTLINE_ROW IS
aPlsqlItem APPS.EBS_SOA_PRICELIST_PKG.EBS_PRICELISTLINE_ROW;
BEGIN
aPlsqlItem.REQUEST_ID := aSqlItem.REQUEST_ID;
aPlsqlItem.PRICE_LIST_NAME := aSqlItem.PRICE_LIST_NAME;
aPlsqlItem.PRODUCT_VALUE := aSqlItem.PRODUCT_VALUE;
aPlsqlItem.PRODUCT_DESC := aSqlItem.PRODUCT_DESC;
aPlsqlItem.UOM := aSqlItem.UOM;
aPlsqlItem.PRIMARY := aSqlItem.PRIMARY;
aPlsqlItem.VALUE := aSqlItem.VALUE;
aPlsqlItem.EFFECTIVE_FROM := aSqlItem.EFFECTIVE_FROM;
aPlsqlItem.EFFECTIVE_TO := aSqlItem.EFFECTIVE_TO;
aPlsqlItem.PROCESS_FLAG := aSqlItem.PROCESS_FLAG;
aPlsqlItem.CREATED_BY := aSqlItem.CREATED_BY;
aPlsqlItem.CREATION_DATE := aSqlItem.CREATION_DATE;
aPlsqlItem.LAST_UPDATED_BY := aSqlItem.LAST_UPDATED_BY;
aPlsqlItem.LAST_UPDATE_DATE := aSqlItem.LAST_UPDATE_DATE;
aPlsqlItem.LAST_UPDATE_LOGIN := aSqlItem.LAST_UPDATE_LOGIN;
aPlsqlItem.PRICE_LIST_ID := aSqlItem.PRICE_LIST_ID;
RETURN aPlsqlItem;
END SQL_TO_PL3;
FUNCTION PL_TO_SQL0(aPlsqlItem APPS.EBS_SOA_PRICELIST_PKG.EBS_PRICELISTLINE_TAB)
RETURN EBS_SOA_PRICELISX1199385X1X1 IS
aSqlItem EBS_SOA_PRICELISX1199385X1X1;
BEGIN
-- initialize the table
aSqlItem := EBS_SOA_PRICELISX1199385X1X1();
IF aPlsqlItem IS NOT NULL THEN
aSqlItem.EXTEND(aPlsqlItem.COUNT);
IF aPlsqlItem.COUNT>0 THEN
FOR I IN aPlsqlItem.FIRST..aPlsqlItem.LAST LOOP
aSqlItem(I + 1 - aPlsqlItem.FIRST) := PL_TO_SQL3(aPlsqlItem(I));
END LOOP;
END IF;
END IF;
RETURN aSqlItem;
END PL_TO_SQL0;
FUNCTION SQL_TO_PL0(aSqlItem EBS_SOA_PRICELISX1199385X1X1)
RETURN APPS.EBS_SOA_PRICELIST_PKG.EBS_PRICELISTLINE_TAB IS
aPlsqlItem APPS.EBS_SOA_PRICELIST_PKG.EBS_PRICELISTLINE_TAB;
BEGIN
aPlsqlItem := EBS_SOA_PRICELIST_PKG.EBS_PRICELISTLINE_TAB();
aPlsqlItem.EXTEND(aSqlItem.COUNT);
IF aSqlItem.COUNT>0 THEN
FOR I IN 1..aSqlItem.COUNT LOOP
aPlsqlItem(I) := SQL_TO_PL3(aSqlItem(I));
END LOOP;
END IF;
RETURN aPlsqlItem;
END SQL_TO_PL0;
PROCEDURE ebs_soa_pricelist_pkg$ebs_soa (EBS_PRICELISTLINES OUT EBS_SOA_PRICELISX1199385X1X1,
EBS_PRICELISTHEADERS OUT EBS_SOA_PRICELIX1199385X1X19
) IS
EBS_PRICELISTLINES_ APPS.EBS_SOA_PRICELIST_PKG.EBS_PRICELISTLINE_TAB;
EBS_PRICELISTHEADERS_ APPS.EBS_SOA_PRICELIST_PKG.EBS_PRICELISTHEADER_TAB;
BEGIN
APPS.EBS_SOA_PRICELIST_PKG.EBS_SOA_PRICELISTS_PRC(EBS_PRICELISTLINES_,
EBS_PRICELISTHEADERS_
EBS_PRICELISTLINES := WRAPPER_EBSPRICELISTSPRCDATA.PL_TO_SQL0(EBS_PRICELISTLINES_);
EBS_PRICELISTHEADERS := WRAPPER_EBSPRICELISTSPRCDATA.PL_TO_SQL1(EBS_PRICELISTHEADERS_);
END ebs_soa_pricelist_pkg$ebs_soa;
END WRAPPER_EBSPRICELISTSPRCDATA; -
SQL Loader with date formatting
Hi,
I'm trying to get sql loader to insert a date into a column. After much browsing, reading trial and error I still get an array of errors.
I'm using oracle XE
my control file looks like this
LOAD DATA
INFILE 'posmeters/meters.csv'
INTO TABLE position_meters
FIELDS terminated by ","
ID CONSTANT '0',
POSITION_ID,
DATETIME DATE "DD/MM/YYYY HH24:MI:SS",
CASH_IN,
CASH_OUT,
NOTES_IN,
CHANGE_OUT,
WINNINGS,
VTP,
REFILL,
TOKEN_IN,
TOKEN_OUT,
ELEC_PAY,
ELEC_CREDIT,
REMOTE_PAY,
REMOTE_CREDIT,
INSERT_TS EXPRESSION "TO_CHAR(SYSDATE, 'DD/MM/YYYY HH24:MI:SS')",
FIFTY_PND,
TWENTY_PND,
TEN_PND,
FIVE_PND,
TWO_PND,
ONE_PND,
FIFTY_P,
TWENTY_P,
TEN_P,
FIVE_P
It is the DATETIME field which gives me grief. I have a test data file that looks like this
0,1010,29/09/2011 10:23:24,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24
and my table is defined as follows
ID NUMBER NOT NULL,
POSITION_ID NUMBER,
DATETIME TIMESTAMP(6) DEFAULT localTIMESTAMP NOT NULL,
CASH_IN NUMBER,
CASH_OUT NUMBER,
NOTES_IN NUMBER,
CHANGE_OUT NUMBER,
WINNINGS NUMBER,
VTP NUMBER,
REFILL NUMBER,
TOKEN_IN NUMBER DEFAULT (0) NOT NULL,
TOKEN_OUT NUMBER DEFAULT (0) NOT NULL,
ELEC_PAY NUMBER DEFAULT (0) NOT NULL,
ELEC_CREDIT NUMBER DEFAULT (0) NOT NULL,
REMOTE_PAY NUMBER DEFAULT (0) NOT NULL,
REMOTE_CREDIT NUMBER DEFAULT (0) NOT NULL,
INSERT_TS TIMESTAMP(6) DEFAULT (localtimestamp) NOT NULL,
FIFTY_PND NUMBER DEFAULT 0,
TWENTY_PND NUMBER DEFAULT 0,
TEN_PND NUMBER DEFAULT 0,
FIVE_PND NUMBER DEFAULT 0,
TWO_PND NUMBER DEFAULT 0,
ONE_PND NUMBER DEFAULT 0,
FIFTY_P NUMBER DEFAULT 0,
TWENTY_P NUMBER DEFAULT 0,
TEN_P NUMBER DEFAULT 0,
FIVE_P NUMBER DEFAULT 0
I have tried defining the control file with
DATETIME DATE "DD/MM/YYYY HH24:MI:SS",
DATETIME EXPRESSION "TO_DATE(:DATETIME, 'DD/MM/YYYY HH24:MI:SS')",
DATETIME EXPRESSION "TO_TIMESTAMP(:DATETIME, 'DD/MM/YYYY HH24:MI:SS')",
I get errors such as
Record 1: Rejected - Error on table "SITE_MAIN"."POSITION_METERS", column DATETIME.
ORA-01861: literal does not match format string
SQL*Loader-291: Invalid bind variable DATETIME in SQL string for column DATETIME.
any help would greatfully appreciated.It seems that the problem was caused by the constant at the beginning of the record and had nothing to do with date formats.
My control file now looks like this
LOAD DATA
INFILE 'posmeters/meters.csv'
APPEND INTO TABLE position_meters
FIELDS terminated by ","
POSITION_ID ,
DATETIME date "DD/MM/YYYY HH24:MI:SS",
CASH_IN ,
CASH_OUT ,
NOTES_IN ,
CHANGE_OUT ,
WINNINGS ,
VTP ,
REFILL ,
TOKEN_IN ,
TOKEN_OUT ,
ELEC_PAY ,
ELEC_CREDIT ,
REMOTE_PAY ,
REMOTE_CREDIT ,
INSERT_TS "TO_TIMESTAMP(SYSDATE, 'DD/MM/YYYY HH24:MI:SS')",
FIFTY_PND ,
TWENTY_PND ,
TEN_PND ,
FIVE_PND ,
TWO_PND ,
ONE_PND ,
FIFTY_P ,
TWENTY_P ,
TEN_P ,
FIVE_P
all is good :o) -
Creating PL/SQL Package with all the types
CREATE OR REPLACE
TYPE rec_type AS OBJECT (
first_name VARCHAR2(20),
last_name VARCHAR2(20)
CREATE OR REPLACE
TYPE REC_TYPE_TAB AS TABLE OF rec_type
I am able to create the above types in oracle and used in PL/SQL packages. And like this I have somany types. I would like to if I can create a package with the types to make the life easier. Could you please tell me how to do it.
your help is greately appreciated..
--Krishsb92075 wrote:
TYPE add only aggravation, complexity, & should be avoidedI disagree.
When used correctly types can be the simplest solution.
For example when passing multiple values to a stored procedure. Avoiding the type in the below example would lead to further complexity and aggravation not lessen it.
SQL> create or replace procedure p
2 (
3 p_object_list in sys.odcivarchar2list,
4 p_result out sys_refcursor
5 ) as
6 begin
7 open p_result for
8 select owner, object_name, object_type
9 from all_objects
10 where object_name in
11 (
12 select column_value from
13 table(p_object_list)
14 )
15 order by
16 owner, object_name, object_type;
17 end;
18 /
Procedure created.
SQL> exec p(sys.odcivarchar2list('DUAL','ALL_OBJECTS'),:c)
PL/SQL procedure successfully completed.
SQL> print c
OWNER OBJECT_NAME OBJECT_TYPE
PUBLIC ALL_OBJECTS SYNONYM
PUBLIC DUAL SYNONYM
SYS ALL_OBJECTS VIEW
SYS DUAL TABLE -
SQL Developer with Data Modeler, No Design Menu Option
Using SQL Developer 3.0.04 Build MAIN-04.34 with Data Modeler. I have created a logical design and wish to forward engineer this to a relational model.
I cannot seem to find the Design Menu option to use the >> Engineer to Relational Model option which is available under the Design Menu on the Stand Alone version of SQL Developer Data Modeler.
Have checked the following locations:
Tools -> Data Modeler
View -> Data Modeler
File -> Data Modeler
Right Click on my Logical Design
I have ensure that all my entities have the Engineer To property set to a valid Relational Model.
Is this a bug or am I missing a menu option / configuration setting?
Thanks in advance for any help
JohnHi John,
you can find ">> Engineer to Relational Mode" button among other buttons for logical diagram.
Philip -
Problem populating html form fields with data from database.
I'm using a straight forward piece of code to populate a form with data from a database, to create and 'edit record' page. The code is as follows;
TO RETREVE THE DATA FROM THE DATABASE;
$query = "SELECT * FROM $table WHERE newsletter_id = '$newsletter_id'" ;
mysql_select_db($database) ;
$result = mysql_query($query, $connect);
$numRows = mysql_num_rows($result);
$dbnewsletter_title = mysql_result($result,$i,'newsletter_title');
TO POPULATE THE FORM FEILD;
<tr>
<td width="140"><p class="admin">Newsletter title</p></td>
<td><input name="newsletter_title" type="text" <? print "value=$dbnewsletter_title";}?> /></td>
</tr>
However, when I view the page, the string shows in the text feild, but seems to be split at the point of the first space. So basically only the first word of the string shows in the text field. If I try to print '$dbnewsletter_title' outside of the table, the string is shown in full as it should be.
Does anyone know what is causing this problem?
Many ThanksPut the value in quotes:
<?php print "value='$dbnewsletter_title'"; ?> -
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. -
URGENT: Problem sending array of complex type data to webservice.
Hi,
I am writing an application in WebDynpo which needs to call External web service. This service has many complex data types. The function which I am trying to access needs some Complex data type array. When i checked the SOAP request i found that the namespace for the array type is getting blank values. Because of which SOAP response is giving exception.
The SOAP request is as below. For the <maker> which is an array ,the xmlns:tns='' is generated.
<mapImageOptions xsi:type='tns:MapImageOptions' xmlns:tns='http://www.themindelectric.com/package/com.esri.is.services.glue.v2.mapimage/'>
<dataSource xsi:type='xs:string'>GDT.Streets.US</dataSource>
<mapImageSize xsi:type='tns:MapImageSize'><width xsi:type='xs:int'>380</width><height xsi:type='xs:int'>500</height></mapImageSize>
<mapImageFormat xsi:type='xs:string'>gif</mapImageFormat>
<backgroundColor xsi:type='xs:string'>255,255,255</backgroundColor>
<outputCoordSys xsi:type='tns:CoordinateSystem' xmlns:tns='http://www.themindelectric.com/package/com.esri.is.services.common.v2.geom/'>
<projection xsi:type='xs:string'>4269</projection>
<datumTransformation xsi:type='xs:string'>dx</datumTransformation>
</outputCoordSys>
<drawScaleBar xsi:type='xs:boolean'>false</drawScaleBar>
<scaleBarPixelLocation xsi:nil='true' xsi:type='tns:PixelCoord'></scaleBarPixelLocation>
<returnLegend xsi:type='xs:boolean'>false</returnLegend>
<markers ns2:arrayType='tns:MarkerDescription[1]' xmlns:tns='' xmlns:ns2='http://schemas.xmlsoap.org/soap/encoding/'>
<item xsi:type='tns:MarkerDescription'><name xsi:type='xs:string'></name>
<iconDataSource xsi:type='xs:string'></iconDataSource><color xsi:type='xs:string'></color>
<label xsi:type='xs:string'></label>
<labelDescription xsi:nil='true' xsi:type='tns:LabelDescription'>
</labelDescription><location xsi:type='tns:Point' xmlns:tns='http://www.themindelectric.com/package/com.esri.is.services.common.v2.geom/'>
<x xsi:type='xs:double'>33.67</x><y xsi:type='xs:double'>39.44</y>
<coordinateSystem xsi:type='tns:CoordinateSystem'>
<projection xsi:type='xs:string'>4269</projection>
<datumTransformation xsi:type='xs:string'>dx</datumTransformation>
</coordinateSystem></location></item>
</markers><lines xsi:nil='true'>
</lines><polygons xsi:nil='true'></polygons><circles xsi:nil='true'></circles><displayLayers xsi:nil='true'></displayLayers>
</mapImageOptions>
Another problem:
If the webservice is having overloaded methods , it is generating error for the second overloaded method.The stub file itself contains statment as follow:
Response = new();
can anyone guide me on this?
Thanks,
Mital.I am having this issue as well.
From:
http://help.sap.com/saphelp_nw04/helpdata/en/43/ce993b45cb0a85e10000000a1553f6/frameset.htm
I see that:
The WSDL document in rpc-style format must also not use any soapenc:Array types; these are often used in SOAP code in documents with this format. soapenc:Array uses the tag <xsd:any>, which the Integration Builder editors or proxy generation either ignore or do not support.
You can replace soapenc:Array types with an equivalent <sequence>; see the WS-I example under http://www.ws-i.org/Profiles/BasicProfile-1.0-2004-04-16.html#refinement16556272.
They give an example of what to use instead.
Of course I have been given a WSDL that has a message I need to map to that uses the enc:Array.
Has anyone else had this issue? I need to map to a SOAP message to send to an external party. I don't know what they are willing to change to support what I can do. I changed the WSDL to use a sequence as below just to pull it in for now.
Thanks,
Eric -
Problem Loading Microsoft Sql Serer table data to flat file
Hi Experts,
i am trying to load data from SQL Server table to flat file but its errror out.
I have selected Staging area different form Targert ( I am using SQL Server as my staging area)
knowlegde modue used: IKM SQL to file Append
I reciee the following errror
ODI-1217: Session table to file (124001) fails with return code 7000.
ODI-1226: Step table to file fails after 1 attempt(s).
ODI-1240: Flow table to file fails while performing a Integration operation. This flow loads target table test.
ODI-1227: Task table to file (Integration) fails on the source MICROSOFT_SQL_SERVER connection POS_XSTORE.
Caused By: java.sql.SQLException: Could not read heading rows from file
at com.sunopsis.jdbc.driver.file.FileResultSet.<init>(FileResultSet.java:164)
Please help!!!
Thanks,
PrateekHave you defined the File Datastore correctly with appropriate delimiter and file properties.
Although the example is for oracle to file , see if this helps you in any way - http://odiexperts.com/oracle-to-flat-file. -
Sort problem in a sql statement with Order by clause
Hello,
I execute this statement :
Select keyart from article order by keyart desc;
and i got this result :
KEYART
VI-ZFI/GN
VI-WWAD110
VI-WV83
VI-WVLZ816
VI-WVLZ811
VI-WVLP6
VI-WVLA9C3
VI-WVLA4R5
VI-WVLA2.8
VI-WVLA12B
VI-WVD9N
KEYART
VI-WVCP210
VI-WVCP100
VI-WVCM200
VI-WVCM140
VI-WVCM110
VI-WVCM100
VI-WVBP70
VI-WVBP110
VI-WVBP102
VI-WVBP100
VI-WVBM900
KEYART
VI-WVBM90
VI-WVBM80
VI-WVBM190
VI-WVBM170
VI-WVBM140
VI-WJ523
VI-WJ521
VI-WJ450
VI-WJ410
VI-WJSQ308
VI-WD7/MK
KEYART
VI-WD2N
VI-VTL-W
VI-VPT4023
VI-TVB125
VI-TC21S3M
VI-PTZFI/G
VI-PS 18M
VI-PAR/MON
VI-PAR/CAM
VI-MY-1CD
VI-MY-DS
KEYART
VI-MY-CA
VI-MO/BTM
VI-MJ-1ADA
VI-MJ-DS
VI-MA6024
VI-KXA11BS
VI-JC43BL
VI-JCM1000
VI-IR60071
VI-IR600BU
VI-IR-WIDE
KEYART
VID-WV95
VID-WV83
VID-WV80
VID-WV42
VID-WV40
VID-WVLF93
VID-WVLA6B
VID-WVLA4.
VID-WVLA36
VID-WVLA18
VID-WVLA12
KEYART
VID-WVBM90
VID-WVBM80
VID-WVBL90
VID-WVBB10
VI-DIVERS
VI-CAMERA
VI-AG6730
VI-AG6124B
VI-AG6040
TRV-TT1AS
TRV-TTE914
We can see that rows like VID- are between rows like VI- . It seems that order by doesn't take in charge the '-' Ok. But when i execute this statement :
select keyart from articles where keyart > 'VI-ZFI/GN' ;
-- VI-ZFI/GN is my bigger result in my first query
i got this result
KEYART
VID-WVBB10
VID-WVBL90
VID-WVBM80
VID-WVBM90
VID-WVLA12
VID-WVLA18
VID-WVLA36
VID-WVLA4.
VID-WVLA6B
VID-WVLF93
VID-WV40
KEYART
VID-WV42
VID-WV80
VID-WV83
VID-WV95
In this cas it seems that order by take in charge the '-'!!!
How can i do to have have no row in my second select or that the 2 queries order the row the same?
Please help me , it's quite urgent ....
thanks a lot
Fab
nullHi,
With the data provided by you,i created the same set of table with the values.Tried the same query,when sorting it considers '-' also and then only it sorts.For me the order was perferct with 'VID' values first and then 'VI' values.
when i issued the second query the values of 'VID' alone came .
i think something has gone wrong when the data has been feed.maybe u have entered the data in the lowercase and some values in uppercase.
For me with the same set of values it is working perfectly.
null -
Problem Module/datagrid, one time with data, one time is null
Hello All
thanks for this discussion place, i have a problem in Flash Builder 4.6 (sdk 4.6.0), construct an application who connect to DB, for now, the CRUD works fine with flex service,
i have a problem with a datagrid, one time it's worked fine, and another time my obj is null, i cannot understand why.. the fact it's work one time trouble me.. and i have no error in console..
the target, is to edit a row of datagrid in popup, it's work as you stay in the ModuleClient, but when i launch another Module and come back to ModuleClient, the edit datagrid doesn't work anymore
i try to put the process here, as the app is large: (say to me if you want more code, i will try to isolate some pieces)
- click in ModuleMenu and load ModuleClient in ModuleContent
- dataGrid populate with ArrayCollection
- double click row in dataGrid (dataGrid_doubleClickHandler(event:MouseEvent))
- dataGridClients.selectedItem contains effective data
- push data to ValueObject (ClientObj) already defined in flex services/connected to DB
var ClientDataGrid:ClientObj = dataGridClients.selectedItem as ClientObj;
- push data ClientDataGrid to Popup
in Popup: <valueObjects:ClientObj id="clientObj"/>
- works fine
if i select another Module in ModuleMenu, and later relaunch ModuleClient
- dataGrid populate with ArrayCollection
- double click row in dataGrid
- dataGridClients.selectedItem contains effective data
- push data to ValueObject (ClientObj) already defined in flex services/connected to DB
var ClientDataGrid:ClientObj = dataGridClients.selectedItem as ClientObj;
- ClientDataGrid is null
- cannot push data ClientDataGrid to Popup as ClientDataGrid is null
- doesn’t work
<s:DataGrid id="dataGridClients" left="0" right="230" top="66" bottom="10"
creationComplete="dataGrid_creationCompleteHandler(event)"
dataProvider="{clientListeSimpleResult.lastResult}"
doubleClick="dataGrid_doubleClickHandler(event)" doubleClickEnabled="true"
alternatingRowColors="[#FFFFFF, #f4f3f2]">
Thanks in advance for any advices/ideas
i think i make misunderstood of something, im not a flex/flash as3 coder
so any help would be greatly appreciated
best regards anywaythanks Alex for your link, i read it carrefully, i have to study some thing imo
but, i don't find solution for now, otherwise, i found a strangely similar problem here : it's seem to be the same problem as i have :
https://issues.apache.org/jira/browse/FLEX-18680 [After Module reload dataGrid.selectedItem as MyClass NOT WORKING]
do you think i encounter a bug?
(i will try to isolate some code to test more)
thanks again for advices/ideas -
Oracle 11G Direct SQL Load with Data Guard
Does SQL Loader in direct mode always bypass the writing of redo logs ?
If the database has force logging on, will SQL Loader in direct mode bypass the writing of redo logs ?
Is there a way to run SQL Loader in direct mode that will create redo logs that can be applied by Data Guard to the backup database ?846797 wrote:
Does SQL Loader in direct mode always bypass the writing of redo logs ?
If the database has force logging on, will SQL Loader in direct mode bypass the writing of redo logs ?
Is there a way to run SQL Loader in direct mode that will create redo logs that can be applied by Data Guard to the backup database ?In case of data guard setup , redo logs will always be generated.
Maybe you are looking for
-
How do i mirror my macbook air with apple tv now that i have mountain lion
how do i mirror my macbook air with apple tv now that i have mountain lion
-
WiFi on New iPod Touch Timeout
My brand new ipod times out every ten min or so and drops the wifi connection. This really ***** because that means I do not get my email or messages. Sort of makes the device an expensive desk weight. Does anyone know of an app for 4.2 or a workarou
-
Brilliant way to create titles from text files
It was just pointed out to me by a fellow named Greg Hester that there is a way to create titles from a Microsoft Word file using Adobe InDesign. You can create as many titles as you need, and even change text positions around from title to title. Th
-
ComboBox Lable position problem
Hello! I am using Flex 4 and an MX ComboBox because I can set rowCount. Problem is, using Lucida font, the text is badly positioned vertically as shown in the image. How can I fix this please?
-
Request for abap hr versions & their years of release
hi there can any one post me the all the abap hr versions and the years in which they were released !!!! and i also want to know the when was gui download was introduced . these were the questions asked to me at my interview. i shall b thankful to