Table Operator In PL/SQL
Sir,
This is srinivas from India
Recently I started working with Objects in Pl/SQL
I am facing problem with table operator in pl/sql
my Query is
Select s.rollno,s.Name,column_value from student s,table(marks)
above query working fine in at SQL Prompt
but the same thing if I am trying to use at Cursors in PL/SQL it is giving error
please suggest me how to use Table operator in PL/SQL
student
srinivas
I suggest you post your problem to the Products->Database->SQL/PLSQL discussion Forum.
This Forum is meant for the Apple Macintosh OS.
Similar Messages
-
WCF-SQL table operation on tables with the same name.
Hello,
My situation involves generating table operation schemas (Insert, Update, Delete, Select) for tables in two different SQL databases. These tables happen to have the same name. For the sake of discussion lets call the tables dbo.Customer. However,
these tables have different fields in them. When generating the schemas to be used by BizTalk, they end up as the same message type like so:
Database1: http://schemas.microsoft.com/Sql/2008/05/TableOp/dbo/Customer#Update
Database2: http://schemas.microsoft.com/Sql/2008/05/TableOp/dbo/Customer#Update
To my understanding, I can't simply change the namespaces or root nodes to be unique since this structure is expected by the SQL Adapter (shown here: https://msdn.microsoft.com/en-us/library/dd788023.aspx). I had a couple thoughts on a solution:
Use schema versions to differentiate between the two different table schemas.
Use a unique namespace and root node for the schemas. Then, create a custom pipeline component to modify them to the standard as it is sent to SQL server.
Modify the schema so support both tables with all columns in both tables.
I don't really like any of these solutions, so I am hoping somebody in the community has run into this situation before and has something better.
-RichardYou don't really have to do anything other than make sure the particular message gets routed always to the correct database.
Having duplicate MessageType's is only a problem if you're relying on the automatic resolution of the XmlDisassembler and that would only be a concern on the Response side.
To get around that, just create a custom Pipeline with the XmlDisassembler and set the Document Schemas list to only the one for that Port. -
Table Operator Vs Materialized View Operator
Hi All,
Could you please give the differences between Table Operator and Materialized view Operator in Oracle Warehouse Builder 11g.
Regards,
SubbuBelow an extract of my notes of the Materialized view. The complete notes are here :
http://gerardnico.com/wiki/dw/aggregate_table
=====Notes=====
Materialized views are the equivalent of a summary table. (Materialized views can be also use as replica).
In a olap approach, each of the elements of a dimension could be summarized using a hierarchy.
The end user queries the tables and views in the database. The query rewrite mechanism in a database automatically rewrites the SQL query to use this summary tables.
This mechanism reduces response time for returning results from the query. Materialized views within the data warehouse are transparent to the end user or to the database application.
This is relatively straightforward and is answered in a single word - performance. By calculating the answers to the really hard questions up front (and once only), we will greatly reduce the load on the machine, We will experience:
* Less physical reads - There is less data to scan through.
* Less writes - We will not be sorting/aggregating as frequently.
* Decreased CPU consumption - We will not be calculating aggregates and functions on the data, as we will have already done that.
* Markedly faster response times - Our queries will return incredibly quickly when a summary is used, as opposed to the details. This will be a function of the amount of work we can avoid by using the materialized view, but many orders of magnitude is not out of the question.
Materialized views will increase your need for one resource - more permanently allocated disk. We need extra storage space to accommodate the materialized views, of course, but for the price of a little extra disk space, we can reap a lot of benefit.
Also notice that we may have created a materialized view, but when we ANALYZE, we are analyzing a table. A materialized view creates a real table, and this table may be indexed, analyzed, and so on.
Success
Nico -
Execution Errors while running a mapping having external table operator
when I am executing a mapping with external table operator, I am getting the following error:
ORA-29913: error in executing ODCIEXTTABLEOPEN callout ORA-29400: data cartridge error KUP-04040: file testdoc.txt in CONN_FLAT_FILE not found
Here CONN_FLAT_FILE is the connector.
The flat file location has been registered with the user name (as used for Windows login), password (as used for Windows Login) and host name as the name that is used for accessing my machine in the network. The path to the file name is given from the root folder like C:\.....
Please let me know things that I need to check.
RegardsIf you're using an external table check if you can see the data by querying that table. Possible errors: wrong directory or wrong file structure.
Regards,
Jörg -
How to upload sap r/3 table data to ms-sql 2000?
Dear Friends
any one can help me out step by step to upload sap r/3 table data to ms-sql 2000.
Thanks in advancehi
good
go through this link
http://www.itcserver.com/blog/2006/06/29/data-transfer-methods/
thanks
mrutyun^ -
Not able to change the name of the attribute of the Table operator.
We are trying to create OMB scripts to automate certain tasks. As a part of this, there is a requirement to change the attribute name of table operators (which by default gets the name of the column). It is possible to change the attribute name from the GUI. But I was not able to do the same using OMB Scripting. Here is the script I used.
OMBALTER MAPPING 'TEST' \
MODIFY ATTRIBUTE 'GEOGRAPHY_ID' OF GROUP 'INOUTGRP1' OF OPERATOR 'TEST' \
SET PROPERTIES(BUSINESS_NAME,PRECISION,DESCRIPTION) \
VALUES('MEMBER_ID',2,'MEMBER')
This script was to change the name of the attribute - GEOGRAPHY_ID of the table operator TEST.
From what I can make out from the Scripting reference, changing BUSINESS_NAME of the attribute should do the trick but it is not happening. The syntax looks correct as the precision of the column changes.
Am I missing something? Or is it a limitation or a bug?
I use OWB client 10.2.0.1.25 and OWB repository 10.2.0.1.0.Hi!
I'm using successfully
OMBALTER MAPPING '$mapName' MODIFY ATTRIBUTE '$attrName' OF GROUP '$groupName' OF OPERATOR '$joinName' RENAME TO '$newName'
Regards,
Carsten. -
HR SCHEMA FILES PRESENT BUT TABLES NOT SHOWN IN SQL DEVELOPER - PLS HELP
Dear DBA's,
I am studying towards the OCA and working through the SQL Fundamentals I Exam guide text book by John Watson and Roopesh Ramklass. I have a problem with accessing the HR Schema tables in SQL Developer. I can get connected to the HR schema but no information is available when i click on the + sign next to the "Tables (filtered)" link in SQL Developer under Human Resources - BTW (I've downloaded Oracle 11G)
Please help, I've tried the following already;
1. Downloaded the HR Schema sample scripts again
2. Resetting the Sample schema with this syntax in SQL PLUS - @?/demo/schema/mksample systempwd syspwd hrpwd oepwd pmpwd ixpwd shpwd bipwd default_tablespace temp_tablespace log_file_directory/
3. I have no Master script file so I cant recreate the sample scripts
I've been reading forums and trying to Google but I am too new at this and just can't get the HR schema to display all the information in SQL Developer. Please help as I really badly need to practice the exercises in the text book.
Any help to resolve this will be greatly appreciated.
Ali
Edited by: 942730 on Jun 26, 2012 1:15 AM942730 wrote:
Dear DBA's,
I am studying towards the OCA and working through the SQL Fundamentals I Exam guide text book by John Watson and Roopesh Ramklass. I have a problem with accessing the HR Schema tables in SQL Developer. I can get connected to the HR schema but no information is available when i click on the + sign next to the "Tables (filtered)" link in SQL Developer under Human Resources - BTW (I've downloaded Oracle 11G)
Please help, I've tried the following already;
1. Downloaded the HR Schema sample scripts again
2. Resetting the Sample schema with this syntax in SQL PLUS - @?/demo/schema/mksample systempwd syspwd hrpwd oepwd pmpwd ixpwd shpwd bipwd default_tablespace temp_tablespace log_file_directory/
3. I have no Master script file so I cant recreate the sample scripts
I've been reading forums and trying to Google but I am too new at this and just can't get the HR schema to display all the information in SQL Developer. Please help as I really badly need to practice the exercises in the text book.
Any help to resolve this will be greatly appreciated.
Alisqlplus
/ as sysdba
alter user HR identified by hr account unlock;
connect hr/hr
select table_name from user_tables;
exit -
Dynamic table name in native SQL
Hi,
How can i use dynamic table name in native SQL?
My req is to select data from a external database table , but the table name will be only poulated during runtime.
How can i acheive this?
Regards,
Arun.It should work OK - see demo below.
Jonathan
report zsdn_jc_adbc_test.
start-of-selection.
perform demo_lookup.
form demo_lookup.
data:
l_error_msg type string,
ls_t001 type t001, "Company
ls_t003 type t003. "Doc types
perform dynamic_lookup
using
'T001'
changing
ls_t001
l_error_msg.
write: / l_error_msg.
perform dynamic_lookup
using
'T003'
changing
ls_t003
l_error_msg.
write: / l_error_msg.
endform.
form dynamic_lookup
using
i_tabname type tabname
changing
os_data type any
o_error_msg type string.
* Use ADBC to select data
data:
l_mandt_ref type ref to data,
l_result_ref type ref to data,
l_mandt type symandt,
l_tabname type tabname,
l_sql_statement type string,
lo_cx_root type ref to cx_root,
lo_cx_sql type ref to cx_sql_exception,
lo_connection type ref to cl_sql_connection,
lo_statement type ref to cl_sql_statement,
lo_result_set type ref to cl_sql_result_set.
clear: os_data, o_error_msg.
get reference of l_mandt into l_mandt_ref.
get reference of os_data into l_result_ref.
l_mandt = '222'. "i.e. select from client 222
l_tabname = i_tabname.
try.
lo_connection = cl_sql_connection=>get_connection( ).
lo_statement = lo_connection->create_statement( ).
* Set criteria for select:
lo_statement->set_param( l_mandt_ref ).
concatenate
'select * from' l_tabname
'where mandt = ?'
into l_sql_statement separated by space.
* Execute
call method lo_statement->execute_query
exporting
statement = l_sql_statement
hold_cursor = space
receiving
result_set = lo_result_set.
* Get the data from the resultset.
lo_result_set->set_param_struct( l_result_ref ).
while lo_result_set->next( ) > 0.
write: / os_data.
endwhile.
* Tidy up:
lo_result_set->close( ).
lo_connection->close( ).
catch cx_sql_exception into lo_cx_sql.
o_error_msg = lo_cx_sql->get_text( ).
catch cx_root into lo_cx_root.
o_error_msg = lo_cx_root->get_text( ).
endtry.
endform. -
Does Create as table command works in sql server
Hi friends,
does Create as table command works in sql server,if yes pls help me with syntax> does Create as table command works in sql server,if
yes pls help me with syntax
Just out of interest, what is it supposed to do? There is no "CREATE AS TABLE" command in Oracle. -
DB Connect- Cant see tables and views in SQL DB
HI,
I successfully managed to connect a MS-SQL DB using DB connect. I am able to connect to the system (Check Connection). When i try to see the Views and Tables available in the SQL DB, it says there are no tables or views available. The SQL DB has granted permission for the SAP User to access certain views and tables. Still it is not showing any. Any help would be appreciated
Thank Youhi,
check things to be followed in oss note 512739
( pdf 'Transferring Data with DB Connect' https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/2f0fea94-0501-0010-829c-d6b5c2ae5e40 )
make sure ...
1. You have to create a special login for the extraction.
You should add this login to the db_ddladmin database role in the corresponding database. This generates a similar DB user at database level. The user you use must have the 'CREATE VIEW' authorization at least. This is contained in the mentioned role.
2. For the extraction, you should only use DB views that were created under this DB user. (See also type conversion, naming convention, and so on).
3. The selected user should be granted the required authorizations (SELECT at least) on the source tables, or on the columns of these tables.
4. The especially created login is to be used in the logon information when you are setting up the DB source system in BW.
hope this helps. -
SSMA for migrating table from oracle to Sql server
Hi All,
I wanted to replicate oracle huge table to sql server and i am using SSMA.its helpful and fast but can we replicate the table to different name using SSMA.for example i have a table TEST and i wanted to replicate it to SQL_TEST.Can it be possible
using SSMA.
Kindly help me outHi All,
I wanted to replicate oracle huge table to sql server and i am using SSMA.its helpful and fast but can we replicate the table to different name using SSMA.for example i have a table TEST and i wanted to replicate it to SQL_TEST.Can it be possible
using SSMA.
Kindly help me out
Hello,
Same question has already been asked by you in below thead. Why you created duplicate thread ? please avoid this practice or your thread will be marked ass Spam
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/abcdfb1b-c617-453f-828d-c8e4ec266c78/ssma-for-migrating-table-from-oracle-to-sql-server?forum=sqlintegrationservices
Moderators plz merge this thread.
Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers -
Expert - Generating SCD Type2 Mapping for a Table Operator - To Share
Hi All,
I have created an Expert which generates a SCD Type2 Mapping for a Table Operator being used as Dimension.
Let me know how I can share this expert. This forum has helped answer many questions and I would like to contribute.
Thanks,
Sam.Hi David,
I am trying to follow the steps as on that page. But I am stuck at step 5 - to upload the zip file. I cannot find the "Add an Attachment" link in the page toolbox.
The steps on that page are
1)Use the link in the "Page Toolbox" (right-hand column) to add a new page, with a title describing the expert or script.
2)In the keywords for the page, enter "OWB USER CONTRIBUTED EXPERT".
3)On that page, describe the expert or other script, the version of OWB it was developed for (including patch level), how to install and use it, and who to contact with any questions.
4)Package the Expert files in a Zip file.
5)Use the "Add an Attachment" link in the Page Toolbox to upload your Zip file as an attachment to the page for your expert. Alternatively, post a link to your own web site where the expert can be downloaded.
Thanks,
Sam. -
Create table dinamically using java sql types?
Hi! I've an application that reads an XML file. This file contains de definitions of some tables, using java sql types. For example:
<dbtable>
<dbtablename>Name of table</dbtablename>
<dbtablefield>
<name>Name of table field</name>
<type>java.sql.Types.VARCHAR</type>
<length>10</lenght>
<canNull>0</canNull>
<isPK>1</isPK>
</dbtablefield>
</dbtable>That's a little example of one table, with one field. Is a java.sql.Types.VARCHAR (or is equivalent in int), which has a size of 10, it cannot be null and is a primary key for the table.
Now, the lenght, null, and primary keys are not problem at all. What I want to know, is how do I create de table using the java.sql.Types. I mean, I don't want to hard code:
String s = "CREATE TABLE name (COLUMN VARCHAR(10)...";Instead, I want to use some "wild cards", as are used in PreparedStatement. The idea of this is that no matter what DB I'm using, I must always be capable of creating the tables not worrying for the DB. I mean, I must be able to create the table in Oracle, SQL Server, DB2, etc., using the same XML and the same java class.
Something like:
String s = "CREATE TABLE name (COLUMN ? (10)...";
someobject.setObject(1,java.sql.Types.VARCHAR);
someobject.execute(); //create tableIs this possible? Or do I have to make a map for each DB?
Thanks a lot for your help! Dukes available!you can provide some fields at runtime..
for example
"CREATE TABLE name (COLUMN" + arg[1] +"(10)..."
here arg is the string array passed into the main. -
SQL or PL/SQL : dynamically insert table name in a SQL Statement
Hi,
We have a strange requirement - we need to dynamically use the table names in a SQL Query. E.g:
select * from :table_name
The table_name will be chosen from a list. I have tried this in SQL as well as PL SQL - but, I have been unsuccessul so far.
Can you guys please help me solve this puzzle ?
I hope I have explained my quesion clearly - if not, please do let me know if some more details are necessary.
Regards,
RamkyThe following is the anonymous block that im using in a report in HTMLDB. My problem is Line Number 9. The bind variable contains the chosen table name at
the run time.
Variable "qry_stmt" contains the query to be returned, so that result set for that query will be displayed in the report.
If I hard code the table name(rather that passing it through bind variable) in the
qry_stmt string, Im getting the result sets for that query. But if I pass through
bind variable at run time, its still generating the string correctly( im printing
using a print statement at line number 14). But its returing the following report
error
report error:
ORA-01403: no data found
Please advice/help me in this.....
declare
qry_stmt varchar2(1000);
p_table varchar2(30) := 'EMP';
P_ENAME varchar2(1000);
begin
IF :p2_TABLE_NAMES IS NOT NULL THEN
qry_stmt := 'select * from '||TRIM(:P2_TABLE_NAMES); -- Line Num 9
execute immediate qry_stmt; --into P_ENAME;
ELSE
qry_stmt := 'SELECT 1 FROM dual ';
END IF;
htp.p(qry_stmt);--Line Num 14
return qry_stmt;
EXCEPTION WHEN NO_DATA_FOUND THEN
NULL;
end;
Thanks and Regards,
Ramky -
Hi Friends,
How to deal with table operations?
I want three tables having data but only one header:-
h1|h1|h3
rows1:-
v1|v2|v3
rows2:-
v4|v5|v6
rows3:-
v7|v8|v9
It canbe done in two ways:-
1. having 4 tables , for first one have column headers only
second:- have table with text field "rows1" wchich will come above, and dont include header and footer
in same way other two tables also
another way:-
in the table 1 --headers
in table two:- data to be there,plus when heading comes inside table as subheading, merge cells of a table row.
Please advise how to achieve ithi,
Following url will help you out to create the table dynamically
http://help.sap.com/saphelp_nw04/
helpdata/en/95/93fe1e71a2e44691b1f041e67f71aa/content.htm
Sample code:
IWDTransparentContainer container = (IWDTransparentContainer)
view.getElement(IWDTransparentContainer.class, "RootUIElementContainer");
IWDTextView editor = (IWDTextView)
view.createElement(IWDTextView.class, "monthNameColumnEditor");
editor.bindText("MonthOfYear.MonthName");
IWDTableColumn column = (IWDTableColumn)
view.createElement(IWDTableColumn.class, "monthNameColumn");
column.setTableCellEditor(editor);
IWDTable table = (IWDTable)
view.createElement(IWDTable.class, "MyTable");
table.bindDataSource("MonthsOfYear");
table.addColumn(column);
container.addChild(table);
Maybe you are looking for
-
Can't find printer on airport or in 'add' under system preferences
Hi I just purchased an imac and also the printer recommended to me by apple that they included in my package. I've gotten the printer to work just fine if I have it plugged into the usb, however the printer IS connected to my wireless network and yet
-
Hello, I have a 2007 iMac 21" Aluminum running 10.6.8 with 4GB RAM. Two years ago I had a 2TB Western Digital drive installed, which ran fine until about two weeks ago. The performance of my iMac went down hill fast. At first I didn't suspect the dri
-
Vendor Evaluation Configuration
Configuring the vendor evaluation there is no any subcriteria under "delivery" for early delivery that can be evaluated, I know we can create subcriteria, however I do not know how the new subcriteria will be evaluated if there is no any "scoring met
-
Hi please i try to add my iPhone 4 here https://supportprofile.apple.com/PramsAddRegisterProduct.do i can't do this is show to me According to our records, this serial number is registered to another Apple ID. If you have more than one Apple ID, log
-
All programs crashing after re-installing OS X
Hi all, I've recently made the jump over to Mac form Windows and invested in a new 17' Macbook Pro. Sadly today someone decided to play a little trick on me and convinced me to run the Sudo FM command in Terminal and I lost my OS. After re-installing