Table for the code for method of payment for the suppliers site
Hi all, does anyone knows how to get the value for the code for method of payment for the suppliers site in R12.1.3? I don't speak from that in the following path: 1 Paybles responsibility 2. Suppliers 3. Request for a 4 suppliers. Click on details of payment 5. Scroll to supplier Sites and press the update button 6. Note that, for example among the payment methods is checked as default thanks in advance, A.Stoynaov
Hello
Please check this note that contains the query:
Default values for method of payment for providers at the level of the Table (Doc ID 737128.1)
You can use this query to view the lines for a given provider site:
SELECT *.
Of iby_ext_party_pmt_mthds IEPPM
WHERE IEPPM.ext_pmt_party_id IN
(SELECT IEP.ext_payee_id
Of iby_external_payees_all IEP
WHERE IEP.supplier_site_id IN
(SELECT APSS.vendor_site_id
Of ap_supplier_sites_all of the PSA, ap_suppliers APS
WHERE APS.vendor_id = APSS.vendor_id
AND APS.vendor_name = '
AND APSS.vendor_site_code = '
Concerning Joel Purswani Support of Oracle
Tags: Oracle Applications
Similar Questions
-
Hello
in OSTEOARTHRITIS 11.5.10, Iprocurment, does anyone know how to set up the supplier site we want punchout?
Thank you.Salvation;
Please check iProcurment to the Site provider, Oracle Exchange, Punchout optional user details are not passed [266854.1 ID] and see its useful
Respect of
HELIOS -
API to update the registration number in the VAT for provider/Supplier site
Hello
Is there a public API available to update the number of VAT registration for provider or on the website of the provider? I tried the API below with the provider and it did not work.
DECLARE
p_api_version NUMBER;
p_init_msg_list VARCHAR2 (200);
p_commit VARCHAR2 (200);
p_validation_level NUMBER;
x_return_status VARCHAR2 (200);
x_msg_count NUMBER;
x_msg_data VARCHAR2 (200);
lr_vendor_rec apps.ap_vendor_pub_pkg.r_vendor_rec_type;
lr_existing_vendor_rec ap_suppliers % ROWTYPE;
l_msg VARCHAR2 (200);
p_vendor_id NUMBER;
BEGIN
-Initialize session apps
-fnd_global.apps_initialize (1234, 50833, 200);
-mo_global.init ('SQLAP');
-fnd_client_info.set_org_context (101);
-Assign values of base
p_api_version: = 1.0;
p_init_msg_list: = fnd_api.g_true;
p_commit: = fnd_api.g_true;
p_validation_level: = fnd_api.g_valid_level_full;
p_vendor_id: = 588011;
-seller details
-Disable the seller
lr_vendor_rec.vendor_id: = 588011;
lr_vendor_rec.tax_reference: = '123XXX222 ';
lr_vendor_rec.vat_registration_num: = '123XXX222 ';
-lr_vendor_rec.end_date_active: = SYSDATE;
-lr_vendor_rec.enabled_flag: = 'n';
ap_vendor_pub_pkg.update_vendor (p_api_version = > p_api_version,)
p_init_msg_list = > p_init_msg_list,
p_commit = > p_commit,
p_validation_level = > p_validation_level,
x_return_status = > x_return_status,
x_msg_count = > x_msg_count,
x_msg_data = > x_msg_data,
p_vendor_rec = > lr_vendor_rec,
p_vendor_id = > p_vendor_id);
commit;
Dbms_output.put_line ('X_RETURN_STATUS =' | x_return_status);
Dbms_output.put_line ('X_MSG_COUNT =' | x_msg_count);
Dbms_output.put_line ('X_MSG_DATA =' | x_msg_data);
IF (x_return_status <>fnd_api.g_ret_sts_success) THEN
BECAUSE me in 1... fnd_msg_pub.count_msg LOOP
l_msg: = fnd_msg_pub.get (p_msg_index = > i,)
p_encoded = > fnd_api.g_false);
Dbms_output.put_line ('the API call failed with error' | l_msg);
END LOOP;
ON THE OTHER
Dbms_output.put_line ('the API call ended with SUCESSS status');
END IF;
END;
Could you please let me know if there I no API to update the same?
Kind regards
BS.
Who did not even after initialization of applications.
Could you please suggest is there anything else I need to do? or is there an other API to update the VAT number of the supplier?
Kind regards
BS.
-
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'.
-
I would like to change my method of payment for a U.S. debit card. s. I recently moved to the s. u. and I don't have access to my account Bank Czech more. What should I do? I'm on a renewed EU program of students and teachers (1 year).
Since you have moved, you should discuss this situation with support staff.
The country of your payment address, the country on your Adobe account and the store you purchase of should all match.
Please see this link for more information:
FAQ: How can I change the country associated with my Adobe ID?
-
Scan of the columns in table for empty cells
I have prepared a form that will do the following (Please bear with me for the description):
The form opens with a table of 10 rows. The user must enter sides (from 0 to 10) in one of the columns in the table. Once the user enters all the ratings of ten, he or she must then click a button to turn on the rest of the form (which is hidden). What I'm trying to do is, after the button is clicked, scan the table to ensure that the entire column was filled with a number. If the column was made, then a second page. If a cell in the column was left in white, then I want a prompt to appear and indicate to the user which cell is empty. I was able to run by using the following code:
This code is under the event 'click '.
If (decisionMatrix.dMTable.Row4.rating.rawValue is nothing)
{
Poster a warning prompt that indicates the form is incompletexfa.host.messageBox ("incomplete form. Please fill in the background. ","warning ", 3);
}
on the other
{
Allow the user to save the current state of the form and activate the second part of the form.
app.execMenuItem ("SaveAs");
}The problem with the above method is that it checks only the Row4 cell. I have to add more code for the other 9 rows in the table and for each message box, indicating to the user which field to fill. Is there a better way to do it? A switch-case perhaps statement?
I have also considered the column full analysis at a time and just using a message box general for the table, using the following code:
If (decisionMatrix.dMTable.Row [*].rating.rawValue is nothing)
{
Poster a warning prompt that indicates the form is incompletexfa.host.messageBox ("incomplete form. Please fill all of the scoring. ","warning ", 3);
}...
But it doesn't seem to work. Any help is appreciated. Thank you.
The seal contains a table with 10 rows and 3 columns (a_, b_ and c_). The calls button 'Continue' by clicking on the click event, which runs through the table looking for NULL values in each column per row. The "ratingMissing" flag controls the visibility of the page 2.
Form1.Page1.Subform1.continueBtn::click - (JavaScript, client)
var ratingMissing = false;
for (var i = 0; i)< 10;="" i++)="">
var line = i + 1;
If (xfa.resolveNode("form1.page1.subform1.table.row["_+_i_+_"].a_").rawValue == null) {}
xfa.host.messageBox ("A is missing in row"+ row);
ratingMissing = true;
}
If (xfa.resolveNode("form1.page1.subform1.table.row["_+_i_+_"].b_").rawValue == null) {}
xfa.host.messageBox ("B is not in the line" + row);
ratingMissing = true;
}
If (xfa.resolveNode("form1.page1.subform1.table.row["_+_i_+_"].c_").rawValue == null) {}
xfa.host.messageBox ("C is missing in the row" + row);
ratingMissing = true;
}
}
If (ratingMissing == false) {}
Form1.Page2.presence = "visible";
}
else {}
Form1.Page2.presence = 'hidden ';
}
Steve
-
Try adding conditions to clause "and" stored in the table for the where clause, unknown syntax
I am trying to add additional segments to the 'where' clause, and I don't know exactly how to proceed. I am currently using another table to search for keywords and sometimes there aren't everything. I use this table containing the key words to search the description and associate a symbol with a path.
The code loops through the keywords with the keywords most associated and try to find links to a symbol then excludes those and search for symbols that correspond to those with less keywords and all. I am able to do this with 6 queries and manually changing the arguments, but I want to loop together so that if the changes need to be made in the future, I won't need to go digging in the code.
Thanks, but that's ok. I already have a solution for this.
-
Looking for table of the physical limits on ESXi 4.1
Hello
I searched for some kind of table showing the difference between the editions ESXi 4.1. But I always got the data from version 5 instead of 4!
I am particularly interested to know the limit of memory for each virtual on ESXi 4.1 computer free and paid editions. Well, my vSphere client tells me that my free license gives me 256 GB limit on the host hardware. That's more than enough. But what about memory for each virtual machine? What limit?
If someone is able to find this table, I appreciate it.
TIA
Ah, gotcha.
Fortunately, vRAM payments do not exist in vSphere 4 in all. This goofiness is new in vSphere 5.
-
Check the box 2 tables for difference
Hello
I need help, I am trying to loop through the two tables that contain clips video and compareing the differences
Here is my code so far:
var SavedJobArray:Array = new Array();
var NewJobArray:Array = new Array();
function FillSavedArray (): void
{
var Temp: MovieClip = new BlackMC();
Temp.JobNumber = 11;
SavedJobArray.push (Temp);
var Temp2:MovieClip = new BlackMC();
Temp2.JobNumber = 22;
SavedJobArray.push (Temp2);
var Temp3:MovieClip = new BlackMC();
Temp3.JobNumber = 33;
SavedJobArray.push (Temp3);
}
function FillNewArray (): void
{
var Temp: MovieClip = new BlackMC();
Temp.JobNumber = 111;
NewJobArray.push (Temp);
var Temp2:MovieClip = new BlackMC();
Temp2.JobNumber = 22;
NewJobArray.push (Temp2);
var Temp3:MovieClip = new BlackMC();
Temp3.JobNumber = 33;
NewJobArray.push (Temp3);
var Temp4:MovieClip = new BlackMC();
Temp4.JobNumber = 444;
NewJobArray.push (Temp4);
}
var SameJobCount:int = 0;
function checkJobArray (): void
{
trace ("saved job Array:" + SavedJobArray.length);
trace ("new Job Array:" + NewJobArray.length);
var TempSaved:MovieClip;
for (var i: int = SavedJobArray.length - 1; i > = 0; i--)
{
TempSaved = SavedJobArray [i];
var TempNew:MovieClip;
for (var j: int = NewJobArray.length - 1; j > = 0; j-)
{
TempNew = NewJobArray [j];
If (TempSaved.JobNumber is TempNew.JobNumber)
{
SameJobCount ++;
trace ("match:" + TempSaved.JobNumber + "&" + TempNew.JobNumber);
If the match is found, remove them from these two tables
SavedJobArray.splice (SavedJobArray [i], 1);
NewJobArray.splice (NewJobArray [j], 1);
}
}
}
traceNewJobs();
}
function traceNewJobs (): void
{
var TempNew:MovieClip;
for (var j: int = NewJobArray.length - 1; j > = 0; j-)
{
TempNew = NewJobArray [j];
trace ("NEW JOB:" + TempNew.JobNumber);
}
}
FillSavedArray();
FillNewArray();
checkJobArray();
I want to be able to do, is makes a loop on both tables and see if the "number of jobs does not equal"... compare the savedjobarray with the newjobarray and see if the new work contains a number of jobs that the registered job board does not.
I tried something different and those that correspond to I spread the tables... but it's not really working.
I hope that this fact,
Thank you in advance for your help!
OK, so all that matters is the number of jobs and the elements may appear anywhere in any list. You want just the unique number of jobs in any list. For this I would be to iterate through the tables of the number of jobs in the two temp tables. After I would go longer temporary table, eliminating any number of jobs (from two temp tables) that match. What you end up with is potentially two paintings not corresponding employment that you can combine into a single list.
Sounds more complicated than it is.
function checkJobArray (): Array
{
expansion (outer loop)
var tempArr1:Array;
var arrayOrder:int = 1; 1 = saved is temp1, 2 = New temp1
If (SavedJobArray.length > NewJobArray.length)
{
tempArr1 = SavedJobArray
}
on the other
{
tempArr1 = NewJobArray;
Since the New is tempArr1, adjust arrayOrder
which is later used to return results
arrayOrder = 2;
}
smallest (inner loop)
var tempArr2:Array = SavedJobArray.length< newjobarray.length="">
iterate over a greater Bay
for (var i: int = 0; i< temparr1.length;="">
{
check if the job matches the smallest matrix (iteration)
for (var j: int = 0; j< temparr2.length;="">
{
football game?
If (tempArr1 [i]. JobNumber is tempArr2 [j]. JobNumber)
{
Yes, remove both
tempArr1.splice (i, 1);
tempArr2.splice (d, 1);
We have reduced the table on this index,
must reduce the index continue
i-- ;
j-- ;
increase matching jobs
SameJobCount ++;
}
}
}
all that's left are jobs that do not match.
you want a single list? Concat together:
return tempArr2.length > 0? tempArr1.concat (tempArr2): tempArr1;
you want to separate lists? return of the separate tables [SavedJobs, NewJobs]
the use of arrayOrder from above to determine the appropriate order.
return arrayOrder == 1? [tempArr1, tempArr2]: [tempArr2, tempArr1];
}
Test:
differences in var: Array = checkJobArray();
trace (differences.length + 'difference (s)');
for (var idx:int = 0; idx< differences.length;="">
{
trace (differences [idx]. JobNumber); See the differences
}
Traces:
3 difference (s)
111
444
11
As with anything, it has a limit. If you have any repeated JobNumbers 1 single corresponding instance of them is removed, leaving behind the JobNumber double as a difference.
example of a nickname for example (which means that it is not the code you can use, just understand)
var NewNumbers:Array = [1, 1, 2, 3];
var SavedNumbers:Array = [1, 2, 3, 4];
If these tables could run through this function, only the first duplicated "1" would be removed from the two bays, leaving another '1' NewNumbers. In the end, the difference would be: 1, 4
You may want to only * shrug *.
-
Hello gurus,
I have about 25 tables in the ABC scheme
I want to give all privialges to the XYZ schema for all tables of 25 which is in the pattern ABC... So is there is SQL statement or a script, I can run to grant privileges to all tables.
Something similar to these...
SELECT 'create synonym ' || table_name || ' for ' || table_name FROM user_tables {code} So i get all the table names ....then i can run as a script.... U r help is greatly appriciated gurus!!! Thank you!!!
Administrator:
set head off set pages 0 set feed off spool myscript.sql Select 'grant select, insert, update, delete on abc.'||table_name||' to xyz;' from dba_tables where owner = 'ABC'; Select 'create synonym xyz.'||table_name||' for abc.'||table_name||';' from dba_tables where owner = 'ABC'; spool off;
Obviously this does not all new table that will be created in the future on ABC schema...
Max
[My Italian blog Oracle | http://oracleitalia.wordpress.com/2010/02/07/aggiornare-una-tabella-con-listruzione-merge/] -
NPE for rows with null values in the table of the adv
I created the table adv, 2 columns, equipped with two text fields. Initially the col2 is empty,
say that the structure is as follows:
When the user clicks on apply button I want to update these values in the table.col1 col2 Hdr Question Answer row1 abc zxc row2 pdd null (user doesnt enter anything) row3 zxc lkj APPLYBUTTON
I don't know how to do that, but that's what I'm trying to do. Please guide me the right way if its wrong.
in LICS, I took the APPLYBUTTON action, got all lines of the object corresponding to the view, consulted with everyrow and I'm checking if there are values in the fields in the table, if the value zero, are simply print null. (we would not update on this line). . I could get o the part update, due to null pointer exception
I get on the row line null pointer exception [1].getAttribute("Answer") for row2, it prints the value of row1 however.
Here is the code I wrote:
Set of rows from the rowset = (RowSet) vo.getRowSet ();
Rank rank [] = vo.getAllRowsInRange ();
System.out.println ("row.length" + row.length);
for (int i = 0; i < row.length; i ++) {}
String question = row.getAttribute("Question").toString ();
String response = row [i].getAttribute("Answer").toString ();
If (question! = null & &!("".)) Equals (question. Trim()))
{
System.out.println ("Question line" + i + "-" + question);
}
on the other
{
System.out.println ("Question line" + i + "is null");
}
If (response! = null & &!("".)) Equals (Answer.Trim ()))
{
System.out.println ("Response line" + i + "-" + response);
}
on the other
{
System.out.println ("Response line" + i + "is null");
}
Why the NPE survey code, I'm checking for null value and you want to print the value null in the logfile... I can not to getAttribute() on the null field, why can not just give me null in the variable I'm assigning to?
You can guide me what approach to take, if it is not correct.
I must examine DataDictionary and collect data there?
Thanks in advance.Hello
handle the exception of null on these two statements like this pointer
String question = "";
String response = "";Try
{
question = row.getAttribute("Question").toString ();
}
catch (NullPointerException e)
{
question = "";
}Try
{
answer = row.getAttribute("Answer").toString ();
}
catch (NullPointerException e)
{
response = "";
}Si ( !("". Equals (question. Trim()))
{
System.out.println ("Question line" + i + "-" + question);
}
on the other
{
System.out.println ("Question line" + i + "is null");
}Si ( !("". Equals (Answer.Trim ()))
{
System.out.println ("Response line" + i + "-" + response);
}
on the other
{
System.out.println ("Response line" + i + "is null");
}Thank you
Gerard -
How to create a view in the DB table for some servers
Hello
We need create a country table which will contain data for countries.
I want to create it in such a way that it will be common for all servers - but as a point of view. not the real table, only the data and views do not change.
How can I do?
Thanks in advanceAre you sure you want to say 'tablespace '? A tablespace is a collection of data files. It has nothing to do with the privileges of the object, object namespaces, etc. I'm guessing that you mean that you have two schemas, OBITUARIESCS and ADVERTISEMENTCS. A schema is a collection of objects of database belonged to a particular user. A single table can exist in spaces of multiple tables (assuming it is partitioned). Different schemas can have an infinite number of tables with the same name in the same table. The database schema is the namespace for objects such as tables.
Assuming that you have two schemas in your database, you can create a table of COUNTRIES in the OBITUARIESCS schema. You can then grant SELECT access on the table to another user, ADVERTISEMENTCS, i.e.
GRANT SELECT ON country TO advertisementcs
You can then ask questions (but not change) the COUNTRY code of the property of ADVERTISEMENTCS table
SELECT * FROM advertisementcs.country
If you want to be able to remove the prefix in the schema, you can create a synonym. In the ADVERTISEMENTCS schema
CREATE SYNONYM country FOR advertisementcs.country
and then when the code of the property of ADVERTISEMENTCS wants to query the countries table, it can just
SELECT * FROM country
Justin
-
Remove the table for a photo table control framework
Hello
I need to create an array of 2D images. Due to the large amount of elements in the array, the width of the image is reduced to a minimum. However there are still a considerable gap between the 2 adjacent elements in the table (see the attached example), which is caused by the picture in the image control.
I tried to affect the color of transparent photo frame, but even if it is invisible, it is still there. I tried to customize the control too, but I couldn't find a way to remove the framework (for classic and modern styles).
(BTW, for the control of classical style, there is an option without color box control framework, but no option for 2D image control.) I need model/photos inside the element of control 2D image, so simple color 1 color box is not enough)
Could someone help to suggest a way to remove the frame and optimize the density of space in the table? Thank you much in advance.
PJI
Hello, PJI,.
You should be able to define the lower field in the area of the image of the control.
-Right click Control and choose "Advanced Properties"-> "Customize.."
-To the editor change order to 'Edit Mode'
-from the menu, click on 'Window'-> 'display the parts.
-In the part window, select the frame
-set new values for top, left, height, and width, so that the image is behind the area of the photo
I hope this helps.
UliB
-
The doc for the function of the subset of the table shows the extensible function
In LabView 2010 the doc for the function of the subset of the table shows that the function is expandable with indexes and multiple lengths. I can't expand the function for multiple indexes. How can I do this?
Is the documentation for the function by mistake, or is there another function of a subset of the table somewhere that can do this?
Subset of table details
When wire you an array to the function, the function is automatically resized to display entries index for each dimension of the array. If wire you a table 1 d to the function, the function displays the index for an item entries. If wire you a 2D to function, the function table displays the entries index for a line and column, respectively. If wire you a 3D through the nD to the function, the function displays the index for a page entries.
-
Excerpt from my table using the loop For
Hello
I have this loop to create a 2D array. The result is on the table below. I want that this 2D table should be fully completed and compiled, then it will be sent out of the loop.
I don't want to extract the value of table 2D is a loop. This is the problem that I am facing.
My ultimate goal is to extract the individual number of the final table of the 2D table line and be an entry for other functions.
Please help me. Thank you
PX
Hi PX.
Here's a solution without using screw express
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
-
Tecra M9 - does not start after memory upgrade from 1 GB to 3 GB
I am trying to upgrade my M9 memory with little success. I bought a 2 GB module which is the same existing brand and spec to the 1 GB module, but the PC will not start no matter what options I try. So far I have tried: * Addition of 2 GB for the acco
-
I set time display to start and has chosen the theme and nothing happens
-
Memory 01.02.15 firmware support clip more?
Hi, I'd like ask what kind of a maximum capacity of microSD memory that can be used in the 01.02.15 firmware? My most Clip was downgrade to version 01.02.15 (version 01.02.17) yesterday, after restart and scan... it can't read my database of songs to
-
HP Color LaserJet M477fnw MFP: Scan to computer button disappeared
Hello, I saw similar comments of the same issue, but none with a solution. The closest is this: http://h30434.www3.hp.com/t5/LaserJet-Printing/How-to-fix-missing-quot-scan-to-computer-quot-touchsc... Problem: We have a new printer that we have Setup
-
Adobe CD guard installation of more than 11
Use the Player 11 and these days whenever I go back to my computer, CD player is now the default player. I didn't change the 11, so I remove CD and reinstall 11. the next day, I go back to my computer and the DC is back!I do not like DC, do not use D