PL/SQL TABLE AS A PARAMETER TO PSP
Hello !
In a PSP application one of the pages is retrieving rows more than 10, and the limitation for the same is to display only 10 rows a page. Same can be done using OWA_UTIL but only if you are having a query to pass as one of the parameters.
I'm processing a PL/SQL block and storing the outcome in a PL/SL table. After showing 10 rows of a table on the first screen, would like to pass the PL/SQL table as a parameter to other .PSP so that I can display another set of 10 out there. The calling page is not getting compiled if passed a PL/SQL table as a parameter flashing an error 'number or type mismatch'.
regards,
[email protected]
user445394,
Have you looked at the collections examples on this Web page:
http://www.oracle.com/technology/sample_code/tech/java/sqlj_jdbc/files/jdbc20/jdbc20.html
Good Luck,
Avi.
Similar Messages
-
Passing PL/SQL table type as IN Parameter to DB Adapter
Hi,
I have an requirement to pass multiple record values(array of values) to an API from BPEL process.
For this,
1) I have created a package procedure having PL/SQL table type variable as IN Parameter.
2) In the BPEL process, created a DB adpater pointing to the above API.(Created wrapper API impicitly)
When I intiated the BPEL process passing multiple values, the API is taking only the first value, ignoring rest of the values.
Any reason, why only the first value is accepted by the API ?
Thanks,
Rapp.If I understand correctly, JPublisher generates a wrapper API for an underlying API that takes a PL/SQL table as an IN parameter. The wrapper will generate and use a SQL nested table as the type for the IN parameter of the wrapper procedure.
The DB adapter DOES support nested tables, varrays, and objects as IN parameters of an API. The problem you are seeing is most likely due to the way you are modeling your BPEL process, specifically with respect to your Assign activities.
When you Assign TO an IN parameter, make sure that you drill down all the way and choose the parameter name in the InputParameters root element. Similarly, when you Assign FROM the API value, you must drill down and choose the name of the OUT parameter in the OutputParameters root element.
In a Transform activity, you would use the FOR construct on the target side to get the values of the nested table or varray from the source side. -
How to invoke PL/SQL Table parameter in the query string?
Hello,
I've met a problem invoking PL/SQL Table parameter in the query string, in OWS 3.0.
What I'm going to do is, to invoke a stored procedure to generate a web page using PL/SQL Web Toolkit 2.0, like: "http://.../owa/test_proc".
But there is a IN parameter for this procedure, and it's a PL/SQL Table variable. So I can't invoke the procedure sucessfully just using "http://.../owa/test_proc?v_plsql=i_plsql".
Did someone have met this kind of problem or have the answer to it? Thanks so much for your help.When using procedures with pl/sql-tables as parameter they should be overloaded, e.g.:
procedure my_procedure (my_var in varchar2)...
and
procedure my_procedure (my_var in owa_util.ident_arr)
the procedure then can be called with:
http://..../my_procedure?my_var=Scott, which invokes the version with the varchar2 parameter, or
http://..../my_procedure?my_var=Scott&my_var=Miller......
which invokes the version with the pl/sql-Table
Another solution might be the use of flexible parameters, passing pairs of parameter_name, parameter_value to your procedure. Your procedure looks like:
procedure my_procedure (name_array IN owa.vc_arr, value_array IN owa.vc_arr)..
and is invoked (note the ! )
http://..../!my_procedure?ename=Scott&sal=200&job=clerk.....
looping through the pl/sql tables will retrieve values of ename, sal and job for name_array and Scott, 200 and clerk for value_array
Hth
null -
Dynamic SQL : passing table name as parameter
Hi
I have a SQL query (a store procedure ) that i want to convert to PLSQL
This is a part of my SQL query that i am trying to to find a solution for it, because i cant convert it to oracle :
DECLARE lookupTableRow CURSOR FOR
SELECT TableName FROM SYS_LookUpTable
OPEN lookupTableRow
FETCH NEXT FROM lookupTableRow INTO @tableName
WHILE @@FETCH_STATUS=0
BEGIN
SET @sql='SELECT * FROM '+@tableName
EXECUTE sp_executesql @sql
IF @counter=0
BEGIN
INSERT INTO T_TABLE_MAPPING VALUES('P_MAIN_METADATA', 'Table', @tableName)
END
ELSE
BEGIN
INSERT INTO T_TABLE_MAPPING VALUES('P_MAIN_METADATA', 'Table'+CONVERT(NVARCHAR(10),@counter), @tableName)
END
SET @counter=@counter+1
FETCH NEXT FROM lookupTableRow INTO @tableName
END
CLOSE lookupTableRow
DEALLOCATE lookupTableRow
As i understand i can't use ORACLE dynamic sql (execute immediate) when the table name is a parameter
Furthermore when i execute this dynamic query in my SQL store procedure each SELECT statement return me as a result the relevant table rows , those result are different in each loop .
So i cant do this too with ORACLE dynamic sql .
Please advice for any solution
* how can i use dynamic sql with table name as parameter ?
* how can i use a "dynamic" cursor, in order to be able to display the dynamic results ?
Thanks for the adviceHi,
b003cf5e-e55d-4ff1-bdd2-f088a662d9f7 wrote:
Hi
I have a SQL query (a store procedure ) that i want to convert to PLSQL
This is a part of my SQL query that i am trying to to find a solution for it, because i cant convert it to oracle :
DECLARE lookupTableRow CURSOR FOR
SELECT TableName FROM SYS_LookUpTable
OPEN lookupTableRow
FETCH NEXT FROM lookupTableRow INTO @tableName
WHILE @@FETCH_STATUS=0
BEGIN
SET @sql='SELECT * FROM '+@tableName
EXECUTE sp_executesql @sql
IF @counter=0
BEGIN
INSERT INTO T_TABLE_MAPPING VALUES('P_MAIN_METADATA', 'Table', @tableName)
END
ELSE
BEGIN
INSERT INTO T_TABLE_MAPPING VALUES('P_MAIN_METADATA', 'Table'+CONVERT(NVARCHAR(10),@counter), @tableName)
END
SET @counter=@counter+1
FETCH NEXT FROM lookupTableRow INTO @tableName
END
CLOSE lookupTableRow
DEALLOCATE lookupTableRow
As i understand i can't use ORACLE dynamic sql (execute immediate) when the table name is a parameter
Furthermore when i execute this dynamic query in my SQL store procedure each SELECT statement return me as a result the relevant table rows , those result are different in each loop .
So i cant do this too with ORACLE dynamic sql .
Please advice for any solution
* how can i use dynamic sql with table name as parameter ?
* how can i use a "dynamic" cursor, in order to be able to display the dynamic results ?
Thanks for the advice
I have a SQL query (a store procedure ) that i want to convert to PLSQL
I doesn't help when you use one term to mean another thing.
SQL is a language used in both Oracle and other products, such as Microsoft's SQL Server. I don't know much about SQL Server, but Oracle (at least) doesn't support stored procedures in SQL itself; they have to be coded in some other language, such as PL/SQL.
As i understand i can't use ORACLE dynamic sql (execute immediate) when the table name is a parameter
If the table name is a parameter (or only known at run-time for any reason), that's exactly the kind of situation where you MUST use dynamic SQL.
The number of columns that a query produces (and their datatypes) is fixed when you compile a query, whether that query is dynamic or not. If you have multiple queries, that produce result sets with different numbers of columns, then you can't combine them into a single query. The best you can do with one query is to add NULL columns to some of the queries so they all produce the same number of columns.
If you're just displaying the results, there might not be any reason to combine separate result sets. Just display one result set after another.
Whenever you have a question, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all the tables involved, and the results you want from that data.
Explain, using specific examples, how you get those results from that data.
Always say what version of Oracle you're using (e.g. 11.2.0.2.0).
See the forum FAQ: https://forums.oracle.com/message/9362002 -
How to get value from API which returns parameter in PL/SQL table?
Hello
I have below workflow API with returns info in PL/SQL table. I want to get value of 'USER_ORIG_SYSTEM_ID' column. How can i get that value in local variable.
Please help.
Thanks
Avalon
Wf_Directory.GetRoleInfo2
Syntax
procedure GetRoleInfo2
(Role in varchar2,
Role_Info_Tbl out wf_directory.wf_local_roles_tbl_type);
Description
Returns the following information about a role in a PL/SQL table:
• Name
• Display name
• Description
• Notification preference (’QUERY’, ’MAILTEXT’, ’MAILHTML’,
’MAILATTH’, ’MAILHTM2’, ’SUMMARY’, or, for Oracle
Applications only, ’SUMHTML’)
• Language
• Territory
• E–mail address
• Fax
• Status
• Expiration date
• Originating system
• Originating system ID
• Parent originating system
• Parent originating system ID
• Owner tag
• Standard Who columns
*******************************************************create a variable RoleXXX wf_directory.wf_local_roles_tbl_type;
call procedure GetRoleInfo2('TEST_ROLE',RoleXXX)
use RoleXXX.USER_ORIG_SYSTEM_ID -
SAP Business One Ver. 9.0 SQL Table Name
Dear All,
This is useful SQL Table Name for SAP Business One Ver.9.0 in details
Name Description
AAC1 Asset Classes - Depreciation Areas - History
AACP Periods Category-Log
AACS Asset Classes - History
AACT G/L Account - History
AAD1 Administration Extension-Log
AADM Administration - Log
AADT Fixed Assets Account Determination - History
ABAT Attribute - History
ABFC Bin Field Configuration - History
ABIN Bin Location - History
ABO1 External Bank Operation Code - Rows - Log
ABOC External Bank Operation Code - Log
ABOE Bill of Exchange for Payment - History
ABP1 Business Place Tax IDs
ABP2 Branch Tributary Info. Log
ABPL Business Place
ABSL Warehouse Sublevel - History
ABT1 Internal Bank Operation Codes - Accounts - Log
ABTC Internal Bank Operation Codes - Log
ABTN Batch Numbers Master Data
ABTW Batch Attributes in Location
ACD1 Credit Memo - Rows
ACD2 Credit Memo - Area Journal Transactions
ACD3 Credit Memo - Item Areas
ACFP CFOP for Nota Fiscal
ACH1 Checks for Payment - Rows - History
ACHO Checks for Payment - History
ACP1 Campaign - BPs
ACP2 Campaign - Items
ACP3 Campaign - Partners
ACPN Campaign
ACPR Contact Persons - History
ACQ1 Capitalization - Rows
ACQ2 Capitalization - Area Journal Transactions
ACQ3 Capitalization - Item Areas
ACR1 Business Partner Addresses - History
ACR2 Bussiness Partners - Payment Methods-History
ACR3 Business Partner Control Accounts - History
ACR4 Allowed WTax Codes for BP - History
ACR5 BP Payment Dates
ACR7 Fiscal IDs for BP Master Data
ACRB Business Partner Bank Accounts - History
ACRC Credit Cards
ACRD Business Partners - History
ACS1 Asset Classes - Depreciation Areas
ADG1 Discount Groups Rows
ADM1 Administration Extension
ADM2 Administration Electronic Report
ADMC GL Account Determination - Criteria - History
ADNF DNF Code
ADO1 A/R Invoice (Rows) - History
ADO10 A/R Invoice - Row Structure - History
ADO11 A/R Inv (Drawn Dpm Det) - Hist
ADO12 A/R Invoice - Tax Extension - History
ADO13 A/R Invoice Rows - Distributed Expenses
ADO14 Invoice - Assembly - Rows - History
ADO15 A/R Inv (Drawn Dpm Applied) - Hist
ADO16 Draft - SnB properties
ADO17 A/R Invoice - Import Process - History
ADO18 A/R Invoice - Export Process - History
ADO19 Bin Allocation Data - History
ADO2 A/R Invoice - Freight - Rows
ADO20 Intrastat Expenses
ADO3 A/R Invoice - Freight - History
ADO4 Documents - Tax - History
ADO5 Withholding Tax - History
ADO6 Documents History - Installments
ADO7 Delivery Packages - History
ADO8 Items in Package - History
ADO9 A/R Invoice (Rows) - History
ADOC Invoice - History
ADPA Fixed Asset Depreciation Areas - History
ADS1 House Bank Accounts
ADT1 Depreciation Types - Rows - History
ADTP Fixed Assets Depreciation Types - History
AEC1 Parameters for Various Types of Electronic Communication
AEC2 Messages Processed via Electronic Communication
AEC3 Statuses and Logs for Actions in Electronic Communication
AECM Electronic Communication Types or Protocols
AEDG Discount Groups
AEXD Freight Setup
AFA1 Asset Document - Rows
AFA2 Asset Document - Area Journal Transactions
AFAD Asset Document - History
AFM1 Tax Formula Parameter Declaration
AFML Tax Formula Master Table
AFPR Posting Period-Log
AGAR G/L Account Advanced Rules - History
AHE1 Absence Information
AHE2 Education
AHE3 Employee Reviews
AHE4 Previous Employment
AHE6 Employee Roles
AHE7 Savings Payments
AHEM Employees
AIGW Item Group - Warehouse - History
AIN1 Inventory Counting - Rows
AIN2 Inventory Counting - UoM
AIN3 Inventory Count - SnB
AINC Inventory Stock Counting
AINS Customer Equipment Card - History
AIQI Inventory Initial Quantity
AIQR Inventory Stock Posting (Reconcile)
AIT1 Item - Prices - History
AIT11 Asset Item Period Control
AIT13 Asset Attributes
AIT2 Items - Multiple Preferred Vendors - History
AIT3 Items - Localization Fields - History
AIT5 Asset Item Projects - History
AIT6 Asset Item Distribution Rules
AIT7 Asset Item Depreciation Params - History
AIT8 Asset Item Balances - History
AIT9 Item - UoM Prices
AITB Item Groups - History
AITM Items - History
AITT Product Tree - History
AITW Items - Warehouse - History
AJD1 Journal Entry - History - Rows
AJD2 Withholding Tax - History
AJDT Journal Entry - History
AKL1 Pick List - Rows - History
AKL2 Pick List for SnB and Bin Details
ALR2 Dynamic message data row
ALR3 Dynamic message data cells
AMD1 Amout Differences Report Lines
AMDR Manual Distribution Rule
AMDR1 Manual Distribution Rule - Rows
AMGP Material Group
AMR1 Inventory Revaluation - History - Rows
AMR2 Inventory Revaluation FIFO Rows (Archive)
AMR3 Inventory Revaluation SNB
AMRV Inventory Revaluation - History
ANCM NCM Code
AOA1 Blanket Agreement - Rows
AOA2 Blanket Agreement - Details
AOA3 Item Details: Activity
AOA4 Blanket Agreement - Recurring Transactions
AOAT Blanket Agreement
AOC1 Distribution Rule - Rows
AOCR Distribution Rule
AOPR Sales Opportunity
APJ1 Project Plan Steps
APJ2 Project Plan Steps Time Record
APJT Project Plan
APKL Pick List - History
APLN Price Lists
APRC Cost Center
APRJ Project Codes
AQI1 Inventory Initial Qty Rows
AQI2 Inventory Count - SnB
AQR1 Inventory Stock Posting (Reconcile) Lines
AQR2 Inventory Counting - UoM
AQR3 Inventory Count - SnB
ARC1 Incoming Payment - Checks - History
ARC2 Incoming Payment - Invoices - History
ARC3 Credit Vouchers History
ARC4 Incoming Payment - Account List - History
ARC5 Reciept log vat adjustment-History
ARC6 Incoming Payments - WTax Rows - History
ARC7 Incoming Payments - Tax Amount per Document - History
ARC8 Incoming Payment - TDS Entries - History
ARCT Incoming Payment - History
ARI1 Add-On
ASC1 Service Call Solutions - History
ASC2 Service Call Inventory Expenses - History
ASC3 Service Call Travel/Labor Expenses - History
ASC4 Service Call Travel/Labor Expenses - History
ASC5 Service Call Activities - History
ASCL History
ASGP Service Group for Brazil
ASP1 Special Prices - Data Areas
ASP2 Special Prices - Quantity Areas
ASPP Special Prices
ASRN Serial Numbers Master Data
AST1 Sales Tax Codes - Rows
ASTC Sales Tax Codes
ASTT Sales Tax Authorities Type
ATC1 Attachments - Rows
ATHL Thresholds
ATSC CST Code for Nota Fiscal
ATT1 Bill of Materials - Component Items - History
ATX1 Tax Invoice - History - Rows
ATX2 Tax Invoice Operation Codes
ATXI Tax Invoice - History
AUG1 UoM Group Detail
AUGP UoM Group
AUOM UoM Master Data
AUSR Archive Users - History
AVT1 Tax Definition
AVTG Tax Definition
AWEX Workflow Engine Execution Entity
AWFQ SWFQ History Table
AWH1 Tax Definition
AWH2 WTax Definition - Rows2
AWH3 Value Range
AWHS Warehouses - History
AWHT Withholding Tax
AWL1 Potential Processor of Tasks
AWL2 Input data for tasks
AWL3 Task Notes
AWL4 Task Output Data
AWL5 Task Field Mapping Information
AWLS Workflow - Task Details
AWMG Workflow Manager
AWO1 Production Order (Rows) - History
AWO2 Production Order - Base
AWOR Production Order - History
AWTS Workflow Engine Task Table
BGT1 Budget - Rows
BGT2 Budget - Cost Accounting
BGT3 Budget - Cost Accounting Rows
BNK1 Bank Statement - Documents List
BNK2 Bank Statement - Recommendation List
BOC1 External Bank Operation Code - Rows
BOE1 Bill of Exchange for Payment - Rows
BOT1 Bill of Exchange Transactions
BOX1 Box Definition - Rows
BOX2 Box Definition - Accounts
BOX3 Box Definition - Choice
BOX4 Box Definition - Contra Accounts of Accounts
BPL1 Branch I.E. Numbers
BPL2 Branch Tributary Info.
BTC1 Internal Bank Operation Codes - Accounts
BTF1 Journal Voucher - Rows
BTF2 Journal Voucher Withholding Tax - History
CASE Internal Recon. Upgrade 2007A
CASE1 Internal Recon. Upgrade 2007A
CCAL Chinese Chart of Account Level Definition
CCFG Company Configuration
CCPD Period-End Closing
CCS1 Cycle Count Determination- Subtable
CDC1 Cash Discount - Rows
CDIC Dictionary
CFH1 Cash Flow Statement Report - History - Rows
CFUS Functionality Usage Statistics
CHD1 Checks for Payment Drafts - Rows
CHO1 Checks for Payment - Rows
CHO2 Checks for Payment - Print Status
CIF1 Country Specific Information
CIN1 Correction Invoice - Rows
CIN10 Correction Invoice - Row Structure
CIN12 Correction Invoice - Tax Extension
CIN13 Correction Invoice Rows - Distributed Expenses
CIN17 Correction Invoice - Bin Allocation Data
CIN18 Correction Invoice - Export Process
CIN19 Correction Invoice - Bin Allocation Data
CIN2 A/R Correction Invoice - Freight - Rows
CIN20 Intrastat Expenses
CIN3 A/R Correction Invoice - Freight
CIN4 Correction Invoice - Tax Amount per Document
CIN5 A\R Correction Invoice - Withholding Tax
CIN6 Correction Invoice - Installments
CIN7 Delivery Packages - Correction Invoice
CIN8 Items in Package - Correction Invoice
CIN9 Correction Invoice - Drawn Dpm
CPI1 A/P Correction Invoice - Rows
CPI10 A/P Correction Invoice - Row Structure
CPI12 A/P Correction Invoice - Tax Extension
CPI13 A/P Correction Invoice Rows - Distributed Expenses
CPI14 A/P Correction Invoice - Assembly - Rows
CPI15 A/P Corr Inv - Drawn Dpm Appld
CPI16 A/P Corr. Inv - SnB properties
CPI17 A/P Correction Invoice - Import Process
CPI18 A/P Correction Invoice - Export Process
CPI19 A/P Correction Invoice - Bin Allocation Data
CPI2 A/P Correction Invoice - Freight - Rows
CPI20 Intrastat Expenses
CPI3 A/P Correction Invoice - Freight
CPI4 A/P Correction Invoice - Tax Amount per Document
CPI5 Withholding Tax Data
CPI6 Documents History - Installments
CPI7 A/P Correction Invoice - Delivery Packages
CPI8 A/P Correction Invoice - Items in Package
CPI9 A/P Corr. Invoice - Drawn Dpm
CPL1 Quick Copy - Instance Log
CPN1 Campaign - BPs
CPN2 Campaign - Items
CPN3 Campaign - Partners
CPT1 Cockpit Subtable
CPV1 A/P Correction Invoice Reversal - Rows
CPV10 A/P CrIn Rev - Row Structure
CPV12 A/P Correction Invoice Reversal - Tax Extension
CPV13 A/P Correction Invoice Reversal Rows - Distributed Expenses
CPV14 A/P Correction Invoice Reversal - Assembly - Rows
CPV15 A/P CrIn Rev - Drawn Dpm Appld
CPV16 A/P Correction Invoice Reversal - SnB properties
CPV17 A/P Correction Invoice Reversal - Import Process
CPV18 A/P Correction Invoice Reversal - Export Process
CPV19 A/P Correction Invoice Reversal - Bin Allocation Data
CPV2 A/P Correction Invoice Reversal - Freight - Rows
CPV20 Intrastat Expenses
CPV3 A/P Correction Invoice Reversal - Freight
CPV4 A/P Correction Invoice Reversal - Tax Amt per Doc.
CPV5 A/P Correction Invoice Reversal - WTax
CPV6 A/P Correction Invoice Reversal - Installments
CPV7 A/P Corr Inv Rvsl - Deliv Pkgs
CPV8 A/P Correction Invoice Reversal - Items in Package
CPV9 A/P Corr Inv Rvrsl - Drawn Dpm
CRD1 Business Partners - Addresses
CRD2 Bussiness Partners - Payment Methods
CRD3 BP Control Account
CRD4 Allowed WTax Codes for BP
CRD5 BP Payment Dates
CRD6 BP's Payer Name
CRD7 Fiscal IDs for BP Master Data
CRD8 BP Branch Assignment
CRD9 OCRD Extension
CSI1 A/R Correction Invoice - Rows
CSI10 A/R Correction Invoice - Row Structure
CSI12 A/R Correction Invoice - Tax Extension
CSI13 A/R Correction Invoice Rows - Distributed Expenses
CSI14 A/R Correction Invoice - Assembly - Rows
CSI15 A/R Corr Inv - Drawn Dpm Appld
CSI16 A/R Corr. Inv. - SnB properties
CSI17 A/R Correction Invoice - Import Process
CSI18 A/R Correction Invoice - Export Process
CSI19 A/R Correction Invoice - Bin Allocation Data
CSI2 A/R Corr Inv - Freight - Rows
CSI20 Intrastat Expenses
CSI3 A/R Correction Invoice - Freight
CSI4 A/R Correction Invoice - Tax Amount Per Document
CSI5 A/R Correction Invoice - Withholding Tax
CSI6 A/R Corr. Inv. - Installments
CSI7 A/R Corr. Inv. Deliv. Pkgs
CSI8 A/R Corr. Inv. - Items in Pkg
CSI9 A/R Corr. Inv. - Drawn Dpm
CSN1 Certificate Series - Series
CSPI Solution Packager Information
CSTN Workstation ID
CSV1 A/R Correction Invoice Reversal - Rows
CSV10 A/R Correction Invoice Reversal - Row Structure
CSV12 A/R Correction Invoice Reversal - Tax Extension
CSV13 A/R Correction Invoice Reversal Rows - Distributed Expenses
CSV14 A/R Correction Invoice Reversal - Assembly - Rows
CSV15 A/R CrIn Rev - Drawn Dpm Appld
CSV16 A/R Correction Invoice Reversal - SnB properties
CSV17 A/R Correction Invoice Reversal - Bin Allocation Data
CSV18 A/R Correction Invoice Reversal - Export Process
CSV19 A/R Correction Invoice Reversal - Bin Allocation Data
CSV2 A/R Correction Invoice Reversal - Freight - Rows
CSV20 Intrastat Expenses
CSV3 A/R Correction Invoice Reversal - Freight
CSV4 A/R Correction Invoice Reversal - Tax Amount Per Document
CSV5 A/R Correction Invoice Reversal - WTax
CSV6 A/R Correction Invoice Reversal - Installments
CSV7 A/R Correction Invoice Reversal - Delivery Packages
CSV8 A/R Correction Invoice Reversal - Items in Package
CSV9 A/R CrIn Rev - Drawn Dpm
CTG1 Installment Layout
CTNS Transaction Notification Setting
CTR1 Service Contract - Items
CTR2 Service Contract - Recurring Transactions
CUL1 Customer Usage Statistics Log
CUMF Folder
CUMI My Menu Items
DAB1 Dashboard Queries
DADB Data Archive DSA Balance
DAR1 Data Archive - Transaction Log
DAR2 Data Archive - Transaction Log
DAR3 Data Archive - Handwritten Documents
DATB Data Archive Tax Balance
DBADM Read-Only DB User
DDT1 Withholding Tax Deduction Hierarchy - Rows
DGP1 Customer List
DGP2 Expanded Selection Criteria
DGP3 Expanded Consolidation Options
DGP4 Business Place List
DGP5 Sort By List
DLN1 Delivery - Rows
DLN10 Delivery - Row Structure
DLN12 Delivery - Tax Extension
DLN13 Delivery Rows - Distributed Expenses
DLN14 Delivery Notes - Assembly - Rows
DLN15 Delivery - Drawn Dpm Applied
DLN16 Delivery - SnB properties
DLN17 Delivery - Import Process
DLN18 Delivery - Export Process
DLN19 Delivery - Bin Allocation Data
DLN2 Delivery Notes - Freight - Rows
DLN20 Intrastat Expenses
DLN3 Delivery Notes - Freight
DLN4 Delivery - Tax Amount per Document
DLN5 Delivery - Withholding Tax
DLN6 Delivery - Installments
DLN7 Delivery Packages
DLN8 Items in Package - Delivery
DLN9 Delivery - Drawn Dpm
DMW1 Query List
DOC20 Intrastat Expenses
DPI1 A/R Down Payment - Rows
DPI10 A/R Down Payment - Row Structure
DPI11 A/R DP - Drawn Dpm Detail
DPI12 Down Payment In - Tax Extension
DPI13 A/R Down Payment Rows - Distributed Expenses
DPI14 A/R Down Payment - Assembly - Rows
DPI15 A/R DP - Drawn Dpm Applied
DPI16 A/R Down Payment - SnB properties
DPI17 A/R Down Payment - Import Process
DPI18 A/R Down Payment - Export Process
DPI19 A/R Down Payment - Bin Allocation Data
DPI2 A/R Down Payment - Freight - Rows
DPI20 Intrastat Expenses
DPI3 A/R Down Payment - Freight
DPI4 A/R Down Payment - Tax Amount per Document
DPI5 A/R Down Payment - Withholding Tax
DPI6 A/R Down Payment - Installments
DPI7 Delivery Packages - A/R Down Pymt
DPI8 Items in Package - A/R Down Pmt.
DPI9 Down Payment Incoming - Drawn Dpm
DPO1 A/P Down Payment - Rows
DPO10 A/P Down Payment - Row Structure
DPO12 Down Payment - Tax Extension
DPO13 A/P Down Payment Rows - Distributed Expenses
DPO14 A/P Down Payment - Assembly - Rows
DPO15 A/P DP - Drawn Dpm Applied
DPO16 A/P Down Payment - SnB properties
DPO17 A/P Down Payment - Import Process
DPO18 A/P Down Payment - Export Process
DPO19 A/P Down Payment - Bin Allocation Data
DPO2 A/P Down Payment - Freight - Rows
DPO20 Intrastat Expenses
DPO3 A/P Down Payment - Freight
DPO4 A/P Down Payment - Tax Amount per Document
DPO5 A/P Down Payment - Withholding Tax
DPO6 Down Payment Out - Installments
DPO7 Delivery Packages - A/P Down Pymt
DPO8 Items in Package - A/P Down Pmt.
DPO9 Down Payment Outgoing - Drawn Dpm
DPS1 Deposit - Rows
DRF1 Draft - Rows
DRF10 Draft - Row Structure
DRF12 Draft - Tax Extension
DRF13 Draft Rows - Distributed Expenses
DRF14 Draft - Assembly - Rows
DRF15 Draft - Drawn Dpm Applied
DRF16 Draft - SnB - Rows
DRF17 Draft - Import Process
DRF18 Draft - Export Process
DRF19 Draft - Bin Allocation Data
DRF2 Draft - Freight - Rows
DRF20 Intrastat Expenses
DRF3 Draft - Freight
DRF4 Draft Documents - Tax
DRF5 Draft Documents - Withholding Tax
DRF6 Document Drafts - Installments
DRF7 Delivery Packages - Drafts
DRF8 Items in Package - Draft
DRF9 Document Draft - Drawn Dpm
DRN1 Depreciation Run - Posting
DRN2 Depreciation Run - Posting - Asset
DSC1 House Bank Accounts
DTP1 Depreciation Types - Rows
DUT1 Dunning Term Array1
DWZ1 Dunning Wizard Array1 - BP Filter
DWZ2 Dunning Wizard Array 2-Invoice Filter
DWZ3 Dunning Wizard Array 3 - Recommended Service Invoice
ECM1 Parameters for Various Types of Electronic Communication
ECM2 Messages Processed via Electronic Communication
ECM3 Statuses and Logs for Actions in Electronic Communication
EDG1 Discount Groups Rows
EJB1 ERV-JAb Wizard Signing Persons
EJB2 Docs List for ERV-JAb Wizard
EJD1 ERV-JAb Signing Persons List
EOY1 End of Year UDOs
ERX1 Excise Registering Number-Rows
FAA1 Asset Attributes - Rows
FAC1 Fixed Asset Parameter Change - Rows
FAC2 Fixed Asset Parameter Change - Period Control Change
FAM1 Fixed Asset Data Migration - Rows
FAR1 Fixed Asset Revaluation - Rows
FCT1 Sales Forecast - Rows
FIX1 Fixed Asset Transaction - Rows
FLT1 856 Report - Selection Criteria
FML1 Tax Formula Parameter Declaration
FRC1 Extend Cat. f. Financial Rep.
FTR1 Transfer - Rows
FTR2 Transfer - Area Journal Transactions
FTR3 Transfer - Item Areas
GBI1 GBI Row 1 - Electronic Account Book
GBI10 GBI Row 10 - Enterprise's Cash Flow Statement
GBI11 GBI Row 11 - Devalue Provision of Enterprise Assets
GBI12 GBI Row 12 - Shareholder's Rights and Interests Changing Report
GBI13 GBI Row 13 - Enterprise's Profit Distribution Report
GBI14 GBI Row 14 - Small Enterprise's Cash Flow Statement
GBI15 GBI Row 15 - Enterprise's VAT Payable Detail Report
GBI16 GBI Row 16 - Employees
GBI2 GBI Row 2 - G/L Account Master Records
GBI3 GBI Row 3 - Departments
GBI4 GBI Row 4 - Business Partners
GBI5 GBI Row 5 - Projects
GBI6 GBI Row 6 - G/L Account Balance
GBI7 GBI Row 7 - Accounting Vouchers
GBI8 GBI Row 8 - Enterprise's Balance Sheet
GBI9 GBI Row 9 - Enterprise's Profit and Loss Statement
GFL1 Grid Filter Rules
GFL2 Grid Filter Name
GPA1 Gross Profit Adjustment - Log
GPA2 Gross Profit Adjustments - Parameters
GTI1 GTS Invoice Details
GTM1 GTS Mapping Object Details
HEM1 Absence Information
HEM2 Education
HEM3 Employee Reviews
HEM4 Previous Employment
HEM5 Employee Data Ownership Authorization
HEM6 Employee Roles
HEM7 Savings Payments
HET1 Employee Transfer Details
HLD1 Holiday Dates
HMM1 Child Table of OHMM
HMM2 Child Table of OHHM
HTM1 Team Members
IBT1 Batch Number Transactions
ICD1 Inventory Counting Draft - Rows
ICD2 Inventory Counting Draft - UoM
ICD3 Inventory Count Draft - SnB
IEI1 Incoming Excise Invoice - Rows
IEI10 Incoming Excise Invoice - Row Structure
IEI11 IEI - Drawn Dpm Detail
IEI12 Incoming Excise Invoice - Tax Extension
IEI13 Incoming Excise Invoice Rows - Distributed Expenses
IEI14 Incoming Excise Invoice - Assembly - Rows
IEI15 IEI - Drawn Dpm Applied
IEI16 Incoming Excise Invoice - SnB properties
IEI17 Incoming Excise Invoice - Import Process
IEI18 Incoming Excise Invoice - Export Process
IEI19 Incoming Excise Invoice - Bin Allocation Data
IEI2 Incoming Excise Invoice - Freight - History - Rows
IEI20 Intrastat Expenses
IEI3 IEI - Freight
IEI4 Incoming Excise Invoice - Tax Amount per Document
IEI5 Incoming Excise Invoice - Withholding Tax
IEI6 IEI - Installments
IEI7 Delivery Packages - Incoming Excise Invoice
IEI8 Incoming Excise Invoice - Items in Package
IEI9 IEI - Drawn Dpm
IGE1 Goods Issue - Rows
IGE10 Goods Issue - Row Structure
IGE12 Goods Issue - Tax Extension
IGE13 Goods Issue Rows - Distributed Expenses
IGE14 Goods Issue - Assembly - Rows
IGE15 Gds Issue - Drawn Dpm Applied
IGE16 Goods Issue - SnB properties
IGE17 Goods Issue - Import Process
IGE18 Goods Issue - Export Process
IGE19 Goods Issue - Bin Allocation Data
IGE2 Goods Issue - Freight - Rows
IGE20 Intrastat Expenses
IGE3 Goods Issue - Freight
IGE4 Goods Issue - Tax Amount per Document
IGE5 Goods Issue - Withholding Tax
IGE6 Goods Issue - Installments
IGE7 Delivery Packages - Goods Issue
IGE8 Items in Package - Goods Issue
IGE9 Goods Issue - Drawn Dpm
IGN1 Goods Receipt - Rows
IGN10 Goods Receipt - Row Structure
IGN12 Goods Receipt - Tax Extension
IGN13 Goods Receipt Rows - Distributed Expenses
IGN14 Goods Receipt - Assembly - Rows
IGN15 Gds Rcpt - Drawn Dpm Applied
IGN16 Goods Receipt - SnB properties
IGN17 Goods Receipt - Import Process
IGN18 Goods Receipt - Export Process
IGN19 Goods Receipt - Bin Allocation Data
IGN2 Goods Receipt - Freight - Rows
IGN20 Intrastat Expenses
IGN3 Goods Receipt - Freight
IGN4 Goods Receipt - Tax Amount per Document
IGN5 Goods Receipt - Withholding Tax
IGN6 Goods Receipt- Installments
IGN7 Goods Receipt - Delivery Packages
IGN8 Goods Receipt - Items in Package
IGN9 Goods Receipt - Drawn Dpm
ILM1 Srl & Batch Det of Inv Log Msg
ILM2 Inventory Account Substitute
IMT1 Acct data in selected template
IMT11 Calculated expression's constituent with sign for specifying account in specific template
INC1 Inventory Counting - Rows
INC2 Inventory Counting - UoM
INC3 Inventory Count - SnB
INV1 A/R Invoice - Rows
INV10 A/R Invoice - Row Structure
INV11 A/R Invoice - Drawn Dpm Detail
INV12 A/R Invoice - Tax Extension
INV13 A/R Invoice Rows - Distributed Freights
INV14 A/R Invoice - Assembly - Rows
INV15 A/R Inv. - Drawn Dpm Applied
INV16 A/R Invoice - SnB properties
INV17 A/R Invoice - Import Process
INV18 A/R Invoice - Export Process
INV19 A/R Invoice - Bin Allocation Data
INV2 A/R Invoice - Freight - Rows
INV20 Intrastat Expenses
INV3 A/R Invoice - Freight
INV4 A/R Invoice - Tax Amount per Document
INV5 A/R Invoice - Withholding Tax
INV6 A/R Invoice - Installments
INV7 A/R Invoice - Delivery Packages
INV8 A/R Invoice - Items in Package
INV9 A/R Invoice - Drawn Dpm
IOD1 Inventory Initial Qty Draft Rows
IOD2 Inventory Count Draft - SnB
IPD1 Inventory Stock Posting Draft (Reconcile) Lines
IPD2 Inventory Posting Draft - UoM
IPD3 Inventory Posting Draft - SnB
IPF1 Landed Costs - Rows
IPF2 Landed Costs - Costs
IPF3 Landed Costs - Customs Summary
IQI1 Inventory Initial Qty Rows
IQI2 Inventory Count - SnB
IQR1 Inventory Stock Posting (Reconcile) Lines
IQR2 Inventory Posting - UoM
IQR3 Inventory Posting - SnB
ISW1 Reported Business Partners
ISW2 Intrastat Reported Items
ISW3 Declaration Rows
ITL1 Srl & Batch Details in Transac
ITM1 Items - Prices
ITM10 OITM Extension
ITM11 Asset Item Period Control
ITM12 UoM in Item
ITM13 Asset Attributes
ITM2 Items - Multiple Preferred Vendors
ITM3 Items - Localization Fields
ITM4 Package in Items
ITM5 Asset Item Projects
ITM6 Asset Item Distribution Rules
ITM7 Asset Item Depreciation Params
ITM8 Asset Item Balances
ITM9 Item - UoM Prices
ITR1 Internal Reconciliation - Rows
ITT1 Bill of Materials - Component Items
ITW1 Item Count Alert
IVL1 IVL Layer Level
IVM1 Invoice Mapping Object Details
IVRU Inventory Valuation Utility
IWB1 Batch No. Quantities Backup
IWB2 Serial No. Quantities Backup
IWZ1 Accounts Revaluation History
IWZ2 Inflation Warehouse Filter
IWZ3 Items Last Revaluation Data
JDT1 Journal Entry - Rows
JDT2 Withholding Tax - History
JST1 TDS Adjustment - Rows
KPS1 KPI Set Array 1
LGL1 Legal Data - Rows
LLR1 Electronic Report Generation Result - Reports
MAP1 Input and Output of Mapping
MAP2 Mapping Input and Output Relation
MDC1 Master Data Cleanup - Log
MDC2 Master Data Cleanup - MD Log
MDP1 Manual Depreciation - Rows
MDP2 Manual Depreciation - Area Journal Transactions
MDP3 Manual Depreciation - Item Areas
MDR1 Manual Distribution Rule - Rows
MIN1 Monthly Invoice Report Document Information
MIN2 Item Imformation of MI
MIV1 A/P Monthly Invoice - Document
MIV2 A/P Monthly Invoice - Item
MLS1 Distribution Lists - Recipients
MLT1 Translations in user language
MRV1 Inventory Revaluation Information Array
MRV2 Inventory Revaluation FIFO Rows
MRV3 Inventory Revaluation SNB
MSN1 MRP Scenarios - Warehouses Array
MSN2 MRP Run Results
MSN3 MRP Pegging Information
MSN4 MRP Scenarios - Items Array
MSN5 MRP-Specific Document
NFN1 Not a Fiscal Sequence
NNM1 Documents Numbering - Series
NNM4 Electronic Series
NNM5 Document Numbering - Removed Serial Numbers
OACD Credit Memo
OACG Account Category
OACK Acknowledge Number
OACM Accumulation
OACP Periods Category
OACQ Capitalization
OACR Accrual Type
OACS Asset Classes
OACT G/L Accounts
OADF Address Formats
OADG Depreciation Groups
OADM Administration
OADT Fixed Assets Account Determination
OAGM Arguments for B1i
OAGP Agent Name
OAGS Asset Groups
OAIM Archive Inventory Message
OALC Loading Expenses
OALI Alternative Items 2
OAMD Amount Differences Report
OARG Customs Groups
OARI Add-On - Company Definitions
OASC Account Segmentation Categories
OASG Account Segmentation
OAT1 Blanket Agreement - Rows
OAT2 Blanket Agreement - Details
OAT3 Item Details: Activity
OAT4 Blanket Agreement - Recurring Transactions
OATC Attachments
OBAT Bin Location Attribute
OBBI Brazil Beverage Indexer
OBBQ Item - Serial/Batch - Bin Accumulator
OBCA Bank Charges Allocation Codes
OBCD Bar Code Master Data
OBCG Bank Charge for Bank Transfers
OBDC B1i DI Configuration
OBFC Bin Field Configuration
OBFI Brazil Fuel Indexer
OBGD Budget Cost Assess. Mthd
OBGS Budget Scenario
OBGT Budget
OBIN Bin Location
OBMI Brazilian Multi-Indexer
OBNH Bank Statement Header
OBNI Brazil Numeric Indexer
OBNK External Bank Statement Received
OBOC External Bank Operation Code Category
OBOD BIOD Master Data
OBOE Bill of Exchange for Payment
OBOS Box Set Definition
OBOT Bill Of Exchang Transaction
OBOX Box Definition
OBPL Business Place
OBPP BP Priorities
OBSI Brazil String Indexer
OBSL Warehouse Sublevel
OBST BoE Stamp Tax
OBTC Internal Bank Operation Codes
OBTD Journal Vouchers List
OBTF Journal Voucher Entry
OBTL Bin Transaction Log
OBTN Batch Numbers Master Data
OBTQ Batch No. Quantities
OBTW Batch Attributes in Location
OBVL Serial Numbers and Batch Valuation Log
OCBI Central Bank Ind.
OCCD Cargo Customs Declaration Numbers
OCCS Cycle Count Determination
OCCT Cost Center Type
OCDC Cash Discount
OCDP Closing Date Procedure
OCDT Credit Card Payment
OCFH Cash Flow Statement History
OCFP CFOP for Nota Fiscal
OCFT Cash Flow Transactions - Rows
OCFW Cash Flow Line Item
OCHD Checks for Payment Drafts
OCHF 312
OCHH Check Register
OCHO Checks for Payment
OCHP India Chapter ID
OCIF Configuration of Intrastat Fields
OCIG CIG Codes
OCIN A/R Correction Invoice
OCIP Configuration of Integration Packages
OCLA Activity Status
OCLG Activities
OCLO Meetings Location
OCLS Activity Subjects
OCLT Activity Types
OCMN Customized Menu
OCMT Competitors
OCNA CNAE Code
OCNT Counties
OCOG Commission Groups
OCPC Quick Copy Config.
OCPI A/P Correction Invoice
OCPL Quick Copy Log Manager
OCPN Campaign
OCPR Contact Persons
OCPT Cockpit Main Table
OCPV A/P Correction Invoice Reversal
OCQG Card Properties
OCR1 Distribution Rule - Rows
OCRB BP - Bank Account
OCRC Credit Cards
OCRD Business Partner
OCRG Card Groups
OCRH Credit Card Management
OCRN Currency Codes
OCRP Payment Methods
OCRT CRDB Tables Tree List
OCRV Credit Payments
OCRY Countries
OCSC Crystal Server Configuration
OCSI A/R Correction Invoice
OCSN Certificate Series
OCSQ Column Sequences
OCST States
OCSV A/R Correction Invoice Reversal
OCTG Payment Terms
OCTR Service Contracts
OCTT Contract Template
OCUC CUS Configuration
OCUL Customer Usage Statistics Log
OCUP CUP Codes
OCYC Cycle
ODAB Dashboard
ODAR Data Archiving
ODBN Bat. Nos - Draft - Master Data
ODBW Batch Draft Attribs in Locat.
ODCC Dashboard Cache Configuration
ODCI Intrastat Configuration
ODDG Withholding Tax Deduction Groups
ODDT Withholding Tax Deduction Hierarchy
ODGL Deduction Group List
ODGP Document Generation Parameter Sets
ODIM Cost Accounting Dimension
ODLL Bar Code Algorithm File
ODLN Delivery
ODMC GL Account Determination - Criteria
ODMW Data Migration
ODNF DNF Code
ODOR Doubtful Debts
ODOW Data Ownership - Objects
ODOX Data Ownership - Exceptions
ODPA Fixed Asset Depreciation Areas
ODPI A/R Down Payment
ODPO A/P Down Payment
ODPP Depreciation Type Pools
ODPS Deposit
ODPT Postdated Deposit
ODPV Fixed Assets Depreciation Value
ODRF Drafts
ODRN Depreciation Run
ODSC Bank Codes
ODSN SNs - Draft - Master Data
ODSW SN Draft Attribs in Location
ODTP Fixed Assets Depreciation Types
ODTY BoE Document Type
ODUN Dunning Letters
ODUT Dunning Terms
ODWZ Dunning Wizard
OECDW ECD Wizard
OECM Electronic Communication Types or Protocols
OEDG Discount Groups
OEI1 Outgoing Excise Invoice - Rows
OEI10 Outgoing Excise Invoice - Row Structure
OEI11 OEI - Drawn Dpm Detail
OEI12 Outgoing Excise Invoice - Tax Extension
OEI13 Outgoing Excise Invoice Rows - Distributed Expenses
OEI14 Outgoing Excise Invoice - Assembly - Rows
OEI15 OEI - Drawn Dpm Applied
OEI16 Outgoing Excise Invoice - SnB properties
OEI17 Outgoing Excise Invoice - Import Process
OEI18 Outgoing Excise Invoice - Export Process
OEI19 Outgoing Excise Invoice - Bin Allocation Data
OEI2 OEI - Freight Rows
OEI20 Intrastat Expenses
OEI3 OEI - Freight
OEI4 Outgoing Excise Invoice - Tax Amount per Document
OEI5 Outgoing Excise Invoice - Withholding Tax
OEI6 Outgoing Excise Invoice - Installments
OEI7 Delivery Packages - Outgoing Excise Invoice
OEI8 Outgoing ExHi,
You should post as "Write document" or "Write a blog post" option not as discussion.
Thanks & Regards,
Nagarajan -
Can't update a sql-table with a space
Hello,
In a transaktion I'm getting some Values from a SAP-ERP System via JCO.
I update a sql-table with this values with a sql-query command.
But sometimes the values I get from SAP-ERP are empty (space) and I'm not able to update the sql-table because of a null-value exception. (The column doesn't allow null-values). It seems that MII thinks null and space are the same.
I tried to something like this when passing the value to the sql-query parameter but it didn't work:
stringif( Repeater_Result.Output{/item/SCHGT} == "X", "X", " ")
stringif( Repeater_Result.Output{/item/SCHGT} == "X", "X", " ")
this works but I don't want to have a "_"
stringif( Repeater_Result.Output{/item/SCHGT} == "X", "X", "_")
Any suggestions?
thank you.
MatthiasThe problem is Oracle doesn't know the space function. But it knows a similar function: NVL --> replaces a null value with something else. So this statement works fine for me:
update marc set
LGort = '[Param.3]',
dispo = '[Param.4]',
schgt = NVL('[Param.5]', ' '),
dismm = '[Param.6]',
sobsl = NVL('[Param.7]',' '),
fevor = '[Param.8]'
where matnr = '[Param.1]' and werks = '[Param.2]'
If Param.5 or Param.7 is null Oracle replaces it with a space in every other case it is the parameter itself.
Christian, thank you for your hint with the space function. So I remembered the NVL-function.
Regards
Matthias -
Problem with pl/sql table data type
hai friends,
i have one procedure it has some in parameters and one out parameter which fetches values to front end.
But the out parameter will be pl/sql table data type.
if it is ref cursor
then i declared as
var x refcursor;
exec procedure_name(1,:x);
it is ok.
but for pl/sql table data type is out parameter then what i will do in the prompt .
give me syntax and clarify my doubt.
advanced thanks...
madhavaThe SQL*Plus VARIABLE statement does not support user-defined types, hence it cannot support nested tables. It can support cursors because they can be weakly typed (so we can use the one SQL*Plus VAR to hold any shape of resultset). Nested tables are strongly typed; SQL*Plus is a relatively stupid interface and cannot be expected to understand UDT.
So, it you want to use nested tables as output you'll need to code a wrapping procedure that can understand your nested table type and handle it accordingly.
Sorry.
Cheers, APC -
Passing parameters to PL/SQL table types
Hi Everybody,
I have one question about passing PL/SQL tables types and tabs as IN parameter in procedure.I am working in 11.2.0.2.0 environment. I am stuck on how to pass those values to procedure.Please find below more details:
Table 1:
CREATE TABLE ITEMS
ITEM_ID VARCHAR2(40 BYTE) NOT NULL,
ITEM_NAME VARCHAR2(40 BYTE),
SERIAL NUMBER(2),
ADDED_ON DATE);
Table 2:
CREATE TABLE ITEM_ACTIVITY_INFO
ITEM_ID VARCHAR2(40 BYTE) NOT NULL,
ACCOUNT_TYPE VARCHAR2(1 BYTE),
ID_NUMBER NUMBER(3),
ACTIVATION_DATE DATE);
Table 3:
CREATE TABLE ITEM_GROUP
GROUP_ID NUMBER(2) NOT NULL,
ITEM_ID VARCHAR2(40 BYTE),
GROUP_TYPE VARCHAR2(20 BYTE),
GROUP_DATE DATE);
Table 4:
CREATE TABLE ITEM_ADDRESS
GROUP_ID NUMBER(2) NOT NULL,
NAME VARCHAR2(60 BYTE),
ADDRESS VARCHAR2(100));
Following types are created:
CREATE OR REPLACE TYPE ITEMS_TYPE AS OBJECT
ITEM_ID VARCHAR2(40 BYTE),
ITEM_NAME VARCHAR2(40 BYTE),
SERIAL NUMBER(2),
ADDED_ON DATE);
CREATE OR REPLACE TYPE ITEM_ACTIVITY_TYPE AS OBJECT
ITEM_ID VARCHAR2(40 BYTE),
ACCOUNT_TYPE VARCHAR2(1 BYTE),
ID_NUMBER NUMBER(3),
ACTIVATION_DATE DATE);
CREATE OR REPLACE TYPE ITEM_GROUP_COMP_TYPE AS OBJECT
GROUP_ID NUMBER(2) NOT NULL,
ITEM_ID VARCHAR2(40 BYTE),
GROUP_TYPE VARCHAR2(20 BYTE),
GROUP_DATE DATE
ITEM_ADDRESS_IN ITEM_ADDRESS_TYPE);
CREATE OR REPLACE TYPE ITEM_ADDRESS_TYPE AS OBJECT
GROUP_ID NUMBER(2),
NAME VARCHAR2(60 BYTE),
ADDRESS VARCHAR2(100));
CREATE OR REPLACE TYPE ITEM_GROUP_COMP_TAB AS TABLE OF ITEM_GROUP_COMP_TYPE;
Create or replace procedure ITEM_ADD_CHANGE(
ITEM_IN IN ITEMS_TYPE,
ITEM_ACTIVITY_IN IN ITEM_ACTIVITY_TYPE,
ITEM_GROUP_IN IN ITEM_GROUP_COMP_TAB,
ITEM_OUT IN OUT ITEMS.ITEM_ID%TYPE);
Above are the paramteres we are passing to procedure.
I need help in how to pass parameters to above procedure. All comments and responses will be highly appreciated. Thanks everyone for going through the post. Please let me know if more more information is required on this problem.
Regards
DevBilly Verreynne wrote:
Types used in this fashion, only make sense if the table is based on the type. It makes very little sense to have a table structure and then to duplicate the structure using a type.
The 2 structures may be defined the same. But they are NOT interchangeable and requires one to be converted to the other to use. This is not sensible in my view. It is far easier in that case to simply use the PL/SQL macro +%RowType+ to create a duplicate structure definition - one that can natively be used for touching that table, without conversions required.
If you do want to use types, define the type, then define the table of that type, adding the required constraints (pk, fk, not null, check) to the table's definition.Billy:
Just curious, why do you say it makes very little sense to have a type modeled on a table? I do that a lot. In my case, I am getting the values from an external program, not building them manually, but it makes a lot of sense to me.
One application where I do this a lot has a java front-end that parses HL7 messages. Each message contains at least minimal information about a variable number of entities (and often several rows for an entity) in the database, and must be processed as a single atomic trasnaction. So, rather than have potentially hundreds of parameters to the "main" driver procedures for different message types I created a set of types more or less identical to the tables representing the entities. The java program parses the mesasge and populates the type, then calls the appropriate stored procedure for the message type passing in the populated types. My stored procedure then does inserts/updates or deletes as appropriate over potentially dozens of tables.
John -
Pass table name as parameter in prepared Statement
Can I pass table name as parameter in prepared Statement
for example
select * from ? where name =?
when i use setString method for passing parameters this method append single colon before and after of this parameter but table name should be send with out colon as SQL Spec.
I have another way to make sql query in programing but i have a case where i have limitation of that thing so please tell me is it possible with prepared Statment SetXXx methods or not ?
Thanks
Haroon Idrees.haroonob wrote:
I know ? is use for data only my question is this way to pass table name as parameterI assume you mean "how can I do it?" As I have already answered "is this the way?" with no.
Well, I would say (ugly as it is) String concatenation, or stored procedures. -
The data from my web page insert in SQL table as question marks
I use Farsi language in my web page for inserting customer data. The data that is inserted in webpage and submitted, showed as ???? in SQL table. A lot of developers say that I should use N' before the Unicode character, but I don't know how I can use it
in my code. I attached the code. Can someone say me where I should insert the N in my code?
protected void cmdInsert_Click(object sender, EventArgs e)
//Checking the validation of required fields
if (cboCustomerType.Text == "" || cboTitle.Text == "" || SearchableName.Text == "" ||
FinalName.Text == "" || NationalID.Text == "" || BusinessID.Text == "" || MobilePhone.Text == "")
lblStatus.Text = "لطفا فیلدهای اجباری را حتما پر کنید";
return;
//define ADO.NET objects.
string insertSQL;
insertSQL = "INSERT INTO Customers(";
insertSQL += "CustomerType,CustomerTitle,CustomerFirstName,CustomerLastName,CompanyType,";
insertSQL += "CompanyName,SearchableName,FinalName,NationalCode,BusinessID,City,Address,PostalCode,";
insertSQL += "Zone,MobileNumber,WorkPhone1,WorkPhone2,HomePhone,FaxNumber,Email,Website,Note)";
insertSQL += "VALUES('";
insertSQL += cboCustomerType.Text + "','";
insertSQL += cboTitle.Text + "','";
insertSQL += CustomerFirstName.Text + "','";
insertSQL += CustomerLastName.Text + "','";
insertSQL += cboCompanyType.Text + "','";
insertSQL += CompanyName.Text + "','";
insertSQL += SearchableName.Text + "','";
insertSQL += FinalName.Text + "','";
insertSQL += NationalID.Text + "','";
insertSQL += BusinessID.Text + "','";
insertSQL += City.Text + "','";
insertSQL += Address.Text + "','";
insertSQL += PostalCode.Text + "','";
insertSQL += Zone.Text + "','";
insertSQL += MobilePhone.Text + "','";
insertSQL += Phone1.Text + "','";
insertSQL += Phone2.Text + "','";
insertSQL += HomePhone.Text + "','";
insertSQL += FaxNumber.Text + "','";
insertSQL += Email.Text + "','";
insertSQL += Website.Text + "','";
insertSQL += Note.Text + "')";
SqlConnection con = new SqlConnection(connectionString);
SqlCommand cmd = new SqlCommand(insertSQL, con);
//try to open the database and execute the insert
int added = 0;
try
con.Open();
added = cmd.ExecuteNonQuery();
lblStatus.Text = added.ToString() + "اضافه شد";
catch (Exception err)
lblStatus.Text = "Error inserting record.";
lblStatus.Text += err.Message;
finally
con.Close();
//If the insert succeed, refresh the customer list.
if (added > 0)
FillCustomerList();
Regards,Because you're composing the SQL statement with string concatenation, you would put the "N" before the single quote,
VALUES(N'";
insertSQL += cboCustomerType.Text + "',N'";
insertSQL += cboTitle.Text + "',N'"; // ...etc
However, composing SQL statements with string concatenation is not a suggested practice because it's open to SQL injection (see:
https://technet.microsoft.com/en-us/library/ms161953(v=sql.105).aspx). A safer way to do this is to use command parameters to represent the values (see SqlCommand.Parameters
property). If you use parameters, you can specify parameter data type as SqlDbType.NVarchar, which will ensure your text values are passed in as Unicode. Also ensure that the columns in question are defined in the database table definition as Unicode (NVARCHAR
rather than VARCHAR).
Hope this helps, Bob -
How to add byte[] array based Image to the SQL Server without using parameter
how to add byte[] array based Image to the SQL Server without using parameter.I have a column in table with the type image in sql and i want to add image array to the sql image column like below:
I want to add image (RESIM) to the procedur like shown above but sql accepts byte[] RESIMI like System.Drowing. I whant that sql accepts byte [] array like sql image type
not using cmd.ParametersAdd() method
here is Isle() method contentSQL Server binary constants use a hexadecimal format:
https://msdn.microsoft.com/en-us/library/ms179899.aspx
You'll have to build that string from a byte array yourself:
byte[] bytes = ...
StringBuilder builder = new StringBuilder("0x", 2 + bytes.Length * 2);
foreach (var b in bytes)
builder.Append(b.ToString("X2"));
string binhex = builder.ToString();
That said, what you're trying to do - not using parameters - is the wrong thing to do. Not only it is insecure due to the risk of SQL injection but in the case of binary data is also inefficient since these hex strings are larger than the original byte[]
data. -
Hello everyone,
I’ve been assigned one requirement wherein I would like to read around 50 CSV files from a specified folder.
In step 1 I would like to create schema for this files, meaning take the CSV file one by one and create SQL table for it, if it does not exist at destination.
In step 2 I would like to append the data of these 50 CSV files into respective table.
In step 3 I would like to purge data older than a given date.
Please note, the data in these CSV files would be very bulky, I would like to know the best way to insert bulky data into SQL table.
Also, in some of the CSV files, there will be 4 rows at the top of the file which have the header details/header rows.
According to my knowledge I would be asked to implement this on SSIS 2008 but I’m not 100% sure for it.
So, please feel free to provide multiple approaches if we can achieve these requirements elegantly in newer versions like SSIS 2012.
Any help would be much appreciated.
Thanks,
Ankit
Thanks, <b>Ankit Shah</b> <hr> Inkey Solutions, India. <hr> Microsoft Certified Business Management Solutions Professionals <hr> http://ankit.inkeysolutions.comHello Harry and Aamir,
Thank you for the responses.
@Aamir, thank you for sharing the link, yes I'm going to use Script task to read header columns of CSV files, preparing one SSIS variable which will be having SQL script to create the required table with if exists condition inside script task itself.
I will be having "Execute SQL task" following the script task. And this will create the actual table for a CSV.
Both these components will be inside a for each loop container and execute all 50 CSV files one by one.
Some points to be clarified,
1. In the bunch of these 50 CSV files there will be some exception for which we first need to purge the tables and then insert the data. Meaning for 2 files out of 50, we need to first clean the tables and then perform data insert, while for the rest 48
files, they should be appended on daily basis.
Can you please advise what is the best way to achieve this requirement? Where should we configure such exceptional cases for the package?
2. For some of the CSV files we would be having more than one file with the same name. Like out of 50 the 2nd file is divided into 10 different CSV files. so in total we're having 60 files wherein the 10 out of 60 have repeated file names. How can we manage
this criteria within the same loop, do we need to do one more for each looping inside the parent one, what is the best way to achieve this requirement?
3. There will be another package, which will be used to purge data for the SQL tables. Meaning unlike the above package, this package will not run on daily basis. At some point we would like these 50 tables to be purged with older than criteria, say remove
data older than 1st Jan 2015. what is the best way to achieve this requirement?
Please know, I'm very new in SSIS world and would like to develop these packages for client using best package development practices.
Any help would be greatly appreciated.
Thanks, <b>Ankit Shah</b> <hr> Inkey Solutions, India. <hr> Microsoft Certified Business Management Solutions Professionals <hr> http://ankit.inkeysolutions.com
1. In the bunch of these 50 CSV files there will be some exception for which we first need to purge the tables and then insert the data. Meaning for 2 files out of 50, we need to first clean the tables and then perform
data insert, while for the rest 48 files, they should be appended on daily basis.
Can you please advise what is the best way to achieve this requirement? Where should we configure such exceptional cases for the package?
How can you identify these files? Is it based on file name or are there some info in the file which indicates
that it required a purge? If yes you can pick this information during file name or file data parsing step and set a boolean variable. Then in control flow have a conditional precedence constraint which will check the boolean variable and if set it will execute
a execte sql task to do the purge (you can use TRUNCATE TABLE or DELETE FROM TableName statements)
2. For some of the CSV files we would be having more than one file with the same name. Like out of 50 the 2nd file is divided into 10 different CSV files. so in total we're having 60 files wherein the 10 out of 60 have
repeated file names. How can we manage this criteria within the same loop, do we need to do one more for each looping inside the parent one, what is the best way to achieve this requirement?
The best way to achieve this is to append a sequential value to filename (may be timestamp) and then process
them in sequence. This can be done prior to main loop so that you can use same loop to process these duplicate filenames also. The best thing would be to use file creation date attribute value so that it gets processed in the right sequence. You can use a
script task to get this for each file as below
http://microsoft-ssis.blogspot.com/2011/03/get-file-properties-with-ssis.html
3. There will be another package, which will be used to purge data for the SQL tables. Meaning unlike the above package, this package will not run on daily basis. At some point we would like these 50 tables to be purged
with older than criteria, say remove data older than 1st Jan 2015. what is the best way to achieve this requirement?
You can use a SQL script for this. Just call a sql procedure
with a single parameter called @Date and then write logic like below
CREATE PROC PurgeTableData
@CutOffDate datetime
AS
DELETE FROM Table1 WHERE DateField < @CutOffDate;
DELETE FROM Table2 WHERE DateField < @CutOffDate;
DELETE FROM Table3 WHERE DateField < @CutOffDate;
GO
@CutOffDate which denote date from which older data have to be purged
You can then schedule this SP in a sql agent job to get executed based on your required frequency
Please Mark This As Answer if it solved your issue
Please Vote This As Helpful if it helps to solve your issue
Visakh
My Wiki User Page
My MSDN Page
My Personal Blog
My Facebook Page -
Queries on pl/sql tables within a function
hi,
how can i execute regular sql-queries within a function on a pl/sql table which the function has recieved as a parameter ? i have tried quite a bit and always get type mismatches or internal errors. anybody has a good example on this ?
thanks in advance,
stephanhi,
okay, i will not post the actual code i have, because it won't make too much sense out of the context, but here are the relevant parts...
i have a few object definitions that represent the records of the three tables (two input and one output)...
create type t1 as object (...);
create type t2 as object (...);
create type t3 as object (...);
and a package with the table definitions
create or replace package t_defs as
type tab_t1 is table of t1;
type tab_t2 is table of t2;
type tab_t3 is table of t3;
end t_defs;
and here is a rough sketch what the function should look like later:
CREATE OR REPLACE FUNCTION some_function (
tab1 IN t_defs.tab_t1, tab2 IN t_def.tab_t2)
RETURN t_defs.tab_t3 PIPELINED IS
TYPE refcur IS REF CURSOR;
cur0 refcur;
curr_rec t3 := t3(NULL, ....);
BEGIN
open cur0 for 'here is the statement i could not do';
LOOP
FETCH cur0 INTO curr_rec.....;
EXIT WHEN cur0%NOTFOUND;
. -- (manipulate the record) --
PIPE ROW(curr_rec);
END LOOP;
RETURN;
END; -
JSP + MYSQL question: input form value into a SQL table
Hello,
I am writing some JSP code to read input information from a input form to write this information into a SQL field.
My problems are:
- how can i pass the input form information to other jsp file ? (like Getproperty of something like this)
- how can i move the content of any input information into a variable ? I mean something like this:
String a1;
username.value.of.the.input.field.in.forum_jsp = a1.in.addmessage_jsp;and then:
int rowsAffected = stmt.executeUpdate("INSERT INTO forummessages (messagecode, " + " usercode, " + " messagedate, " + " message) VALUES(6,3,06/07/2007,'" + a1 + "')");------
The SQL table looks like this:
stmt.executeUpdate("CREATE TABLE forummessages (messagecode int AUTO_INCREMENT PRIMARY KEY, usercode int, messagedate date, message char(255) not null)");My codes are:
forum.jsp - this one should pass the input information to addmessage.jsp
<%@ page contentType="text/html; charset=iso-8859-2" %>
<%@ page import="java.sql.*" %>
<%
Connection con = null;
Statement stmt = null;
try {
Class.forName("com.mysql.jdbc.Driver");
String url = "jdbc:mysql://localhost:3306/mysql";
con = DriverManager.getConnection(url,"root", "");
stmt = con.createStatement();
String sql = "SELECT * FROM forummessages,users,bmwecode WHERE (forummessages.usercode=users.usercode) AND (users.bmwcode=bmwecode.bmwcode)";
ResultSet rs = stmt.executeQuery(sql);
%>
<html>
<head>
<title>JSP + MYSQL Teszt</title>
</head>
<body>
<a href="forum.jsp">Forum / Uj hozzaszolas</a>
<a href="userlist.jsp">Felhasznalok kilistazasa</a>
<a href="adduser.jsp">Felhasznalo hozzadasa</a>
<a href="deletemessage.jsp">Hozzaszolas torlese</a>
<br><br>
<form action="addmessage.jsp" method=post">
Felhasznalo:
<input type="text" name="username">
<br><br>
Hozzaszolas:
<input type="text" name="message">
<br><br>
<input type="submit" value="Uj hozzaszolas">
<br><br>
<table border="0">
<tr>
<th>messagecode</th>
<th>user</th>
<th>car type</th>
<th>message</th>
</tr>
<%
while(rs.next()){
%>
<tr>
<td><%=rs.getInt("messagecode") %></td>
<td><%=rs.getString("username") %></td>
<td><%=rs.getString("bmwtype") %></td>
<td><%=rs.getString("message") %></td>
</tr>
<%
} // end while
%>
</table>
</body>
</html>
<%
} catch (Exception e) {
out.println("<font color=red><h3>Error:</h3></font>" + e);
e.printStackTrace();
} finally {
try {
if (stmt!=null) {
stmt.close();
if (con!=null) {
con.close();
} catch (Exception e) {
e.printStackTrace();
%> ----
addmessage.jsp
<%@ page contentType="text/html; charset=iso-8859-2" %>
<%@ page import="java.sql.*" %>
<%
Connection con = null;
Statement stmt = null;
try {
Class.forName("com.mysql.jdbc.Driver");
String url = "jdbc:mysql://localhost:3306/mysql";
con = DriverManager.getConnection(url,"root", "");
stmt = con.createStatement();
int rowsAffected = stmt.executeUpdate("INSERT INTO forummessages (messagecode, " + " usercode, " + " messagedate, " + " message) VALUES(6,3,06/07/2007,'" + a1 + "')");
} catch (Exception e) {
out.println("<font color=red><h3>Hiba:</h3></font>" + e);
e.printStackTrace();
} finally {
try {
if (stmt!=null) {
stmt.close();
if (con!=null) {
con.close();
} catch (Exception e) {
e.printStackTrace();
%>
<a href="forum.jsp">Forum / Uj hozzaszolas</a>
<a href="userlist.jsp">Felhasznalok kilistazasa</a>
<a href="adduser.jsp">Felhasznalo hozzadasa</a>
<a href="deletemessage.jsp">Hozzaszolas torlese</a>
<br><br>---
Thank you for your help in advance.SELECT DISTINCT
hou.name
,poh.segment1 po_num
,pol.line_num po_line_num
,poh.currency_code
--,trunc(poh.creation_date) po_creation_date
,pol.cancel_flag
,msi.segment1 item_num
,pol.unit_price
,round(cost.item_cost,5)
,round((&p_rate * pol.unit_price),5) "CONVERSION"
,(cost.item_cost - round((&p_rate * pol.unit_price),5)) difference
,pov.vendor_name
FROM
po.po_headers_all poh
,po.po_lines_all pol
,po.po_vendors pov
,hr.hr_all_organization_units hou
,inv.mtl_system_items_b msi
,bom.cst_item_costs cost
WHERE
poh.po_header_id = pol.po_header_id
and pov.vendor_id = poh.vendor_id
and poh.org_id = hou.organization_id
and hou.organization_id = :p_operating_unit
and poh.currency_code = :p_currency
and poh.creation_date between :po_creation_date_from and :po_creation_date_to
and poh.type_lookup_code = 'BLANKET'
and msi.inventory_item_id = pol.item_id
and cost.INVENTORY_ITEM_ID = pol.ITEM_ID
--and (cost.item_cost - pol.unit_price) <> 0
and (cost.item_cost - round((&p_rate * pol.unit_price),5)) <> 0
and cost.organization_id = 1
and msi.organization_id = 1
and cost.cost_type_id = 3 --- Pending cost type
and nvl(upper (pol.closed_code),'OPEN') not in('CANCELLED', 'CLOSED', 'FINALLY CLOSED', 'REJECTED')
and nvl(upper (poh.closed_code),'OPEN') not in('CANCELLED', 'CLOSED', 'FINALLY CLOSED', 'REJECTED')
and nvl(pol.cancel_flag, 'N') = 'N'
and &p_rate user parameter
I want this p_rate to be passed as a user parameter.
Maybe you are looking for
-
Ssh configuration to avoid connection timeouts / broken pipes ?
I'm running irssi through screen on my server via ssh. Recently, my parents' internet connection has become very dodgy, and because of this, my terminal freezes altogether once every 15 minutes or so, and resumes with some "broken pipe" message after
-
How to get a cropped PDF to hold.
Is there a way in Acrobat the crop a PDF and have a crop hold? I understand that cropping is actually masking but I need to have only the cropped area of a PDF show when placed in an InDesign document. Is there a way to accomplish this? I am using Ac
-
FI Substitution rule on completed document
Hi Everyone, We're trying to create a substitution rule to change the payment terms on our invoices (fields BSEG-ZTERM and BSEG-ZBD1T). We're having trouble with our prerequisite: If any of the expense distributions are being charged against a fede
-
White Space in SubReport column when one cell grows
Hello, I have a report with a sub report embedded in a column. The sub report contains a table with 3 cells. All cells have the option CanGrow set to True. I have an expression on the sub report that fills in the background color of the table dependi
-
Client ejb 2.0 to a 1.0 sessionbean
For a migration situation i need to know whether it is possible for a ejb 2.0 client to connect to a 1.0 stateless sessionbean. Is it necessary to do some extra programming or extra deployment measures? regards, Peterson