Re: Display all the records from table using cursor
Posted by:
kaji Pasa
Date: September 25, 2017 12:49PM
Here is the requirement.
I have two tables base_table b and master table m with columns
standarttitle,Title_sci,issn1,issn2,confidence_check(CC),Title,issn,eissn,database
Here is no any primary key.
role of CC: if base.title_sci = base.title or b.issn1=b.issn2 or b.issn=b.eissn then this is match and CC=0 else cc=1 .
for the rows if cc is not zero then i have to see those records in a master table.
The data in the master table is a repository to make the mapping (match) of such incorrect records we know that will happen,and consider those to be match.so in master table if i have dog=cat and master.cc= 0 for tiitle_sci and title columns and if i find in base table title_sci = "dog" and title= "cat" I have to update CC to 0 from 1 in base table .But if dog=cat and cc=1 in master then we don't have to deal with that in base. Just escape it.
Or if the record in master has cc=0 we have to find the corresponding row in base table and make it 0.
The master table also has same table structure as base table. I am trying to update cc to 0 from 1 if for each row from base and master table, if
base.title_sci=master.title_sci
and b.issn1=m.issn1
and b.issn2=m.issn2
and b.title=m.title
and b.issn=m.issn
and b.eissn=m.eissn and
b.databas=m.databas
For some records we have distinct record only because we have different database value, all other columns have duplicate record
for eg
base table record is as follows
************************************************
StandardTitle Title_sci, | ISSN1 | ISSN2 |CC| Title, ISSN | eISSN | Databas
------------------------|-------------------------------|----------|------------|--|----------------------------------------------------------------------
ALZHEIMERSANDDEMENTIA, | Alzheimers and Dementia|1552-5260 | 1552-5279 |1 | Alzheimers & Dementia | NULL| 2352-8729 | PubMed Central
ALZHEIMERSANDDEMENTIA, | Alzheimers and Dementia |1552-5260 | 1552-5279 |1 | Alzheimers & Dementia | NULL| 2352-8729 | ScienceDirect Open Access Titles
Subject
Views
Written By
Posted
4115
September 22, 2017 06:21PM
916
September 22, 2017 07:46PM
953
September 22, 2017 10:11PM
828
September 25, 2017 09:07AM
809
September 25, 2017 11:17AM
768
September 25, 2017 11:15AM
Re: Display all the records from table using cursor
874
September 25, 2017 12:49PM
794
September 25, 2017 01:18PM
693
September 25, 2017 01:36PM
682
September 25, 2017 02:00PM
690
September 25, 2017 03:51PM
802
September 25, 2017 06:24PM
705
September 26, 2017 01:34PM
761
September 26, 2017 01:56PM
662
September 26, 2017 02:22PM
775
September 26, 2017 03:35PM
711
September 27, 2017 10:28AM
815
September 27, 2017 11:39AM
770
September 26, 2017 12:43PM
744
September 26, 2017 01:27PM
711
September 26, 2017 01:44PM
816
September 25, 2017 01:46PM
822
September 25, 2017 12:56PM