Compare the Collection with the help of the Table less
Hey there!
my plan is to transfer an excel file and record in an apex_collection, compare the results with those that already exist in a specific table and write it in another temporary table.
Import excel, in the collection works perfectly, but I fight with the comparation. I select the form of entries collection and using UNMIS to compare lines with those of another SELECTION that gets the lines of the existing table.
DECLARE
BEGIN
INSERT INTO UPLOADED_DID_LIST_COMP (BAC_CODE, UPSC)
(
SELECT BAC_CODE c001
c002 published
From apex_collections ca
WHERE collection_name = "UPLOADED_EXCEL."
LESS
SELECT
BAC_CODE
EDITED
OF UPLOADED_DID_LIST upld, apex_collections c WHERE
collection_name = "UPLOADED_EXCEL."
AND the upld. BAC_CODE = c.C001
AND the upld. LʼUPSC = c.C002
);
End;
This does not work because of this error:
ORA-00933: SQL command not properly ended ORA-06550
PLS-00103: encountered the symbol "end-of-file" when awaits one of the following numbers: (begin case declare exit end exception for goto rise back loop mod null pragma select update while < ID > < a quot double)
If it's a copy/paste of your exact code then you just need to fix it, spaces here and there. And remove the superfluous where clause. Maybe:
BEGIN
INSERT
IN UPLOADED_DID_LIST_COMP
(
BAC_CODE, SCHOOLING
)
(
C001 SELECT BAC_CODE, EDITED C002
FROM APEX_COLLECTIONS CA
WHERE COLLECTION_NAME = "UPLOADED_EXCEL."
LESS
SELECT BAC_CODE, SCHOOLING
OF UPLOADED_DID_LIST UPLD
);
END;
Good luck.
Tags: Database
Similar Questions
-
Compare the table structures in different schemas. help please
Hi all
I have a question...
I have pictures on different schemas something like
Diagram A
-------------
Table 1
Table 2
Table 3
Diagram B
------------
Table 1
Table 2
Table 3
Now situation is table 1 and table 2 will have a similar structure or table 1 in Figure B will have additional columns.
like so... on... for all other tables...
example!
Now I need to write some sort of procedure for the thing to compare these tables which are in different in the column names in the schema and get it had exported to an Excel sheet.Schema A: Desc Table 1; Name Type Null ------------- ------- ------- No Number Notnull Name Varchar2(10) Not null Fee Number (10,2) Not null Scheam B; Desc Table1; Name Type Null ------------- ------- ------- DX_No Number Notnull DX_Name Varchar2(10) Not null DX_Fee Number (10,2) Not null comments Varchar(2)
and here it's first three columns SHOULD BE CONSIDERED AS SAME even if the DX_ prefix are from the REST OF the PART OF THE COLUMN NAME IS SAME.
and the same way commit coloumn new schema B only... So it should be noted that excel sheets...
I don't know how the ADO or SQL Developer handle this... Is there any plsql block that I can write to do it...
Thanks in advance...Comparison of columns on all the tables in the two schema
select tc1.owner,tc1.TABLE_NAME,tc1.COLUMN_NAME, tc2.owner,tc2.TABLE_NAME,tc2.COLUMN_NAME from all_tab_columns tc1 full outer join all_tab_columns tc2 on &user1=tc2.owner and tc1.TABLE_NAME=tc2.TABLE_NAME and tc1.COLUMN_NAME like '%'||tc2.COLUMN_NAME where tc1.owner=&user2 and tc1.TABLE_NAME in ( select t1.table_name from all_tables t1 join all_tables t2 on t2.owner=&user2 and t1.table_name=t2.table_name where t1.owner=&user1)
Published by: xtender on 06.11.2010 12:43
-
Compare the table and out of the common elements
Hello
Can you help me to compare the two tables in the attached file in VI and out the elements common to the two tables?
Thank you
hiNi
There is no wire table through the False State in the structure of your business. Use the default value if unwired is selected for this tunnel. the default value for this tunnel is an array of empty strings. Run the wire straight through, and Bob's your father's brother.
-
Remove the entries in the table less resolution to
For example, I have the following table:
[1 k, 2 k, 3 k, 23 k, 24 k, 25 k, 26 k, 51 k, 52 k, 54 k, 56 k, k 76, 78 k]
For example, the resolution is 10 k
I want to process the table in a way so that it returns a table with the frequencies-more-than-resolution deleted while at the more-than-resolution-frequencies only maintain the highest and delete the rest.
In the table above, I've separated the elements to indicate the Group of frequencies forming 'more-than-resolution-frequencies' example 1 k, 2 k, 3 k are more-than-resolution-frequencies
The resulting table should look like.
[3 k, 26 k, 78 k]
In the example above, there are 3 groups of frequencies ilustration purposes, but it could be any number.
Round table and removing duplicates close brings the result but this adds an error equal to the resolution.
I hope this helps.
-
convert the table less smaples per second
Have great picture with 9 channels of data by time stamp.
Timestamp shows that there are about 100 samples per second.
I need to generate the table that displays only an average value per channel, per second.
Faced with the 'picture of generation' and 'index' to get the picture right.
Suggestions?
markfranklin wrote:
Faced with the 'picture of generation' and 'index' to get the picture right.
Suggestions?
I bag the building and indexing and discover the screw decimate in the range of Signal Processing. Unless you're stuck with the basic version.
-
Hi all..
I am very new to PL/SQL...
I need through through a table to compare its lines with the table with the other lines. For that I'm trying to use Pl/sql below.
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
create or replace compare()
Declare
VAR_HIT CHAR (1);
SEARCH_RECORD_DATA UDB.table1%ROWTYPE;
CANDIDATE_RECORD_DATA UDB.table1%ROWTYPE;
CURSOR SEARCH_RECORDS_CURSOR IS SELECT * FROM UDB.table1 by registration_id;
CURSOR CANDIDATE_RECORDS_CURSOR IS SELECT * FROM UDB.table1 by registration_id;
BEGIN
FOR SEARCH_RECORD_DATA IN SEARCH_RECORDS_CURSOR LOOP
FOR CANDIDATE_RECORD_DATA IN CANDIDATE_RECORDS_CURSOR LOOP
IF (CANDIDATE_RECORD_DATA. THE DECISION = 'P') THEN
VAR_HIT: = 'y ';
IF (CANDIDATE_RECORD_DATA. First_name! = 'unknown') AND (CANDIDATE_RECORD_DATA. FIRST_NAME! = SEARCH_RECORD_DATA. FIRST_NAME) THEN
VAR_HIT: = 'n';
ELSIF (CANDIDATE_RECORD_DATA. Last_name! = 'unknown') AND (CANDIDATE_RECORD_DATA. LAST_NAME! = SEARCH_RECORD_DATA. LAST_NAME) THEN
VAR_HIT: = 'n';
ELSIF (CANDIDATE_RECORD_DATA. BIRTH_DATE! = 'unknown') AND (CANDIDATE_RECORD_DATA. BIRTH_DATE! = SEARCH_RECORD_DATA. BIRTH_DATE) THEN
VAR_HIT: = 'n';
ELSIF (CANDIDATE_RECORD_DATA. GENDER EQUALITY! = 'U') AND (CANDIDATE_RECORD_DATA. SEX! = SEARCH_RECORD_DATA. SEX) THEN
VAR_HIT: = 'n';
ELSIF (CANDIDATE_RECORD_DATA. FATHER_NAME! = 'unknown') AND (CANDIDATE_RECORD_DATA. FATHER_NAME! = SEARCH_RECORD_DATA. FATHER_NAME) THEN
VAR_HIT: = 'n';
ELSIF (CANDIDATE_RECORD_DATA. MOTHER_NAME! = 'unknown') AND (CANDIDATE_RECORD_DATA. MOTHER_NAME! = SEARCH_RECORD_DATA. MOTHER_NAME) THEN
VAR_HIT: = 'n';
END IF;
IF(VAR_HIT='y') THEN
INSERT IN THE UDB. VALUES OF (REGISTRATION_ID, SEARCH_ID, HIT_CANDIDATE_ID, SEARCH_DETAILS, CANDIDATE_DETAILS) BIO_DI_HIT_RESULT (SEARCH_RECORD_DATA. REGISTRATION_ID, SEARCH_RECORD_DATA. EGM_NO, CANDIDATE_RECORD_DATA. EGM_NO, VAR_SEARCH_DETAILS, VAR_CANDIDATE_DETAILS);
UPDATE UDB. SET BIO_RECORDS_DEMOGRAPHICS = A DECISION ';
END IF;
END IF;
END LOOP;
commit;
END LOOP;
END;
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Outer loop works well (it is raversing throughout the table) is (say by 8000 saves 8,000 times)
But Enner loop does not work fine e.i. it runs just for 8000 times for 8000 records. While it must run more time then 8000...
Can someone help me...
Is the way to use two cursor on a table to compare each line of the report is correct? :(>
But even once come with a problem more in the part of sql, I shared. It does not cover part of my State... :(
--> If the secondary search field are 'unknown' this field (please AVI single field not as search folder) will not be considered as search criteria.
But in my current sql, all the side of any field research as "unknown" is not even taken to search for any candidate for other fields match.Try to change all the terms in this way (I show here only how to change a condition):
Instead of:
AND (SEARCH.BIRTH_DATE!='unknown' AND CANDIDATE.BIRTH_DATE IN (SEARCH.BIRTH_DATE,'unknown'))
Use this one:
AND (SEARCH.BIRTH_DATE = 'unknown' OR CANDIDATE.BIRTH_DATE IN (SEARCH.BIRTH_DATE,'unknown'))
In the case of the search.birthdate condition will be 'unknown', it will be ignored, otherwise this condition will be used.
-
Hello:
I need to compare two index table, to see the file please, and if there is no specific line or column changes then indicate any number of line and colunm
How can I do in labview
Thank you
Brice
I have created 2 examples in the attached VI.
The loop at the top of the page search for any line that indicates the index of the first inconsistency and incompatibility.
The loop at the bottom search all mismatched line/column, regardless of having previously found it an inconsistency in the same row. It gives you a complete list.
The example (s) should give you an idea of how to do to implement your solution.
-
by comparing certain objects... helps with the formatting and variables
I want to delete computer accounts in an ORGANIZATIONAL unit that do not exist in a folder of vmware...
Step 1. Compare.
$ad = Get-QADComputer -SearchRoot 'domain.lan/Test-NoGPO' $vmware= Get-VM -Location VDI_RemoteAccess Write-Host "AD" $ad Write-Host "VMWARE" $vmware Compare-Object $ad $vmware
Gives me this result:
AD DOMAIN\DSTASA1$ DOMAIN\SXCH100$ DOMAIN\SKFB111$ DOMAIN\FAKEPC$ VMWARE vstaq16 vstaq18 InputObject SideIndicator ----------- ------------- vstaq16 => vstaq18 => DOMAIN\DSTASA1$ <= DOMAIN\SXCH100$ <= DOMAIN\SKFB111$ <= DOMAIN\FAKEPC$ <=
I need the output of 2 first orders are the same... preferably just the 'name' of the pc. On the subject line - compare I tried to use $ad. Name and $vmware. Name but that the errors and says that it is null when the script runs...
How to disinfect these lists and end up with a list of computers that are not in both places? (to later be deleted with other commands, not relevant here)
You were there at halfway when you tried with the Name property.
But you must keep all the computernames in 1 table and all VMnames in another table.
Then, you can compare the 2 tables.
Something like that
$ad = Get-QADComputer -SearchRoot 'domain.lan/Test-NoGPO' | %{$_.Name}
$vmware= Get-VM -Location VDI_RemoteAccess | %{$_.Name} Compare-Object $ad $vmware
-
Help compare the negative and positive values
Well guys, I do this example to show you what I mean
With this example, I can get positive and negative numbers in digital
But for me, the 'negative' mean nothing
Example:
If I have "100-200" for me the biggest value is - 200
But if I compare the values of bouth got 100 as greater value
I do the same calc for 3 different variables such as A, B, C
and after that I need to calc whose value is 'more '.
But my problem is that if I have the values "-350 300-400.
the largest will be "300", but for me the 'negative' mean nothing
so I need to the largest value is "-400".
For all positive values, its works very well!
I compare A and B, after the highest is on C and have a result!
but when I have negative and positive values... I had this problem...
and when I have negative values only I have a problem too.
'-300-400-500' for me the largest value must be "-500" but labview-watch "300".
as - 300 is greater than-500 in algebriac.
And if I use absolute values, I will always have a positive value... but I need to know if the value is positive or negative
No matter which, can help me with this?
Thank you
Ben
-
I can't install cs6 master collection with serial number, the message is: Impossible to condone this number, but in our account page retrieve numbers series, everything is OK. Thank you
Since this is an open forum, not Adobe support... you must contact Adobe personnel to help
Chat/phone: Mon - Fri 05:00-19:00 (US Pacific Time)<=== note="" days="" and="">===>
Don't forget to stay signed with your Adobe ID before accessing the link below
Serial number and activation support (non - CC)
-
How to compare a Date with the current year data and member of period on FIX
Hi experts,
I have a Sun project that each Member is a project (P01, P02,...)
and account IMGs who stores the information of each project (name, Start date, finished...)
Finished Date member is of data type Date
So how can write an IF condition below in order to be able to compare the end Date of the project with the members of the current year and period on FIX
DIFFICULTY (@Descendants (Projects), Descendants (year-round), Descendants ("year Total")...)
IF (@CURRMBR (Period)-> @CURRMBR (Year) < Project > - FinishedDate)
Do something...
On the other
Do something
Please help me on this. Sorry for my bad grammar. Please ask if there is something not clear
Thank you very much
Van Huy.
Published by: Van Huy on 29 January 2013 01:14
Published by: Van Huy on 29 January 2013 02:24
Published by: Van Huy on 29 January 2013 02:25
Published by: Van Huy on 29 January 2013 18:04Here's what I did. Post for which may later cover
VAR FM; / * End of month of the project.
VAR EXERCISE; / * Year of the project terminated * /.
VAR CM; / * Capture the current month on FIX declarations * /.
VAR CY; / * Capture current year on FIX declarations * /.DIFFICULTY (@RELATIVE ('year', 0), @RELATIVE ('period', 0), @IDescendants ("core projects")...)
FY = @ROUND ('TGHT'-> ' NA contract "-> 'FY06'-> ' NA period" / 10000, 0);
FM = @MOD (@ROUND ('TGHT'-> ' NA contract "-> 'FY06'-> ' NA period" / 100, 0), 100);
/ * For FY13 back 13... */
CY = @JgetDoubleFromString (@CONCATENATE ('20', @SUBSTRING (@NAME (@CURRMBRRANGE (year, Lev, 0, 0, 0)), 2)));
/ * Value CM set based on perceived period on the DIFFICULTY of statement * /.
IF (@ISMBR ("Jan"))
CM = 1;
ELSE IF (@ISMBR ("February"))
CM = 2;
.....
ELSE IF (@ISMBR ("Dec"))
CM = 12;
ENDIFIF (CY< fy="" or="" (="" cy="=" fy="" and="" cm=""><>
Do something...
ON THE OTHER
Do something...
ENDIF
ENDFIXPublished by: Van Huy on 19 February 2013 23:10
Published by: Van Huy on February 20, 2013 19:46
-
No need to advise - compare the date in *.sql with sysdate.
Hi guys,.
Need some help here.
Someone has a script that will compare the date specified with the current sysdate. If previously, he will order that SQL * PLUS to leave immediately.
The audit will be essentially in a script *.Sql. Whenever we run the script, @c:\script.sql, it will be first of all to compare the dates and decide whether to proceed with the rest of the codes (dml) below the date checker in the same script.sql
Thank youI would like to combine the solutions of bencol and alberto:
whenever sqlerror exit DECLARE v_date DATE := TO_DATE('
', 'YYYYMMDD'); BEGIN IF v_date >= TRUNC(SYSDATE) -- or perhaps: v_date>= sysdate THEN null; ELSE raise_application_error(-20000,'Date is before SYSDATE!'); END IF; END; / whenever sqlerror continue -- rest of your script ... (not tested)
Published by: hm on 08.05.2012 02:51
-
by comparing the records with another table
Hello
I have the following 2 tables (test_prs & test_dep) and registers
My goal is to compare test_prs with test_dep records and return the records that are not in test_dep
Here is the table scripts
I tried the following query to meet my criteria. My output should be null, but all recordscreate table test_prs (id ,p_id ,r_id) as select 1,200566,200566 from dual union all select 2,200567,200567 from dual create table test_dep (id,de_typ,de_id,de_u_typ,de_u_id) as select 10,'AS',200566,'PG',200566 FROM DUAL UNION ALL select 11,'AS',200567,'PG',200567 FROM DUAL insert into test_dep select 12,'AS',400189,'PG',400273 FROM dual union all select 13,'AS',400273,'PG',400250 FROM dual union all select 14,'AS',400273,'PG',400192 FROM dual union all select 15,'AS',400273,'PG',400191 FROM dual insert into test_prs select 3,400273,400273 from dual
Could you please help me the sameselect * from test_prs prs where exists (select 1 from test_dep de where de.de_id !=prs.p_id and de.de_u_id !=prs.p_id )
Published by: smile on 7 March 2012 15:00Smile says:
Thanks for the requestThe query does not work with the following documents
insert into test_dep select 16,'AS',750664,'PG',750758 FROM dual insert into test_prs select 4,750758,750668 from dual
the r_id should not be put in correspondence with the columns in the test_dep table. P_id must only be put in correspondence
OK, you want to match against the de_id and the de_u_id p_id? Or a line where either p_id concordances r_id de_u_id or de_id must not be returned?
To match p_id against de_id and de_u_id, you can write the query like this:
select id, p_id, r_id from test_prs where p_id in (select p_id from test_prs minus select de_id from test_dep minus select de_u_id from test_dep);
Brgds
Johan -
Compare the result of a query with a number and return a message
Hello
I have the following query in oracle 9i:
SELECT COUNT (*)
OF hourly_files
WHERE date_received = TO_DATE ((SELECT TO_CHAR (SYSDATE - INTERVAL '1' DAY, 'DDMMYYYY')
(THE DOUBLE), 'DDMMYYYY');
This will produce a number of lines required
I need to compare the number of output with another number hardcoded (threshold) and print an appropriate example message
If the result of the query above is 18000 and the number of threshold is fixed at 20000, then output a meesage:
Number of files received less than 2000
Any help will be very appreciated!
Thank you.SQL> ed Wrote file afiedt.buf 1 SELECT CASE WHEN COUNT(*) >5 THEN 'Number is > than 5' 2 WHEN COUNT(*) <1 THEN 'Its less than 1' 3 ELSE 'Its in between' 4 END 5 FROM emp 6* WHERE deptno=20 SQL> / CASEWHENCOUNT(*)>5 ------------------ Its in between SQL> SELECT COUNT(*) FROM emp 2 WHERE deptno=10; COUNT(*) ---------- 3
-
CVI suggested help update on 'programming with the Table controls.
Hello
May I suggest adding a sentence to the chapter 'Programming with the Table controls', 'Creation and deletion of cells' section help of CVI.
After the sentence "use the following functions to control the number of rows in a table control...". "I would like to add a suspicion that the number of lines is also affected by (programmatically) adjustment of the height of the table.
Now that I've discovered, it's obvious ;-)
Hi Wolfgang,.
I think you might be misunderstanding this sentence in aid. It does not refer to the size of the table, in regard to the number of lines go in the table. It is in fact the number of real lines exist in the table. And the total number of rows in the table is absolutely not affected by the height of the table.
Luis
Maybe you are looking for
-
I know I can't combine the two accounts. is it possible that I can know what was purchased in what account. I think we have much less purchased apps than the other and if I can at least see what the cost is to delete this account and its applications
-
Presario CQ40: Display a ratio and incorrect resolution even after installing drivers
Number and name of the product HP Compaq Presario CQ40 (339TU) Operating system installed Windows 8 Pro (recently re-installed) All changes to your system until the problem occurred Accidentally deleted the partition reserved system (about 300 MB) Th
-
Update security for Windows 7 for x 64-based systems (KB2378111)
The installation fails with code 80070643. Windows 7 tries to install this update. He was always under control as do not update.
-
OfficeJet Pro8620: Error printer Officejet Pro8620
I'm on my third Officejet Pro8620 since January 20, 2016. The first printer kept to give a message to ' Please stop printer, then press "with lights flashing. After what happens every few minutes, I picked up the printer to the store and exchanged
-
Hi guys! I just buy this model with windows 7 preinstalled. I have a dual boot XP + 7. I followed the general guide in this forum, copy the files and add the sata driver when creating the boot dvd. I took the Amd Sata AHCI according to this: http://h