replace_query any question....
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- Perl
- Stars
- 1.2k
- Forks
- 378
- PR merge metrics
- No merged PRs in 30d
Description
Hi..
I am using ora2pg to export oracle table in postgresql.
Created table should contains the fields of join to two different tables of Oracle.
example
REPLACE_QUERY NC_PROD_DLV_INFO[SELECT a.*, b.prod_no FROM NC_PROD_DLV_INFO a JOIN NC_PROD b ON (a.prod_dlv_info_seq = b.prod_dlv_info_seq)
error
[2020-03-13 09:30:56] Looking how to retrieve data from NC_PROD_DLV_INFO...
[2020-03-13 09:30:56] DEGUG: Query sent to Oracle: SELECT "PROD_DLV_INFO_SEQ","ACNT_NO","DLV_MTH_TP_CD","QUICKSVC_DLV_AREA_CONT","VST_RCPT_ADRBK_SEQ","DLV_BDL_GRP_SEQ","DLVFEE_CL_CD","BASE_DLVFEE","CONDL_FRE_AMT","REPT_CARG_BSS_QTY","SECN_BSS_QTY1","SECN_BSS_QTY2","QTYBY_EXTRAFEE1","QTYBY_EXTRAFEE2","PAY_CL_CD","DLV_AREA_TP_CD","AREA2_EXTRAFEE","AREA3_EXTRAFEE","RTN_DLVSVC_CO_SEQ","RTN_DLVFEE","EXCG_DLVFEE","SHMTPL_ADRBK_SEQ","RTNPL_ADRBK_SEQ","PCIN_GTH_YN","AREABY_DIFF_DLVFEE_INFO","ADD_ISTLFEE_YN","DLV_ATTR_TP_CD","ORDR_DLV_EXPCT_PRD_TP_CD","ORDR_DLV_EXPCT_PRD_DRT_INPT","TDAY_STCK_QTY","CUST_PROD_AFT_ORDER_YN","DLV_HOPE_GRP_SEQ" FROM "NCPAPPO"."NC_PROD_DLV_INFO" a
[2020-03-13 09:30:56] Fetching all data from NC_PROD_DLV_INFO tuples...
[2020-03-13 09:30:57] DEBUG: number of rows 99 extracted from table NC_PROD_DLV_INFO
[2020-03-13 09:30:57] Dumping data from table NC_PROD_DLV_INFO into PostgreSQL table NC_PROD_DLV_INFO...
[2020-03-13 09:30:57] Setting client_encoding to UTF8...
[2020-03-13 09:30:57] Disabling synchronous commit when writing to PostgreSQL...
[2020-03-13 09:30:57] DEBUG: Creating output for 10000 tuples
[2020-03-13 09:30:57] DEBUG: Sending INSERT bulk output directly to PostgreSQL backend
DBD::Pg::st execute failed: called with 33 bind variables when 32 are needed at /usr/local/share/perl5/Ora2Pg.pm line 14581.
[2020-03-13 09:30:57] FATAL: called with 33 bind variables when 32 are needed
Aborting export...
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the REPLACE_QUERY example and the failure reported at Ora2Pg.pm line 14581. Trace how the joined query is converted into the PostgreSQL insert and reproduce the 33-versus-32 bind-variable error; done means the configured query exports successfully without a bind-variable mismatch.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- perl, postgresql
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100