MySQL Forums
Forum List  »  Stored Procedures

Re: Display all the records from table using cursor
Posted by: kaji Pasa
Date: September 25, 2017 01:46PM

Thanks Peter for the comment.

I don't mean to say the absence of primary key in the table, but absence of primary key in my logic i used. I did not get the use of primary key anywhere.The cursor i used is able to populate the result from the table but the update does not work, may be some logic needs to be changed. I am still working on this.

here is the table design

show create table base_report

base_report | CREATE TABLE `base_report` (
`base_report_id` int(11) NOT NULL AUTO_INCREMENT,
`StandardTitle` varchar(255) DEFAULT NULL,
`Title_sci` varchar(255) DEFAULT NULL,
`ISSN1` varchar(12) DEFAULT NULL,
`ISSN2` varchar(12) DEFAULT NULL,
`CC` int(11) NOT NULL,
`Title` varchar(255) DEFAULT NULL,
`ISSN` varchar(12) DEFAULT NULL,
`eISSN` varchar(12) DEFAULT NULL,
`Databas` varchar(255) DEFAULT NULL,
PRIMARY KEY (`base_report_id`),
KEY `CC_index` (`CC`)
) ENGINE=InnoDB AUTO_INCREMENT=146 DEFAULT CHARSET=utf8 |




