Access to the side table customer RSO
I pushed a table in a serverside RSO and now I need to update the values in the RSO client side... I tried the following, but it does not work... I am using actionscript 3.0
so11. SetProperty("conTrol[1]","test");
so11.setDirty ("conTrol");
The first argument in setProperty must be a string, so you can't do it this way. Try to access data of re and do your update here:
var arr:Array = so11.data ['conTrol ""];
arr [1] = 'test ';
so11. SetProperty ("conTrol", arr);
so11.setDirty ("conTrol");
Tags: Adobe Media Server
Similar Questions
-
level of access to the lookup table
I use Dreamweaver CS4. It seems that access levels can if apply (at least through server behaviors) to a field in the same table that host users and their associated passwords. I adopted a database that contains a table that contains the users and their passwords and access levels are stored in a lookup table. Outside hand coding this or the change in the structure of the table to include levels of access, users and passwords in the same table, can anyone provide an overview on how to handle this?> I do not understand the recordset has to do with the newspaper to the user.
Yes, I have just answered the same time-I got deceived to have first to create the Recordset. Your version of MySQL does support the views?
-
access to the external table of object type
It is a continuation of ORA-06564: XXX_DAT_DIR object does not exist I'm hoping a different subject line will attract different people who may be able to help me solve the situation
The bottom line is that I can't access my external table of in my object.
Assume that the user is XYZZY. We run a simple nice don't shop here - no roles, just different schemas.
When I connect to sqlplus to run Access simple external table that works, I connect as XYZZY. ( it works )
When I connect my type code compile, I connect as XYZZY. ( so far, so good )
When I connect to run the stored procedure that uses the object type, I connect as XYZZY. ( does not work. get ORA-06564: there is no error object XXX_DAT_DIR )
As mentioned above, I've recently logged and re-run all grants to the user XYZZY.
When I ran the small test which included the role set to none (after replaying all grants), I logged as user XYZZY, and even though this user has grants, the test has failed. ( , it was a test based on an idea that the problem was that the subsidies have been an role, not the user. Apparently not the problem ).
Moira
Published by: user7532421 on July 20, 2010 13:25Hello
I tried the same scenario and it works fine for me (not at all an exception and the data is loaded into the target at the end table).
I created all the objects (directory, types of objects, outdoor table heaps under the same user):Here's what I did:
-- Under system GRANT CREATE ANY DIRECTORY TO hr / --under HR: CREATE OR REPLACE DIRECTORY XXX_DAT_DIR AS 'H:\Temp'; / CREATE TABLE X_TABLE_XO ( L1 VARCHAR2(3 BYTE), C1 VARCHAR2(3 BYTE), C2 VARCHAR2(3 BYTE) ) ORGANIZATION EXTERNAL ( TYPE ORACLE_LOADER DEFAULT DIRECTORY XXX_DAT_DIR ACCESS PARAMETERS ( RECORDS DELIMITED BY NEWLINE NOBADFILE NODISCARDFILE NOLOGFILE SKIP 0 FIELDS TERMINATED BY ';' MISSING FIELD VALUES ARE NULL REJECT ROWS WITH ALL NULL FIELDS ( L1 Char, C1 Char, C2 Char ) ) LOCATION (XXX_DAT_DIR:'test_ext_Table.txt') ) REJECT LIMIT UNLIMITED NOPARALLEL NOMONITORING; /
Here is an excerpt of my file:
L1;v1;v2 L2;v3;v4 L3;v5;v5 L4;v6;v6
then:
CREATE TABLE my_table AS SELECT * FROM x_table_xo WHERE ROWNUM<=0 / select column_name,data_type,data_length from user_tab_columns where table_name='MY_TABLE' COLUMN_NAME,DATA_TYPE,DATA_LENGTH L1,VARCHAR2,3 C1,VARCHAR2,3 C2,VARCHAR2,3
then (still in HR)
CREATE OR REPLACE TYPE subloader UNDER dataloader ( CONSTRUCTOR FUNCTION subloader ( SELF IN OUT NOCOPY subloader, record_date DATE ) RETURN SELF AS RESULT, OVERRIDING MEMBER FUNCTION load_data RETURN NUMBER ) ; / CREATE OR REPLACE TYPE BODY subloader AS CONSTRUCTOR FUNCTION subloader ( SELF IN OUT NOCOPY subloader, record_date DATE ) RETURN SELF AS RESULT IS BEGIN -- SELF.name := name; -- SELF.area := 0; RETURN; END; OVERRIDING MEMBER FUNCTION load_data RETURN NUMBER IS n NUMBER; BEGIN INSERT INTO my_table (SELECT * FROM x_table_xo); n := SQL%ROWCOUNT; COMMIT; RETURN n; END; END; /
(no error). then
set serveroutput on size 5000; DECLARE sl subloader; n number; BEGIN sl:= subloader(sysdate); n:=sl.load_data; dbms_output.put_line('n:'||n); END; /
-It works...
select * from my_table / L1,C1,C2 L1,v1,v2 L2,v3,v4 L3,v5,v5 L4,v6,v6
What is curious, it's that all directories are owned by SYS, even if you create with HR! (select * from all_directories)->, I tried both (System and HR, but the table is owned by HR) not-> no problem. in both situations.
-
Allows access to the different tables
Hello
I got my job as a drillthrough report using essbase studio 11.1.1.3. But the context and the relational table I drill is the same fact table, I load in Essbase.
I wonder if it is possible to implement an extraction to another table of facts or detail table? For example, I did table for all GL which becomes my cube of IncomeStatement. But I want to be able to drill into the detail of the log table, then the user will be able to view all for some GL journal entries. What is a possible solution for this?
Thank you
Published by: Alain on March 29, 2011 12:42The majority of the work is performed on the relational Server (running the query). There is a bit of work on the Studio Server to format and send the request and accept the results and some of the APS to transfer tha data.
-
Do not have access to the BugDB - table 'rpthead_history' and 'bug_user '.
Hello
I prepare a report analysing where same query works in SQL Developer, but it does not work on APEX. Database link has been granted previously to the workspace and the following diagram:
APEX workspace: OIEDEV
APEX scheme: OIEDEV
Error States:
========
ORA-00942: table or view does not exist
Question:
======
Is this schema of database link was created has no access to these tables - "rpthead_history" and "bug_user". So in this case, what to do?
SQL query:
=======
Select r.programmer "assignee."
r.RPTNO "Bug number"
r.Status "Bug Status",
r.cs_priority "priority."
r.upd_by ' latest update of "of rpthead@bugdb r, rpthead_history@bugdb u h,bug_user@bugdb
where product_id = 397 and
r.rptd_by <>'ARU' and
r.cs_priority < 3 and
r.programmer = u.bug_username and
r.UPD_DATE > sysdate-7 and
r.Status > 30 and
r.Status not in (11,10,30,40,51) and
h.old_status in (11,30,40,10,51) and h.new_status > 30 and
h.new_status not in (33,40,51) and h.upd_date > sysdate-7 and r.rptno = h.rptno and not exists (select null from rpthead_history h1 where h1.rptno = h.rptno and h1.upd_date > h.upd_date and h1.new_status in (11,40,51)) order by 1
Thank you
RiouHello
I think that this public forum is not place question about internal Oracle tools?
Kind regards
Jari-----
http://dbswh.webhop.NET/dbswh/f?p=blog:Home:0 -
How to deal with the side stanging source?
How can I avoid using the staging on the side of the source? Most of the time, a Production environment could be considered as a source for ODI and it is risky to allow write access to the temporary tables/views created in the stage space.
A-> B
in topology, I defined:
Source: diagram A1 / A2 in scene
target: diagram B1 / B2 scene
Can I make reference in an interface the staging area of the target (B2) rather than source (A2) when I need to transfer data from A to B?
Thank you!My bad, I forgot the LKM DBLINK also creates an object in the area of transit on the source.
You have 2 options:
-use a different LKM as SQL for Oracle that does not use DBLINK.
-Add the privilege to create on the staging area from source to your source database user.Thank you
Julien -
Remove the entry from the ARP table
I need to create a program to remove an entry in the ARP table in Windows 7 with LabVIEW and TestStand. The test that I develop contacts ESA via Ethernet. Each HAD has the same IP address at the beginning but different MAC addresses. I note that there may be long delays in test is running when you try to connect and remove the previous entry in the ARP table seems to help. But now I have to do it manually through the command line. The command 'arp d' requires elevated privileges. I had a hard time getting LabVIEW to raise the system exec. Does anyone have an ideas? Is there a .NET access to the ARP table?
Thank you
Paul
I'll try to look into ARP sync settings setting in Windows.
We have suffered from various problems of connection-performance TCP a few years ago and our solution was to change the default number of TCP sockets and delays (we knew port exhaustion). The tweeks eliminated most of our problems, no changes to code LV/TS not required.
I tried to find info on ARP parameters for Windows 7, but it seems that there is much less info available that ther is for XP.
Key words of the most common registry for older versions of Windows have been 'ArpCacheLife' and 'ArpCacheMinReferencedLife.
EDIT:
These parameters were apparently kidnapped in Vista. I found this on the site of $ M; they can apply to later versions, as well as M$ is a request for change to the management of the ARP...
-
create user with access to only 5 tables
Hello
8.1.7
Win 2003 Server
I created a user and granted ir create session privilege. I have given access to this user for only 5 tables. When I check more later, the other tables also receive access. How can I avoid this problem and provide access to the selected tables. I guess that these other tables were given access by the public. How to remove this user
Best regardsValy says:
Hello8.1.7
Win 2003 ServerI created a user and granted ir create session privilege. I have given access to this user for only 5 tables. When I check more later, the other tables also receive access. How can I avoid this problem and provide access to the selected tables. I guess that these other tables were given access by the public. How to remove this user
Best regards
If you actually gave grants to the public then always this user can access this table. This is why you must revoke these privileges to the public, but first consider this: this can problem your application?
-
Original title: problem with Internet connection sharing
my laptop running on Windows Vista Home Premium SP2 (this one has access to the internet by using the dial-up modem and will to act as a sharer of internet connection or as a host) and the client computer runs on Windows 7 Starter
in a first step, I try internet connection sharing, I've set up an ad hoc network and I just changed my setting modem dial-up on the sharing tab, of course what I change, it of 'Allow an other network users to connect through this computer internet connection' and choose the on Home Networking connection wireless network connection , then my mobile client to connect to a special that I created and portable client connected to the internet via ICSthen the problem came when I restart my laptop. When I tried to use ICS once again, my customer laptop really takes a long time to connect, he continues saying 'identification' side host and client. and after that "identify" is complete, it says ad - hoc connection, I create has "no network".so, I'm a person answer in this forum' Obtain an IP address automatically is the wrong setting on the Ethernet connection. " To return to the sharing tab and unshare the wireless connection. Close all windows network, and then open them and re - share the wireless connection. Who must configure IPv4 for the Ethernet connection properties for:IP address: 192.168.0.1
Subnet mask: 255.255.255.0
Default gateway: no
"DNS server: none.I put this on my laptop of the host, and and I put the IP address on my laptop customer in 192.168.0.2 with the same default gateway as my portable computer host IPand made some progress in this case, when I try to connect host and the client is no longer to 'identify' phase, immediately connected laptop both but my mobile client can not connect to the internet and displays "No Internet access" on the ad hoc network, I have createI tried a lot of things but always completed my mobile client can not connect to the internet and displays the message "no Internet access.
What makes me confuse is first, I try to share the internet connection everything works like a charm, I set up an ad hoc network, and then change the setting on my modem dial-up so he can share the internet connection, and voila, computer laptop client connected to the internet. I change even not all IP settingsBut why after I restart my PC, this problem comes...someone knows how to help me with this problem?Hey, Mimbs,
You can try the similar thread to the next with a possible solution:
Also for reference:
-
How to restrict access to the particular presentation table in a given area?
My current configuration in the presentation layer is:
Business generic sale-> field
-Sales-> presentation Table measures
-TotalSalesofGoods ->field
-The costs of the measures -> presentation Table
-CostOfGoods ->field
-Customer Dimensions -> presentation Table
-Items-> field
I have two built roles, 'ShouldSeeGenericSalesSubjectArea' and 'ShouldSeeCostFields '.
- Permissions
- "Domain generic sales."
- User authenticated-> no access
- ShouldSeeGenericSalesSubjectArea-> read
- ShouldSeeCostFields-> default
- "Measures of sales."
- User authenticated-read >
- ShouldSeeGenericSalesSubjectArea-> default
- ShouldSeeCostFields-> default
- "Measures of costs".
- User authenticated-> no access
- ShouldSeeGenericSalesSubjectArea-> default
- ShouldSeeCostFields-> read
- "Dimensions of the client".
- User authenticated-read >
- ShouldSeeGenericSalesSubjectArea-> default
- ShouldSeeCostFields-> default
- All fields have permissions to:
- User authenticated-read >
- ShouldSeeGenericSalesSubjectArea-> default
- ShouldSeeCostFields-> default
- "Domain generic sales."
Given two users:
- UserA
- The user has following roles:
- ShouldSeeGenericSalesSubjectArea
- ShouldSeeCostFields
- The user can see everything except the table of fees
- The user has following roles:
- UserB
- The user has following roles:
- ShouldSeeGenericSalesSubjectArea
- The user can see everything except the table of fees
- The user has following roles:
- My ultimate goal is:
- "ShouldSeeGenericSalesSubjectArea" allows access to see the "generic sales subject area", but does not measure cost
- "ShouldSeeCostFields' allows you to see the presentation layer of"measures of cost. "
- Example:
- UserA from above should see everything (including the "cost measures").
- UserB above should see everything, except 'measures of cost. "
I tried several different combinations of levels of authorization without result. From my understanding, Oracle security works by taking the path of any restriction. I do something wrong with my permissions on the presentation layer of "measures of cost? Please let me know if there is anything I can clarify or if you need more information.
I was able to make it work by giving access to role of cost at the level of the subject area. Then each material is no access on the cost, but access if had the other role.
- Permissions
-
Oracle 11G - access to the table problem
Hello
New on Oracle IAM... After you create a database, I created a connection and SYSDBA role...
And then I create a table called Table1. And then I create a new USER and I Connect with the same SID of the database, but the role has the DEFAULT value for this new USER...
01. but the problem is that I can't find the Table1 table for this new user... so how acess as Table1...?
02. I came to know in Oracle, also we can design forms for the frontend and can generate EXE... Is this true?
03. in SQL Server - Sql Port with static IP - we have access to the database for remote users... Is it possible for Oracle?
Thanks for the directions...997497 wrote:
Hello
New on Oracle IAM... After you create a database, I created a connection and SYSDBA role...What the user did you use to connect? I'm guessing that you logged in as SYS
And then I create a table called Table1. And then I create a new USER and I Connect with the same SID of the database, but the role has the DEFAULT value for this new USER...
So I guess that you have created the table in the SYS schema. You should never, ever create user objects in the SYS schema. If you have created the table in the SYS schema, you really need to drop and create in a more appropriate scheme.
You indicate that you come from SQL Server, so there may be a question of terminology. Which refers to SQL Server as a "database" is roughly equivalent to what Oracle designates as a "scheme." An Oracle database contains many schemas. A schema is the set of objects owned by a particular user.
01. but the problem is that I can't find the Table1 table for this new user... so how acess as Table1...?
As I said above, you really, really should not create objects in the SYS schema. If you really want, however, you need to log the SYS schema and grant access on the table to your new user
GRANT SELECT ON sys.table1 TO your_new_user
You will then need to fully qualify the table name in your SELECT (or create a synonym or the current_schema)
SELECT * FROM sys.table1
02. I came to know in Oracle, also we can design forms for the frontend and can generate EXE... Is this true?
Older versions of Oracle Forms would create server executables. The modern versions are used to create three-tier applications. You can also use APEX to build web applications. Of course, you can also generate executables by writing code in another language (often .net).
03. in SQL Server - Sql Port with static IP - we have access to the database for remote users... Is it possible for Oracle?
Is this possible? Sure. Depending on what means "remote users", however, it may be poorly advised - you would never open a database to the internet directly, for example, you want to ensure that the remote users are connected to your network (via a virtual private network).
Justin
-
By the numbers, how do the list tables on the side?
By the numbers, how do the list tables on the side? It used to be on the side, now it is on the top which is a huge pain.
This changed in the transition from Numbers2.x too 3.x.
Unless you explicitly removed numbers 2.x, it is always installed and usable on your computer. You can locate it in the folder "/ Applications/iWork ' 09.
You should be aware, that numbers 2.x cannot open files saved numbers 3.x - you can export files from Numers3.x back to Numbers2.x by using the item of menu numbers 3.x "file > export to > number ' 09»
-
Can't access iscsi with ' error in the evaluation table display iscsilist IndexSizeError:
I have been using my readyNAS years and today, after having extended a target (in volume), I can't access the Volumes-> iSCSI tab anymore.
SOS!
I really need.
The error I get in FF:
"Error in the evaluation table display iscsilist IndexSizeError: Index or size is negative or greater than the quantity allowed.
It's a bit different in Chrome, but it won't let me copy it.
Error in the evaluation table display iscsilist IndexSizeError: cannot set property 'maxLength' on "HTMLInputElement": the provided value is (-1) is negative.
Any suggestions please?
Thank you!
It was super useful:
I downloaded the update of intermediate as a file and updated firmware to update.
And now I can access the iscsi again tab.
MDGM, thanks a lot!
I'm a happier person now!
-
could not access vb run time for custom action script
I try to install an air 320u sierra wireless card and I get an error message "could not access vb run time for custom action script. Cannot install the Manager of mobile broadband services. Any ideas?Hello
I suggest you run the fixit and see if it helps:
http://support.Microsoft.com/mats/Program_Install_and_Uninstall
Also check out this link:
It will be useful.
-
Single SQL query for the analysis of the date of customs declaration under the table of Stock codes
Dear all,
Please tell us a single SQL query for the below,
We have a Table of Stock as shown below,
STOCK_TABLE
ITEM_CODE
(item code)
BAT_NO
(lot no.)
TXN_CODE
(transaction code)
DOC_NO
(number)
BOE_DT
(date of the customs declaration)
I1
B1
I1
I2
I3
B70
I4
B80
I5
B90
T102
1234
JULY 2, 2015
I6
B100
We have to find the date of customs declaration (i.e. the date when the items have come under this particular table) for items that are not attached to any document (that is, who have TXN_CODE, DOC_NO and BOE_DT fields with a NULL value).
For each item in the table of actions, which is not attached to any document, the customs declaration date is calculated as follows.
- If (code section, lot number) combination is present under HISTORY_TABLE, the date of customs declaration will receive the UPDT_DT, the transaction code (TXN_CODE) is an IN or transactions (which can be analyzed from the TRANSACTIONS table).
- If (code section, lot number) combination is NOT currently at the HISTORY_TABLE (or) the transaction code respective to item - batch number combination code is an operation then customs declaration date will be the date of the document (DOC_DT) that we receive from one of the 3 tables IN_TABLE_HEAD that contains the element of that particular lot.
- If the case 1 and case 2 fails, our customs declaration date will be the last date of document (DOC_DT) that we receive from one of the 3 tables IN_TABLE_HEAD containing that particular item and the BAT_NO in expected results will be that corresponding to this document, as appropriate, to another NULL.
- If the case 1 or case 2 is successful, the value of the last field (in the output expected, shown further below) BATCH_YN will be 'Y', because it fits the lot. Otherwise it will be 'n'.
HISTORY_TABLE
ITEM_CODE | BAT_NO |
TXN_CODE
DOC_NO
UPDT_DT
I1
B1
T1
1234
JANUARY 3, 2015
I1
B20
T20
4567
MARCH 3, 2015
I1
B30
T30
7890
FEBRUARY 5, 2015
I2
B40
T20
1234
JANUARY 1, 2015
TRANSACTION
TXN_CODE | TXN_TYPE |
T1 | IN |
T20 |
OFF
T30
ALL THE
T50
IN
T80
IN
T90
IN
T60
ALL THE
T70
ALL THE
T40
ALL THE
IN_TABLE_HEAD_1
H1_SYS_ID (primary key) | TXN_CODE | DOC_NO |
DOC_DATE
H1ID1
T1
1234
JANUARY 1, 2015
H1ID2
T70
1234
FEBRUARY 1, 2015
IN_TABLE_ITEM_1
I1_SYS_ID |
H1_SYS_ID
(foreign key referencing H1_SYS_ID in IN_TABLE_HEAD_1)
ITEM_CODE
I1ID1
H1ID1
I1
I1ID2
H1ID1
I100
I1ID3
H1ID2
I3
IN_TABLE_BATCH_1
B1_SYS_ID | TXN_CODE DOC_NO (now in IN_TABLE_HEAD_1) | BAT_NO |
B1ID1
T1
1234
B1 / can be empty
B1ID2
T70
1234
B70
IN_TABLE_HEAD_2
H2_SYS_ID (primary key) | TXN_CODE |
DOC_NO
DOC_DATE
H2ID1
T30
4567
FEBRUARY 3, 2015
H2ID2
T60
1234
JANUARY 3, 2015
IN_TABLE_ITEM_2
I2_SYS_ID | H2_SYS_ID (foreign key referencing H2_SYS_ID in IN_TABLE_HEAD_2) | ITEM_CODE |
I2ID1 | H2ID1 |
I1
I2ID2
H2ID1
I200
I2ID3
H2ID2
I2
IN_TABLE_BATCH_2
B2_SYS_ID |
I2_SYS_ID
(foreign key referencing I2_SYS_ID in IN_TABLE_ITEM_2)
BAT_NO
B2ID1
I2ID1
B30 / null
B2ID2
I2ID2
B90
B2ID2
I2ID3
B60
IN_TABLE_HEAD_3
H3_SYS_ID (primary key) | TXN_CODE | DOC_NO | DOC_DATE |
H3ID1 |
T50
1234
JANUARY 2, 2015
H3ID2
T80
1234
JANUARY 3, 2015
H3ID3
T90
1234
JANUARY 4, 2015
H3ID4
T40
1234
AUGUST 5, 2015
IN_TABLE_ITEM_3
I3_SYS_ID |
H3_SYS_ID
(foreign key referencing H3_SYS_ID in IN_TABLE_HEAD_3)
ITEM_CODE
BAT_NO
I3ID1
H31D1
I2
B50
I3ID2
H3ID2
I4
B40
I3ID3
H3ID3
I4
I3ID4
H3ID4
I6
There is no IN_TABLE_BATCH_3
Please find below the expected results.
OUTPUT
ITEM_CODE | BAT_NO | TXN_CODE | DOC_NO |
BOE_DT
BATCH_YN
I1
B1
T1
1234
JANUARY 3, 2015
THERE
I1
B30
T30
7890
FEBRUARY 5, 2015
N
I2
B60
T60
1234
JANUARY 3, 2015
N
I3
B70
T70
1234
FEBRUARY 1, 2015
THERE
I4
T90
1234
JANUARY 4, 2015
N
I6
T40
1234
AUGUST 5, 2015
N
Controls database to create the tables above and insert the records.
CREATE TABLE stock_table()item_code VARCHAR2()80),bat_no VARCHAR2()80),txn_code VARCHAR2()80),
doc_no VARCHAR2 (80), boe_dt DATE );
INSERT EN stock_table
VALUES ('I1', 'B1', '', '', '');
INSERT EN stock_table
VALUES ('I1', '', '', '', '');
INSERT IN stock_table
VALUES ('I2', '', '', '', '');
INSERT EN stock_table
VALUES ('I3', 'B70', '', '', '');
INSERT EN stock_table
VALUES ('I4', 'B80', '', '', '');
INSERT EN stock_table
VALUES ('I5', 'B90', 'T102', '1234', '02-JUL-2015');
INSERT EN stock_table
VALUES ('I6', 'B100', '', '', '');
SELECT *
FROM stock_table
CREATE TABLE history_table()item_code VARCHAR2()80),bat_no VARCHAR2()80),txn_code VARCHAR2()80),
doc_no VARCHAR2 (80), updt_dt DATE );
INSERT IN history_table
VALUES ('I1', 'B1', 'T1', '1234', '03-JAN-2015');
INSERT IN history_table
VALUES ('I1', 'B20', 'T20', '4567', '03-MAR-2015');
INSERT IN history_table
VALUES ('I1', 'B30', 'T30', '7890', '05-FEB-2015');
INSERT IN history_table
VALUES ('I2', 'B40', 'T20', '1234', '01-JAN-2015');
SELECT *
FROM history_table
CREATE TABLE transaction1()txn_code VARCHAR()80),txn_type VARCHAR()80));
INSERT INTO transaction1
VALUES ('T1', 'IN');
INSERT INTO transaction1
VALUES ('T20', 'OUT');
INSERT INTO transaction1
VALUES ('T30', 'ALL');
INSERT INTO transaction1
VALUES ('T40', 'ALL');
INSERT INTO transaction1
VALUES ('T50', 'IN');
INSERT INTO transaction1
VALUES ('T60', 'ALL');
INSERT INTO transaction1
VALUES ('T70', 'ALL');
INSERT INTO transaction1
VALUES ('T80', 'IN');
INSERT INTO transaction1
VALUES ('T90', 'IN');
SELECT *
FROM transaction1
CREATE TABLE in_table_head_1()h1_sys_id VARCHAR2()80) PRIMARY KEY,txn_code VARCHAR2()80),
doc_no VARCHAR2 (80), doc_dt DATE );
CREATE TABLE in_table_head_2()h2_sys_id VARCHAR2()80) PRIMARY KEY,txn_code VARCHAR2()80),
doc_no VARCHAR2 (80), doc_dt DATE );
CREATE TABLE in_table_head_3()h3_sys_id VARCHAR2()80) PRIMARY KEY,txn_code VARCHAR2()80),
doc_no VARCHAR2 (80), doc_dt DATE );
INSERT IN in_table_head_1
VALUES ('H1ID1', 'T1', '1234', '01-JAN-2015');
INSERT IN in_table_head_1
VALUES ('H1ID2', 'T70', '1234', '01-FEB-2015');
INSERT IN in_table_head_2
VALUES ('H2ID1', 'T30', '4567', '03-FEB-2015');
INSERT IN in_table_head_2
VALUES ('H2ID2', 'T60', '1234', '03-JAN-2015');
INSERT IN in_table_head_3
VALUES ('H3ID1', 'T50', '1234', '02-JAN-2015');
INSERT IN in_table_head_3
VALUES ('H3ID2', 'T80', '1234', '03-JAN-2015');
INSERT IN in_table_head_3
VALUES ('H3ID3', 'T90', '1234', '05-JAN-2015');
INSERT IN in_table_head_3
VALUES ('H3ID4', 'T40', '1234', '05-AUG-2015');
CREATE TABLE in_table_item_1()i1_sys_id VARCHAR2()80) PRIMARY KEY,
h1_sys_id VARCHAR2 (80) REFERENCES in_table_head_1()h1_sys_id),item_code VARCHAR2()80));
CREATE TABLE in_table_item_2()i2_sys_id VARCHAR2()80) PRIMARY KEY,
h2_sys_id VARCHAR2 (80) REFERENCES in_table_head_2()h2_sys_id),item_code VARCHAR2()80));
CREATE TABLE in_table_item_3(i3_sys_id VARCHAR2(80) PRIMARY KEY,
h3_sys_id VARCHAR2 (80) REFERENCES in_table_head_3()h3_sys_id),item_code VARCHAR2()80),
bat_no VARCHAR2 (80));
INSERT IN in_table_item_1
VALUES ('I1ID1', 'H1ID1', 'I1');
INSERT IN in_table_item_1
VALUES ('I1ID2', 'H1ID1', 'I100');
INSERT IN in_table_item_1
VALUES ('I1ID3', 'H1ID2', 'I3');
INSERT IN in_table_item_2
VALUES ('I2ID1', 'H2ID1', 'I1');
INSERT IN in_table_item_2
VALUES ('I2ID2', 'H2ID1', 'I200');
INSERT IN in_table_item_2
VALUES ('I2ID3', 'H2ID2', 'I2');
INSERT IN in_table_item_3
VALUES ('I3ID1', 'H3ID1', 'I2','B50');
INSERT IN in_table_item_3
VALUES ('I3ID2', 'H3ID2', 'I4','B40');
INSERT IN in_table_item_3
VALUES ('I3ID3', 'H3ID3', 'I4','');
INSERT IN in_table_item_3
VALUES ('I3ID4', 'H3ID4', 'I6','');
SELECT *
FROM in_table_item_1
SELECT *
FROM in_table_item_2
SELECT *
FROM in_table_item_3
CREATE TABLE in_table_batch_1()b1_sys_id VARCHAR2()80) PRIMARY KEY,
txn_code VARCHAR2 (80), doc_no VARCHAR2 (80), bat_no VARCHAR2 (80));
CREATE TABLE in_table_batch_2()b2_sys_id VARCHAR2()80) PRIMARY KEY,
i2_sys_id VARCHAR2 (80) REFERENCES in_table_item_2()i2_sys_id),bat_no VARCHAR2()80));
INSERT IN in_table_batch_1
VALUES ('B1ID1', 'T1', '1234', 'B1');
INSERT IN in_table_batch_1
VALUES ('B1ID2', 'T70', '1234', 'B70');
INSERT IN in_table_batch_2
VALUES ('B2ID1', 'I2ID1', 'B30');
INSERT IN in_table_batch_2
VALUES ('B2ID2', 'I2ID2', 'B90');
INSERT IN in_table_batch_2
VALUES ('B2ID3', 'I2ID3', 'B60');
Please advise a solution for the same.
Thank you and best regards,
Séverine Suresh
very forced (question subfactoring used to allow easy testing/verification - could work with these test data only)
with
case_1 as
(select s.item_code,
s.bat_no,
h.txn_code,
h.doc_no,
h.updt_dt boe_dt,
cases where s.bat_no = h.bat_no then 'Y' else ' n end batch_yn.
cases where h.txn_code is not null
and h.doc_no is not null
and h.updt_dt is not null
then 'case 1' '.
end refers_to
from (select item_code, bat_no, txn_code, doc_no, boe_dt
of w_stock_table
where bat_no is null
or txn_code is null
or doc_no is null
or boe_dt is null
) s
left outer join
w_history_table h
On s.item_code = h.item_code
and s.bat_no = h.bat_no
and exists (select null
of w_transaction1
where txn_code = nvl (s.txn_code, h.txn_code)
and txn_type in ('IN', 'ALL')
)
),
case_2 as
(select s.item_code,
NVL (s.bat_no, h.bat_no) bat_no.
NVL (s.txn_code, h.txn_code) txn_code.
NVL (s.doc_no, h.doc_no) doc_no.
NVL (s.boe_dt, h.updt_dt) updt_dt.
cases where s.bat_no = h.bat_no then 'Y' else ' n end batch_yn.
cases where h.txn_code is not null
and h.doc_no is not null
and h.updt_dt is not null
then 'case 2'.
end refers_to
from (select item_code, bat_no, txn_code, doc_no, boe_dt
of case_1
where refers_to is null
) s
left outer join
w_history_table h
On s.item_code = h.item_code
and exists (select null
of w_transaction1
where txn_code = nvl (s.txn_code, h.txn_code)
and txn_type in ('IN', 'ALL')
)
and not exists (select null
of case_1
where item_code = h.item_code
and bat_no = h.bat_no
and txn_code = h.txn_code
and doc_no = h.doc_no
and updt_dt = h.updt_dt
)
),
case_31 as
(select s1.item_code,
NVL (S1.bat_no, W1.bat_no) bat_no.
NVL (S1.txn_code, W1.txn_code) txn_code.
NVL (S1.doc_no, W1.doc_no) doc_no.
NVL (S1.updt_dt, W1.doc_dt) updt_dt.
cases where s1.bat_no = w1.bat_no then 'Y' else ' n end batch_yn.
cases where w1.txn_code is not null
and w1.doc_no is not null
and w1.doc_dt is not null
then "case 31'.
end refers_to
from (select item_code, bat_no, txn_code, doc_no, updt_dt, batch_yn, refers_to
of case_2
where refers_to is null
) s1
left outer join
(select i1.item_code, h1.txn_code, h1.doc_no, h1.doc_dt, b1.bat_no
of w_in_table_item_1 i1
inner join
w_in_table_head_1 h1
On i1.h1_sys_id = h1.h1_sys_id
inner join
w_in_table_batch_1 b1
On h1.txn_code = b1.txn_code
and h1.doc_no = b1.doc_no
) w1
On s1.item_code = w1.item_code
),
case_32 as
(select s2.item_code,
NVL (S2.bat_no, W2.bat_no) bat_no.
NVL (S2.txn_code, W2.txn_code) txn_code.
NVL (S2.doc_no, W2.doc_no) doc_no.
NVL (S2.updt_dt, W2.doc_dt) updt_dt.
cases where s2.bat_no = w2.bat_no then 'Y' else ' n end batch_yn.
cases where w2.txn_code is not null
and w2.doc_no is not null
and w2.doc_dt is not null
then "case 32'.
end refers_to
from (select item_code, bat_no, txn_code, doc_no, updt_dt, batch_yn, refers_to
of case_2
where refers_to is null
) s2
left outer join
(select i2.item_code, h2.txn_code, h2.doc_no, h2.doc_dt, b2.bat_no
of w_in_table_item_2 i2
inner join
w_in_table_head_2 h2
On i2.h2_sys_id = h2.h2_sys_id
inner join
w_in_table_batch_2 b2
On i2.i2_sys_id = b2.i2_sys_id
) w2
On s2.item_code = w2.item_code
),
case_33 as
(select s3.item_code,
w3.bat_no,
NVL (S3.txn_code, w3.txn_code) txn_code.
NVL (S3.doc_no, w3.doc_no) doc_no.
NVL (S3.updt_dt, w3.doc_dt) updt_dt.
cases where s3.bat_no = w3.bat_no then 'Y' else ' n end batch_yn.
cases where w3.txn_code is not null
and w3.doc_no is not null
and w3.doc_dt is not null
then "case 33'.
end refers_to
from (select item_code, bat_no, txn_code, doc_no, updt_dt, batch_yn, refers_to
of case_2
where refers_to is null
) s3
left outer join
(select i3.item_code, h3.txn_code, h3.doc_no, h3.doc_dt, i3.bat_no
of w_in_table_item_3 i3
inner join
w_in_table_head_3 h3
On i3.h3_sys_id = h3.h3_sys_id
) w3
On s3.item_code = w3.item_code
)
Select item_code, bat_no, txn_code, doc_no, boe_dt, batch_yn
of case_1
where refers_to is not null
Union of all the
Select item_code, bat_no, txn_code, doc_no, updt_dt, batch_yn
of case_2
where refers_to is not null
Union of all the
Select item_code, bat_no, txn_code, doc_no, updt_dt, batch_yn
from (select item_code, bat_no, txn_code, doc_no, updt_dt, batch_yn,
ROW_NUMBER() over (partition by item_code of updt_dt desc order) rn
from (select item_code, bat_no, txn_code, doc_no, updt_dt, batch_yn
of case_31
where refers_to is not null
Union of all the
Select item_code, bat_no, txn_code, doc_no, updt_dt, batch_yn
of case_32
where refers_to is not null
Union of all the
Select item_code, bat_no, txn_code, doc_no, updt_dt, batch_yn
of case_33
where refers_to is not null
)
)
where rn = 1
ITEM_CODE | BAT_NO | TXN_CODE | DOC_NO | BOE_DT | BATCH_YN |
---|---|---|---|---|---|
I1 | B1 | T1 | 1234 | JANUARY 3, 2015 | THERE |
I1 | B30 | T30 | 7890 | FEBRUARY 5, 2015 | N |
I2 | B60 | T60 | 1234 | JANUARY 3, 2015 | N |
I3 | B70 | T70 | 1234 | FEBRUARY 1, 2015 | THERE |
I4 | - | T90 | 1234 | JANUARY 5, 2015 | N |
I6 | - | T40 | 1234 | AUGUST 5, 2015 | N |
Concerning
Etbin
Maybe you are looking for
-
I use a chassis with a NI 9401 DIO module 9178 cDAQ. I'm trying to convert the output of a rotary incremental encoder ASM (in radians) to rpm. Sensing head (PMIS4-20-50-240kHz-TTL24V-Z0-2M-S) Snap ring (PMIR7N-20-50-M-20) The encoder outputs 2500 pu
-
El sistema no nada, reproduce or even los sonidos predeterminados windows (esto pasa desde hace 3 dias)
-
Windows crashes me e-mailing my friends digital photo files. How can I get around this?
-
try to uninstall programs, "Journal of instalation not found".
I would be very gratful if someone could help me... once again please! Yesterday, after the acquisition of the programe of thugs 'CYBERSECURITY' I came here asking if someone could help me to get rid of it, thanks to those who responded, unbelivably,
-
Compact Xperia Z5, should I feed him some MARSHMALLOW?
Hello! It's been so long since my Xperia P had stolen and my Xperia S had hard bricked By this month, I have my savings to buy my favorite again Xperia phones Since I use the iPhone and currently one abandoned Nokia Lumia 520 Be the subject I visit m