Getting a Mapping Diagram from SQL Query
Hi,
I have 2 schemas: SOURCE and TARGET.
A previous developer had written an SQL Query to transform and load data from 3 tables from SOURCE schema into 1 table in the TARGET schema. It is working fine by use of the grants and synonyms that I have created.
My query is: Now I would like to convert this SQL query or transformation into a diagram. The diagram would show the columns of the source tables and the transformations which are then loaded into the target table.
Kindly advice which tool or software I can use for this? Or, should I go with the manual approach?
Regards,
Suddhasatwa
Hi
Can you advice which options I should select in TOAD or SQL Developer?
I have done bit of research from my end, but am not able to find any suitable option.
Many Thanks,
Suddhasatwa Bhaumik.
Similar Messages
-
Get Comma separated result from SQL Query
Hey Everyone
I have a requirement where i need to get comma separated result of names because there is one to many relationship i.e for every protocol there are mutiple people associated to it , and i created PL/SQL function for that and everything was fine and when it is in production multiple number of cursors were opened because of the logic and leading to RAC fail over and for that we were manually clearing the cursors every weekend and i am looking to create a Materialized view for this logic but i was unable to code the logic using Connect by clause
Result is like and i want comma separated names for every protocol
P06065 TESTER13 TESTER13
P02095 PATRICIA CARMELITANO
P02095 ANNE MUIR
P02095 ROBERT HARLOW
P02095 JANICE ALBERT
P02095 Jacqueline van Dalen
P02095 GUENTER HENNIG DR.
P05209 Olga Xenaki
P05553 Birgit Limbach-Angele
P05553 Anja Schulz Dr.
P05553 CHRISTA HAGENBUCHER
here is the function which i wrote, i need to get the same logic through SQL Statement .. thanks for your help
cursor c_GSCR is
select T565804.FST_NAME||' '||T565804.LAST_NAME
from
S_PT_POS_HST_LS T544105 /* S_PT_POS_HST_LS_Protocol_Team */ ,
S_CONTACT T565804 /* S_CONTACT_Protocol_Team */,
S_CL_PTCL_LS T541903 /* S_CL_PTCL_LS_Protocol */
where ( T541903.ROW_ID = T544105.CL_PTCL_ID and
T544105.POSTN_ID = T565804.PR_HELD_POSTN_ID and
T544105.ROLE_CD = 'Lead Project Manager' AND
T541903.ROW_ID = v_PTCL_ID and
T541903.PAR_PTCL_ID is null and T544105.END_DT is null );
BEGIN
l_row_num := 0;
l_role := '';
l_role_list := '';
v_PTCL_ID := PTCL_ID;
OPEN C_GSCR;
if C_GSCR%isopen THEN
LOOP
FETCH C_GSCR INTO l_role;
exit when C_GSCR%notfound;
IF l_role_list IS NULL THEN
l_role_list:=l_role;
ELSE
l_role_list:=l_role_list||', '||l_role;
END IF;
END LOOP;
CLOSE C_GSCR;
end if;
~SrixHi,
Srix wrote:
Thanks for the Info .. My database in 10g R 2 i started using COLLECT Function
select T541903.PTCL_NUM ,
CAST(COLLECT(T565804.FST_NAME||' '||T565804.LAST_NAME) AS varchar2_ntt) , 7) AS LPM_NAME
from
S_PT_POS_HST_LS T544105 /* S_PT_POS_HST_LS_Protocol_Team */ ,
S_CONTACT T565804 /* S_CONTACT_Protocol_Team */,
S_CL_PTCL_LS T541903 /* S_CL_PTCL_LS_Protocol */
where T541903.ROW_ID = T544105.CL_PTCL_ID and
T544105.POSTN_ID = T565804.PR_HELD_POSTN_ID and
T544105.ROLE_CD = 'Lead Project Manager' AND
T541903.PAR_PTCL_ID is null and T544105.END_DT is null
GROUP BY T541903.PTCL_NUM
The result i like ...Do you mean "The result *is* like ..."?
Or do you mean "The result I [would] like [is] ..."?
The code above has unblanaced parentheses. If you are getting anything other than an error message, then I don't believe you are really running what you posted.
Whenever you have a problem, post a complete test script that people can use to recreate the problem and test their ideas.
Please do that. Post CREATE TABLE and INSERT statements to crate the sample data, the code you used to create the carachr2_ntt type and the function, and your best attempt at a query (formatted). Simplify as much as possible. For example, do you really need 3 tables to illustrate the problem? For purposes of asking a question on this forum, can't you pretend you have just one table, with 2 columns?
I suspect the problem has to do with the user-defined type and function, which you didn't post. I can't even see how you called the function in your query. Without the information I mentioned above, there's not much I can do to help you. -
Need tool/utility to get list of tables from sql query
Hi,
I often have to analyze huge queries without having access to database. Is there any tool where I can submit the a sql query and it gives me list of tables used in the query. I also need similar thing for documentation.
Let me know if anybody uses anything like this.
Thanks.
liquidloop[at]live[dot]co[dot]ukYou can find the size of each table, and thus list the tables in the process.
SET NOCOUNT ON
DBCC UPDATEUSAGE(0)
-- DB size.
EXEC sp_spaceused
-- Table row counts and sizes.
CREATE TABLE #t
[name] NVARCHAR(128),
[rows] CHAR(11),
reserved VARCHAR(18),
data VARCHAR(18),
index_size VARCHAR(18),
unused VARCHAR(18)
INSERT #t EXEC sp_msForEachTable 'EXEC sp_spaceused ''?'''
SELECT *
FROM #t
-- # of rows.
SELECT SUM(CAST([rows] AS int)) AS [rows]
FROM #t
SELECT
t.NAME AS TableName,
p.rows AS RowCounts,
SUM(a.total_pages) * 8 AS TotalSpaceKB,
SUM(a.used_pages) * 8 AS UsedSpaceKB,
(SUM(a.total_pages) - SUM(a.used_pages)) * 8 AS UnusedSpaceKB
FROM
sys.tables t
INNER JOIN
sys.indexes i ON t.OBJECT_ID = i.object_id
INNER JOIN
sys.partitions p ON i.object_id = p.OBJECT_ID AND i.index_id = p.index_id
INNER JOIN
sys.allocation_units a ON p.partition_id = a.container_id
WHERE
t.NAME NOT LIKE 'dt%'
AND t.is_ms_shipped = 0
AND i.OBJECT_ID > 255
GROUP BY
t.Name, p.Rows
ORDER BY
t.Name
--- SQL2005
select o.name
, reservedpages = sum(a.total_pages)
, usedpages = sum(a.used_pages)
, pages = sum(case when a.type <> 1 then a.used_pages
when p.index_id < 2 then a.data_pages else 0 end)
, SUM(a.used_pages)*8096 AS 'Size(B)'
, rows = sum(case when (p.index_id < 2) and (a.type = 1) then p.rows else 0 end)
from sys.objects o
join sys.partitions p on p.object_id = o.object_id
join sys.allocation_units a on p.partition_id = a.container_id
where o.type = 'U'
group by o.name
order by 3 desc --biggest tables first
Knowledge is the only thing that I can give you, and still retain, and we are both better off for it. -
Getting file node name from SQL query
Hello everyone,
I have a concurrent request that requires the file node name as input. For example, when I login to oracle on our test instance , I use http://moon1.oando-plc.com:8000. For this concurrent program, the file node name is shown as moon1.oando-plc.com.
I need to use this argument in a PL/SQL procedure I am writing and I don't want to use any hardcoding.
Is there any way to get this data from an SQL statement.
ThanksHi,
You can get it from ICX_PARAMETERS table (HOME_URL column). Orsearch the profile options values for "http" to get the login page URL (and/or server name) -- See (Note: 201945.1 - How to list E-Business Suite Profile Option values for all levels using SQLPlus).
Regards,
Hussein -
How to get the desire output from sql query
Consider an Order Table: ...
Order Table:
Order Id Item Qty
O1 A1 5
O2 A2 1
O3 A3 3
Please provide SQL which will explode the above data into single unit level records as shown below
Desired Output:
Order Id Order Id Qty
O1 A1 1
O1 A1 1
O1 A1 1
O1 A1 1
O1 A1 1
O2 A2 1
O3 A3 1
O3 A3 1
O3 A3 1How do I ask a question on the forums?
SQL and PL/SQL FAQ -
Getting zero-sized reply error when running report from SQL query
Hi,
I have a Report from SQL Query in Portal. When I select Excel in Output Format and then run the report, it works properly, but when I select HTML in Output Format, the report works if the rows returned are not so many (I've been able to display the report for up to 701 rows), but when I try selecting a value from the LOV that selects many rows, I get the following error:
ERROR
The requested URL could not be retrieved
While trying to retrieve the URL: <data suppressed>
The following error was encountered:
Zero Sized Reply
Squid did not receive any data for this request.
Any ideas on how to fix this? Why does the number of rows returned affect the report this way?
Thanks,
LorenaProblem comes when any of the filter is applied in any one of the cases selected from the GUI.Do you mean that the problems only shows when you run the report in your browser via 9iAS?
Which version are you using?
Can you post the before report trigger? -
Getting Zero Sized Reply error in report from SQL query
Hi,
I have a Report from SQL Query in Portal 3.0.9. When I select Excel in Output Format and then run the report, it works properly, but when I select HTML in Output Format, the report works if the rows returned are not so many (I've been able to display the report for up to 701 rows), but when I try selecting a value from the LOV that selects many rows, I get the following error:
ERROR
The requested URL could not be retrieved
While trying to retrieve the URL: <data suppressed>
The following error was encountered:
Zero Sized Reply
Squid did not receive any data for this request.
Any ideas on how to fix this? Why does the number of rows returned affect the report this way?
Thanks,
LorenaHi,
I have a Report from SQL Query in Portal 3.0.9. When I select Excel in Output Format and then run the report, it works properly, but when I select HTML in Output Format, the report works if the rows returned are not so many (I've been able to display the report for up to 701 rows), but when I try selecting a value from the LOV that selects many rows, I get the following error:
ERROR
The requested URL could not be retrieved
While trying to retrieve the URL: <data suppressed>
The following error was encountered:
Zero Sized Reply
Squid did not receive any data for this request.
Any ideas on how to fix this? Why does the number of rows returned affect the report this way?
Thanks,
Lorena -
Query based Report (Reports From SQL Query)
Hi All,
I am facing a problem with a report. I need your help.
I am creating a Report From SQL Query (Portal) with some arguments passed at runtime. I am able to view the output, if the query returns few rows ( arount 1000 rows). But for some inputs it needs to generate >15000 records, at this point the page is getting time out (i think!) and showing error page. I am able to execute query from the SQL Plus console ot using TOAD editor. Here the query is not taking more that 2 mins time to show the result.
If i am executing from Portal i observed that, once i give the appropriate input and hit submit button a new oracle process is getting created for the query on UNIX (I am usign "TOP" command to check processes). The browser page will be shown error page after 5 minutes (i am assuming session time out!) , but on the backend the process will be executed for more than 30 mins.
Can i increase a timeout of portal page, how i can do this?
The data returned as a result of the query is sized more than 10 MB. Is caching this much data is possible by the browser page? is the returned data is creating any problem here.
Please help me to find appropriate reasone for the failure?Can you post the URL that is giving you the page not found error ? I am not sure if I can be of much help though.
In order to increase your chances to get a reply you should also post your question in the Portal Forum - Oracle Application Server Portal
Edited by: Rodolfo Ferrari on Jun 16, 2009 3:49 PM -
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"); -
Width of field in Report From SQL Query
I have created a report from SQL query with 15 columns being selected. However, no matter what column width and column type (pixel, char, percent) I enter in the column formatting tab of the report, I cannot get the report to format the column to the width I desire. It is always a fixed width. Does anyone have any suggestions?
Thanks,
MartinHi,
Char (used for ASCII format)
Displays the output in the specified number of
characters per line. For example, if you enter 20
in Width, the report displays 20 characters of the
column data in each line. If the number of
characters per line exceeds the specified
number, the remaining characters are wrapped
to the next line.
Pixel
Displays the output in the specified number of
pixels per row. For example, if you enter 10 in
Width, the column data displays 10 pixels of
data per line of the displayed table.
Percent
Displays the output in the specified percentage
of the table. For example, if you enter 25 in
Width, the column data displays in 25% of the
displayed table.
Thanks,
Sharmila -
Need help in Report From SQL Query
Hi All,
I am facing a problem with a report. I need your help.
I am creating a Report From SQL Query (Portal) with some arguments passed at runtime. I am able to view the output, if the query returns few rows ( arount 1000 rows). But for some inputs it needs to generate >15000 records, at this point the page is getting time out (i think!) and showing error page. I am able to execute query from the SQL Plus console ot using TOAD editor. Here the query is not taking more that 2 mins time to show the result.
If i am executing from Portal i observed that, once i give the appropriate input and hit submit button a new oracle process is getting created for the query on UNIX (I am usign "TOP" command to check processes). The browser page will be shown error page after 5 minutes (i am assuming session time out!) , but on the backend the process will be executed for more than 30 mins.
I tried also increase the page time out in httpd.conf, but no use.
The data returned as a result of the query is sized more than 10 MB. Is caching this much data is possible by the browser page? is the returned data is creating any problem here.
Please help me to find appropriate reasone for the failure?user602513 wrote:
Hi All,
I am facing a problem with a report. I need your help.
I am creating a Report From SQL Query (Portal) with some arguments passed at runtime. I am able to view the output, if the query returns few rows ( arount 1000 rows). But for some inputs it needs to generate >15000 records, at this point the page is getting time out (i think!) and showing error page. I am able to execute query from the SQL Plus console ot using TOAD editor. Here the query is not taking more that 2 mins time to show the result.
If i am executing from Portal i observed that, once i give the appropriate input and hit submit button a new oracle process is getting created for the query on UNIX (I am usign "TOP" command to check processes). The browser page will be shown error page after 5 minutes (i am assuming session time out!) , but on the backend the process will be executed for more than 30 mins.
I tried also increase the page time out in httpd.conf, but no use.
The data returned as a result of the query is sized more than 10 MB. Is caching this much data is possible by the browser page? is the returned data is creating any problem here.
Please help me to find appropriate reasone for the failure?Do you get any errors or warnings or it is just the slow speed which is the issue?
There could be a variety of reasons for the delayed processing of this report. That includes parameter settings for that page, cache settings, network configurations, etc.
- explore best optimization for your query;
- evaluate portal for best performance configuration; you may follow this note (Doc ID: *438794.1* ) for ideas;
- third: for that particular page carrying that report, you can use caching wisely. browser cache is neither decent for large files, nor practical. instead, explore the page cache settings that portal provides.
- also look for various log files (application.log and apache logs) if you are getting any warnings reflecting on some kind of processing halt.
- and last but not the least: if you happen to bring up a portal report with more than 10000 rows for display then think about the usage of the report. Evaluate whether that report is good/useful for anything?
HTH
AMN -
Calling the function from SQL query
Hi,
I am trying to run the below statement,
Select to_number(apps.pay_balance_pkg.get_value( 326, :paa.assignment_action_id,to_date ('31032011','ddmmyyyy'))) from dual;
getting an error as :
ORA-14552 cannot perform a DDL, commit or rollback inside a query or DML
ORA - 06512 at apps.pay_balance_pkg , line 4526.
How can I execute this funciton "apps.pay_balance_pkg.get_value" from sql query?
Thanks in advance.user1175432 wrote:
Hi,
I am trying to run the below statement,
Select to_number(apps.pay_balance_pkg.get_value( 326, :paa.assignment_action_id,to_date ('31032011','ddmmyyyy'))) from dual;
getting an error as :
ORA-14552 cannot perform a DDL, commit or rollback inside a query or DML
ORA - 06512 at apps.pay_balance_pkg , line 4526.
How can I execute this funciton "apps.pay_balance_pkg.get_value" from sql query?
Thanks in advance.If the function is performing DDL, commit or rollback inside it then you will not be able to call it from an SQL statement.
Either change the function so it doesn't perform DDL, commit or rollback, or use a different means to obtain the information you want (assuming you can't change the function) -
Adding update and delete buttons to a Report from SQL Query
There is an option when creating a QBE to add update and delete
links which i find quite useful, but this option doesn't seem to
be possible on a Report from SQL Query. Do i need to do
something special to add them? is the option located in a
different place?Hi,
You can only add Update ,Delete in QBE Reports,
there is no option in Portal which can be used to
have these buttons in the Reports from Query Wizard or
Report from SQL Query.
Thanks
Vineet -
Can Portal Report from SQL Query use where column IN (:bind_variable)
I would like to create a portal report from sql query with IN (:bind_variable) in the where clause. The idea is that the user would enter comma-separated or comma-quote-separated values for the bind_variable. I have tried this several ways but nothing seems to work. Can this be done?
TrentonHi,
Which version of portal are you using. This is a bug. It has been fixed in 30984.
Thanks,
Sharmila -
Report from SQL Query -Excel format only show the first page
Hi,
I have some Reports from SQL Query. In the display options, I choose Excel as default format. The Excel documents only show the first page. If I choose HTML as default format, it shows every rows.
Please advise on how to have a complete Excel document as HTML format does.
Thanks a lot.
Lina HanI beleive when you export Oracle reports to Excel it is the Data that is transferred along with Column Names.
You cannot export the variables defined on the report.
Hence you will not be able to export the Footer to excel. (Still looking into it will let you know if i find anything interesting)
Regards,
Bhushan Salgar
Maybe you are looking for
-
How do you join a jabber chat room with a password?
In the latest released version of Messages is it possible to join a Jabber/XMPP chat room that requires a password? - Jim
-
HP Laserjet P4015n thinks its a P4515n
Hi there, I Have an HP P4015 which paper jams only when doing large print jobs (100 pages plus) It has been doing this ever since it had a firmware upgrage done on it which for some reason made it think it is a P4515 instead of the slower P4015. This
-
How to minimize the file size of a file with drawing markups
Scenario: I need to turn a sample of a report into a report template, so I am deleting as many objects as I can with the Tools>Content>Edit Object. For text that I cannot delete that way, I am covering it up with a white box (Comment>Drawing Markups
-
How do i look over my students results in a quiz?
this may sound confusing but im looking to be able to see what answers students put into the quiz section of thier captivate courses, as most of them are short answers, so it would be easier to give them feedback on what they had written if i myself
-
Hi all, I'm trying to change the network name of my computer that windows pcs use to connect. Currently, to connect to my computer, I have to type "\\new-host.linksys\" in explorer to connect to my macbook. I've found where to change the "workgroup"