66, ADVANCESINMATHEMATICALPHYSICS, Advances in Mathematical Physics, 1687-9120, 1687-9139, 1, Advances in Mathematical Physics, , , Freely Accessible Journals
88, AGRICULTURALECONOMICSREVIEW, Agricultural Economics Review, 1109-2580, , 1, AGRICULTURAL ECONOMICS REVIEW, , , ABI/INFORM Collection
104, ALZHEIMERSANDDEMENTIA, Alzheimer's and Dementia, 1552-5260, 1552-5279, 1, Alzheimer's & Dementia : Diagnosis, Assessment & Disease Monitoring, , 2352-8729, PubMed Central
105, ALZHEIMERSANDDEMENTIA, Alzheimer's and Dementia, 1552-5260, 1552-5279, 1, Alzheimer's & Dementia: Diagnosis, Assessment & Disease Monitoring, , 2352-8729, ScienceDirect Open Access Titles
106, ALZHEIMERSANDDEMENTIA, Alzheimer's and Dementia, 1552-5260, 1552-5279, 1, Alzheimer's & Dementia: Translational Research & Clinical Interventions, , 2352-8737, ScienceDirect Open Access Titles
71, AFRICA, Africa, 0001-9720, , 2, Africa, , , PressReader
80, AGORA, Agora, 1516-1498, , 2, Agora, , , Freely Accessible Arts & Humanities Journals
89, AGRICULTURE, Agriculture, 0551-3677, 1338-4376, 2, Agriculture, , , PressReader
2, ACADEMIA, Academia, 1012-8255, , 3, Academia : Noticias del Cine Espanol, , , Freely Accessible General Interest Journals
9, ACTAACADEMICA, Acta Academica, 0587-2405, , 3, Acta Académica, 1017-7507, , Educator's Reference Complete
10, ACTAACADEMICA, Acta Academica, 0587-2405, , 3, Acta Académica, 1017-7507, , Educator's Reference Complete
11, ACTAACADEMICA, Acta Academica, 0587-2405, , 3, Acta Académica, 1017-7507, , Informe Academico
12, ACTAACADEMICA, Acta Academica, 0587-2405, , 3, Acta Académica, 1017-7507, , Informe Academico
14, ACTACRYSTALLOGRAPHICA, Acta crystallographica. Section C, Structural chemistry, 2053-2296, , 3, Acta Crystallographica, 0365-110X, , Memorial Library's Print Holdings
15, ACTACRYSTALLOGRAPHICA, Acta crystallographica. Section C, Structural chemistry, 2053-2296, , 3, Acta crystallographica. Section F, Structural biology communications, , 2053-230X, PubMed Central
16, ACTACRYSTALLOGRAPHICA, Acta crystallographica. Section C, Structural chemistry, 2053-2296, , 3, Acta Crystallographica: Section D (Wiley-Blackwell), 0907-4449, 1399-0047, Academic Search Premier
17, ACTACRYSTALLOGRAPHICA, Acta crystallographica. Section C, Structural chemistry, 2053-2296, , 3, Acta Crystallographica: Section D (Wiley-Blackwell), 0907-4449, 1399-0047, MegaFILE
27, ACTAONCOLOGICA, Acta Oncologica, 0284-186X, 1651-226X, 3, Acta oncologica. Supplement, 1100-1704, , Academic Search Premier
28, ACTAONCOLOGICA, Acta Oncologica, 0284-186X, 1651-226X, 3, Acta oncologica. Supplement, 1100-1704, , MegaFILE
29, ACTAORIENTALIA, Acta Orientalia, 0001-6446, 1588-2667, 3, Acta orientalia, 0001-6438, , Expanded Academic ASAP
30, ACTAORTHOPAEDICA, Acta Orthopaedica, 1745-3674, 1745-3682, 3, Acta Orthopaedica (Supplement), 1745-3690, 1745-3704, Academic Search Premier
31, ACTAORTHOPAEDICA, Acta Orthopaedica, 1745-3674, 1745-3682, 3, Acta Orthopaedica (Supplement), 1745-3690, 1745-3704, CINAHL Plus with Full Text
32, ACTAORTHOPAEDICA, Acta Orthopaedica, 1745-3674, 1745-3682, 3, Acta Orthopaedica (Supplement), 1745-3690, 1745-3704, Consumer Health Complete
33, ACTAORTHOPAEDICA, Acta Orthopaedica, 1745-3674, 1745-3682, 3, Acta Orthopaedica (Supplement), 1745-3690, 1745-3704, Health Source: Nursing/Academic Edition
34, ACTAORTHOPAEDICA, Acta Orthopaedica, 1745-3674, 1745-3682, 3, Acta Orthopaedica (Supplement), 1745-3690, 1745-3704, MegaFILE
35, ACTAORTHOPAEDICA, Acta Orthopaedica, 1745-3674, 1745-3682, 3, Acta Orthopaedica (Supplement), 1745-3690, 1745-3704, SPORTDiscus with Full Text
36, ACTAORTHOPAEDICA, Acta Orthopaedica, 1745-3674, 1745-3682, 3, Acta Orthopaedica (Supplement), 1745-3690, 1745-3704, Freely Accessible Science Journals
37, ACTAORTHOPAEDICA, Acta orthopaedica. Supplementum, 1745-3690, 1745-3704, 3, Acta orthopaedica, 1745-3674, 1745-3682, Academic Search Premier
38, ACTAORTHOPAEDICA, Acta orthopaedica. Supplementum, 1745-3690, 1745-3704, 3, Acta orthopaedica, 1745-3674, 1745-3682, CINAHL Plus with Full Text
39, ACTAORTHOPAEDICA, Acta orthopaedica. Supplementum, 1745-3690, 1745-3704, 3, Acta orthopaedica, 1745-3674, 1745-3682, Consumer Health Complete
40, ACTAORTHOPAEDICA, Acta orthopaedica. Supplementum, 1745-3690, 1745-3704, 3, Acta orthopaedica, 1745-3674, 1745-3682, Directory of Open Access Journals
41, ACTAORTHOPAEDICA, Acta orthopaedica. Supplementum, 1745-3690, 1745-3704, 3, Acta orthopaedica, 1745-3674, 1745-3682, Health Source: Nursing/Academic Edition
42, ACTAORTHOPAEDICA, Acta orthopaedica. Supplementum, 1745-3690, 1745-3704, 3, Acta orthopaedica, 1745-3674, 1745-3682, MegaFILE
43, ACTAORTHOPAEDICA, Acta orthopaedica. Supplementum, 1745-3690, 1745-3704, 3, Acta orthopaedica, 1745-3674, 1745-3682, PubMed Central
44, ACTAORTHOPAEDICA, Acta orthopaedica. Supplementum, 1745-3690, 1745-3704, 3, Acta orthopaedica, 1745-3674, 1745-3682, SPORTDiscus with Full Text
45, ACTAOTOLARYNGOLOGICA, Acta Oto-Laryngologica, 0001-6489, , 3, Acta oto-laryngologica, 0365-5237, 1651-2464, Memorial Library's Print Holdings
46, ACTAOTOLARYNGOLOGICA, Acta Oto-Laryngologica, 0001-6489, , 3, Acta Oto-Laryngologica (Supplement), 0365-5237, 1651-2464, Academic Search Premier




**********************************************************************************
mysql> show create table master_data;
+-------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table |
+-------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| master_data | CREATE TABLE `master_data` (
`master_data_id` int(11) NOT NULL AUTO_INCREMENT,
`StandardTitle` varchar(255) DEFAULT NULL,
`Title_sci` varchar(255) DEFAULT NULL,
`ISSN1` varchar(12) DEFAULT NULL,
`ISSN2` varchar(12) DEFAULT NULL,
`CC` int(11) NOT NULL,
`Title` varchar(255) DEFAULT NULL,
`ISSN` varchar(12) DEFAULT NULL,
`eISSN` varchar(12) DEFAULT NULL,
`Databas` varchar(255) DEFAULT NULL,
PRIMARY KEY (`master_data_id`),
KEY `CC_index` (`CC`)
) ENGINE=InnoDB AUTO_INCREMENT=146 DEFAULT CHARSET=utf8 |
+-------------+----------------------------------------------
***************************************************************************************************************

1, 3L, 3L: Language, Linguistics, Literature, 0128-5157, , 0, 3L: Southeast Asian Journal of English Language Studies, , , Education Source
3, ACADEMICJOURNALOFMANUFACTURINGENGINEERING, Academic Journal of Manufacturing Engineering, 1583-7904, , 0, Academic Journal of Manufacturing Engineering, , , Applied Science & Technology Source
4, ACCOUNTINGAUDITINGANDACCOUNTABILITYJOURNAL, Accounting, Auditing and Accountability Journal, 0951-3574, , 0, Accounting, auditing & accountability journal, 1368-0668, 1758-4205, ABI/INFORM Collection
5, ACCOUNTINGAUDITINGANDACCOUNTABILITYJOURNAL, Accounting, Auditing and Accountability Journal, 0951-3574, , 0, Accounting, auditing & accountability journal, 1368-0668, 1758-4205, Emerald Management 120
6, ACMIEEEINTERNATIONALCONFERENCEONHUMANROBOTINTERACTION, ACM/IEEE International Conference on Human-Robot Interaction, 2167-2148, , 0, ACM/IEEE International Conference on Human-Robot Interaction, , , Applied Science & Technology Source
7, ACORN, ACORN, 1448-7535, , 0, ACORN: the journal of perioperative nursing in Australia, 1031-1017, , CINAHL Plus with Full Text
8, ACSCATALYSIS, ACS Catalysis, 2155-5435, , 0, ACS CATALYSIS, , , ACS Publications
13, ACTAAGRICULTURAESLOVENICA, Acta Agriculturae Slovenica, 1581-9175, , 0, ACTA AGRICULTURAE SLOVENICA, , 1854-1941, Directory of Open Access Journals
18, ACTACRYSTALLOGRAPHICASECTIONA, Acta Crystallographica Section A: Foundations and Advances, 2053-2733, , 0, ACTA CRYSTALLOGRAPHICA SECTION A, 0108-7673, 1600-5724, Wiley-Blackwell Full Collection
19, ACTACRYSTALLOGRAPHICASECTIONB, Acta Crystallographica Section B: Structural Science, Crystal Engineering and Materials, 2052-5206, 2052-5192, 0, ACTA CRYSTALLOGRAPHICA SECTION B, 0108-7681, 1600-5740, Wiley-Blackwell Full Collection
20, ACTACRYSTALLOGRAPHICASECTIONE, Acta Crystallographica Section E: Structure Reports Online, 1600-5368, , 0, Acta Crystallographica Section E: Crystallographic Communications, , 2056-9890, PubMed Central
21, ACTACRYSTALLOGRAPHICASECTIONF, Acta Crystallographica Section F: Structural Biology Communications, 2053-230X, , 0, Acta Crystallographica Section F, , 1744-3091, Wiley-Blackwell Full Collection
22, ACTACRYSTALLOGRAPHICASECTIONF, Acta Crystallographica Section F: Structural Biology Communications, 2053-230X, , 0, Acta Crystallographica Section F: Structural Biology and Crystallization Communications, , 1744-3091, PubMed Central
23, ACTAECOLOGICASINICA, Acta Ecologica Sinica, 1000-0933, , 0, Acta Ecologica Sinica, , 1872-2032, ScienceDirect Freedom Collection 2017
24, ACTAMATHEMATICAUNIVERSITATISCOMENIANAE, Acta Mathematica Universitatis Comenianae, 0862-9544, , 0, ACTA MATHEMATICA UNIVERSITATIS COMENIANAE, 0231-6986, 1336-0310, Electronic Library of Mathematics
25, ACTAMATHEMATICAUNIVERSITATISCOMENIANAE, Acta Mathematica Universitatis Comenianae, 0862-9544, , 0, ACTA MATHEMATICA UNIVERSITATIS COMENIANAE, 0231-6986, 1336-0310, Freely Accessible Journals
26, ACTAMATHEMATICAUNIVERSITATISCOMENIANAE, Acta Mathematica Universitatis Comenianae, 0862-9544, , 0, ACTA MATHEMATICA UNIVERSITATIS COMENIANAE, 0231-6986, 1336-0310, Freely Accessible Science Journals
51, ACTAPHARMACEUTICA, Acta Pharmaceutica, 1330-0075, , 0, Acta Pharmaceutica, , , Directory of Open Access Journals
54, ACTASDERMOSIFILIOGRAFICAS, Actas Dermo-Sifiliograficas, 0001-7310, 1578-2190, 0, Actas Dermo-Sifiliográficas (English Edition), , , ScienceDirect Freedom Collection 2017
55, ACTASDERMOSIFILIOGRAFICAS, Actas Dermo-Sifiliograficas, 0001-7310, 1578-2190, 0, Actas Dermo-Sifiliográficas (English Edition), , 2173-5778, ScienceDirect Freedom Collection 2016
57, ACTASUROLOGICASESPANOLAS, Actas Urologicas Espanolas, 0210-4806, , 0, Actas Urológicas Españolas (English Edition), , 2173-5786, ScienceDirect Freedom Collection 2017
59, ADMINISTRATIESIMANAGEMENTPUBLIC, Administratie si Management Public, 1583-9583, , 0, Administratie si Management Public, , , ABI/INFORM Collection
60, ADOLESCENTMEDICINE, Adolescent Medicine: State of the Art Reviews, 1934-4287, , 0, Adolescent medicine (Philadelphia, Pa.), 1041-3499, 1545-0058, Nursing & Allied Health Database
61, ADVANCESINGEOSCIENCES, Advances in Geosciences, 1680-7340, , 0, ADVANCES IN GEOSCIENCES, , 1680-7359, Directory of Open Access Journals
62, ADVANCESINHIGHENERGYPHYSICS, Advances in High Energy Physics, 1687-7357, , 0, ADVANCES IN HIGH ENERGY PHYSICS, , 1687-7365, Directory of Open Access Journals
63, ADVANCESINHIGHENERGYPHYSICS, Advances in High Energy Physics, 1687-7357, , 0, ADVANCES IN HIGH ENERGY PHYSICS, , 1687-7365, Expanded Academic ASAP
64, ADVANCESINHIGHENERGYPHYSICS, Advances in High Energy Physics, 1687-7357, , 0, ADVANCES IN HIGH ENERGY PHYSICS, , 1687-7365, General Science Collection
65, ADVANCESINLIFECOURSERESEARCH, Advances in Life Course Research, 1040-2608, , 0, ADVANCES IN LIFE COURSE RESEARCH, 1569-4909, 1879-6974, ScienceDirect Freedom Collection 2017
67, ADVANCESINPOWERELECTRONICS, Advances in Power Electronics, 2090-181X, , 0, ADVANCES IN POWER ELECTRONICS, , 2090-1828, Applied Science & Technology Source
68, ADVANCESINPOWERELECTRONICS, Advances in Power Electronics, 2090-181X, , 0, ADVANCES IN POWER ELECTRONICS, , 2090-1828, Expanded Academic ASAP
69, ADVANCESINRADIOSCIENCE, Advances in Radio Science, 1684-9965, , 0, ADVANCES IN RADIO SCIENCE, , 1684-9973, Directory of Open Access Journals
70, ADVANCESINTRIBOLOGY, Advances in Tribology, 1687-5915, , 0, ADVANCES IN TRIBOLOGY, , 1687-5923, Applied Science & Technology Source
73, AFRICANJOURNALOFINFECTIOUSDISEASES, African Journal of Infectious Diseases, 2006-0165, , 0, African Journal of Infectious Diseases, , , PubMed Central
74, AGE, Age, 0161-9152, , 0, Age (Dordrecht, Netherlands), 2452-0756, 1574-4647, ABI/INFORM Collection
75, AGE, Age, 0161-9152, , 0, Age (Dordrecht, Netherlands), 2452-0756, 1574-4647, Nursing & Allied Health Database
76, AGE, Age, 0161-9152, , 0, Age (Dordrecht, Netherlands), 2452-0756, 1574-4647, PubMed Central
90, AIJJOURNALOFTECHNOLOGYANDDESIGN, AIJ Journal of Technology and Design, 1341-9463, , 0, AIJ Journal of Technology and Design, , 1881-8188, J-STAGE (Japan Science & Technology Information Aggregator, Electronic) Freely Available Titles - English
91, AINSHAMSENGINEERINGJOURNAL, Ain Shams Engineering Journal, 2090-4479, , 0, AIN SHAMS ENGINEERING JOURNAL, , , ScienceDirect Open Access Titles
92, AKCEINTERNATIONALJOURNALOFGRAPHSANDCOMBINATORICS, AKCE International Journal of Graphs and Combinatorics, 0972-8600, , 0, AKCE International Journal of Graphs and Combinatorics, , , ScienceDirect Open Access Titles
144, AMERICANJOURNALOFCANCERRESEARCH, American Journal of Cancer Research, 2156-6976, , 0, AMERICAN JOURNAL OF CANCER RESEARCH, , , PubMed Central
66, ADVANCESINMATHEMATICALPHYSICS, Advances in Mathematical Physics, 1687-9120, 1687-9139, 1, Advances in Mathematical Physics, , , Freely Accessible Journals
88, AGRICULTURALECONOMICSREVIEW, Agricultural Economics Review, 1109-2580, , 1, AGRICULTURAL ECONOMICS REVIEW, , , ABI/INFORM Collection
104, ALZHEIMERSANDDEMENTIA, Alzheimer's and Dementia, 1552-5260, 1552-5279, 1, Alzheimer's & Dementia : Diagnosis, Assessment & Disease Monitoring, , 2352-8729, PubMed Central
105, ALZHEIMERSANDDEMENTIA, Alzheimer's and Dementia, 1552-5260, 1552-5279, 1, Alzheimer's & Dementia: Diagnosis, Assessment & Disease Monitoring, , 2352-8729, ScienceDirect Open Access Titles
106, ALZHEIMERSANDDEMENTIA, Alzheimer's and Dementia, 1552-5260, 1552-5279, 1, Alzheimer's & Dementia: Translational Research & Clinical Interventions, , 2352-8737, ScienceDirect Open Access Titles
71, AFRICA, Africa, 0001-9720, , 2, Africa, , , PressReader
80, AGORA, Agora, 1516-1498, , 2, Agora, , , Freely Accessible Arts & Humanities Journals
89, AGRICULTURE, Agriculture, 0551-3677, 1338-4376, 2, Agriculture, , , PressReader
2, ACADEMIA, Academia, 1012-8255, , 3, Academia : Noticias del Cine Espanol, , , Freely Accessible General Interest Journals
9, ACTAACADEMICA, Acta Academica, 0587-2405, , 3, Acta Académica, 1017-7507, , Educator's Reference Complete
10, ACTAACADEMICA, Acta Academica, 0587-2405, , 3, Acta Académica, 1017-7507, , Educator's Reference Complete

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Display all the records from table using cursor
699
September 25, 2017 01:46PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.