Discover millions of ebooks, audiobooks, and so much more with a free trial

Only $11.99/month after trial. Cancel anytime.

The Making of a Doctor
The Making of a Doctor
The Making of a Doctor
Ebook1,329 pages15 hours

The Making of a Doctor

Rating: 0 out of 5 stars

()

Read preview

About this ebook

Part Three of Visual Basic.Net coding, as described in the texts at the back of volumes 11 and 12; a diary of a snapshot period when Segun was working as a locum junior doctor in different UK hospitals, along with some titbits and a Viewer for some of Segun’s certificates with sensitive materials blanked or blurred out using, also included in this volume, Visual Basic for Application for Excel codings formulated by Segun to view the diary and to view the certificates.
LanguageEnglish
Release dateNov 19, 2021
ISBN9781669815082
The Making of a Doctor

Read more from Julius Adebiyi Sodipo

Related to The Making of a Doctor

Related ebooks

Medical For You

View More

Related articles

Reviews for The Making of a Doctor

Rating: 0 out of 5 stars
0 ratings

0 ratings0 reviews

What did you think?

Tap to rate

Review must be at least 10 words

    Book preview

    The Making of a Doctor - Julius Adebiyi Sodipo

    Copyright © 2021 Julius Adebiyi Sodipo.

    All rights reserved. No part of this book may be used or reproduced by any means, graphic, electronic, or mechanical, including photocopying, recording, taping or by any information storage retrieval system without the written permission of the author except in the case of brief quotations embodied in critical articles and reviews.

    Balboa Press

    A Division of Hay House

    1663 Liberty Drive

    Bloomington, IN 47403

    www.balboapress.co.uk

    UK TFN: 0800 0148647 (Toll Free inside the UK)

    UK Local: (02) 0369 56325 (+44 20 3695 6325 from outside the UK)

    Because of the dynamic nature of the Internet, any web addresses or links contained in this book may have changed since publication and may no longer be valid. The views expressed in this work are solely those of the author and do not necessarily reflect the views of the publisher, and the publisher hereby disclaims any responsibility for them.

    The author of this book does not dispense medical advice or prescribe the use of any technique as a form of treatment for physical, emotional, or medical problems without the advice of a physician, either directly or indirectly. The intent of the author is only to offer information of a general nature to help you in your quest for emotional and spiritual well-being. In the event you use any of the information in this book for yourself, which is your constitutional right, the author and the publisher assume no responsibility for your actions.

    Any people depicted in stock imagery provided by Getty Images are models, and such images are being used for illustrative purposes only.

    Certain stock imagery © Getty Images.

    ISBN: 978-1-6698-1507-5 (sc)

    ISBN: 978-1-6698-1509-9 (hc)

    ISBN: 978-1-6698-1508-2 (e)

    Balboa Press rev. date: 11/19/2021

    CONTENTS

    Dedication

    Appreciation

    AIM

    Introduction

    Experience of a solo GP (virtually) Practice in suburban England (Visual Basic.Net coding) Part 3

    VBA (Visual Basic for Application) for Excel – Diary, Certificates (with sensitive details blanked or blurred out) and Programming Codes in VBA for Excel to run forms to view diary part of 1991 and to view the certificates one at a time with some information

    DEDICATION

    I dedicate this book to my four sons:

    Julius Adedeji, John Adesola, Isaac Adetokunbo and Johnson Adeyinka;

    their mother Gloria Adanma;

    to the memory of my:

    father’s father Papa (Chief) Isaac Omolaja Sodipo;

    father’s mother Madam Bilewunmi-omo Sodipo (alias Iya Ita-oloti);

    mother’s mother Nee Alice Aina Ero-Phillips (alias Iya Alakara);

    mother Madam (Chief) Harriet Olufunke Ibidunni Sodipo

    father, Dr (Chief) John Adewunmi Akanbi Sodipo.

    APPRECIATION

    I will like to thank my wife, Gloria Adanma (Nee Okoroafor), for showing fleeting interests during the production of the whole project and to thank my son, Isaac Adetokunbo, for editing and proof-reading the book.

    AIM

    Any proceeds from the sale(s) or distribution of this book should be used in setting up a Fund, which should be invested in a safe investment. This fund should be called Dr Julius Adebiyi Sodipo’s Fund.

    All the proceeds being generated from the sale of the book (or project) as well as all the proceeds from his estate should be deposited as Capital into the fund. The managers of the Estate Fund should not get more than 10% of the income generated by the Fund each year. The proceeds in the Fund should be invested in a relatively safe investment and what is generated should be called the Fund Income.

    So, should any of the remaining of my estate, after deduction of any debts and taxes should be added to the Dr Julius Adebiyi Sodipo’s Fund. The monies in the fund should be distributed from time to time occasionally but regularly to my biological grandchildren, biological great grandchildren, biological great great grandchildren, and biological generations yet to be born with no conditions attached. For example, for those who are eligible i.e., my biological descendants, 30 percent of the yearly income should be distributed equally yearly rather than 5 percent monthly. Those who are managing the Fund and its distribution should receive 5 to 10 percent of the yearly income, as appropriate to use in maintaining the fund and as their fees.

    The remaining 90% (or 95%) of the yearly income generated by the Estate Fund, reiterated here, should be equally divided between the biological posterity of Dr Julius Adebiyi Sodipo for generations to come including those yet unborn for as long as possible as far as the Estate exists.

    The division of the Estate Fund’s income should be as follows:

    Each member of his (my) biological posterity should get their own share from the age of 30 years old until the age of 55 years old, or they are no longer alive if this should happen earlier. As reiterated earlier their own share should be given to them yearly or more frequently if the managers feel it is in the best interest of the recipient to do so.

    An independent legal firm (team) mutually agreeable to most of the stakeholders must be employed. The legal firm is to ensure the smooth running by the Fund Managers, to ensure that the managers keep to the protocol set out above or not to significantly deviate from it. The legal team should receive 5% of the yearly income of the fund as their renumeration.

    INTRODUCTION

    This idea and realism of writing this book came to me to write a brief overview of Segun as a teenager in his country of birth of Nigeria and to travel through his journey from then until about his retirement as a doctor.

    There will be inevitable gaps, for which Segun whole-heartedly apologises.

    A sizeable amount is allocated to life before his university days. There is a noticeable abrupt end and allocation of the book towards his experience as a medical student. This is done on purpose in view of the way Segun felt and still feels being unfairly treated towards the end of his period as a student in the University.

    Efforts to introduce his experiences as a doctor are deliberate and apologies for any perceived idea of turning the contents of the book to more of science. Segun feels this is necessary to be able to show his experiences and knowledge as a medical doctor.

    125837.png

    Experience of a solo GP (virtually) Practice in suburban England (Visual Basic.Net coding) Part 3

    ‘SETTING OUT THE DATA IN THE sqlquery ARRAY & PICKING THE APPROPRIATE ONE

    query(0) = SELECT * FROM May2006 WHERE Notes LIKE ‘%c%’

    query(1) = SELECT * FROM (SELECT * FROM May2006 UNION SELECT * FROM May2007)

    query(2) = SELECT TOP 10 * FROM (SELECT * FROM May2006 WHERE Diagnosis IN (SELECT Diagnosis FROM May2007 ORDER BY Diagnosis) ORDER BY Diagnosis)

    query(3) = SELECT * FROM May2006 WHERE TimeIn NOT BETWEEN 1050 AND 1730

    query(4) = SELECT * FROM May2006 WHERE Complaints IN (SELECT Complaints FROM May2007)

    query(5) = SELECT * FROM May2006 WHERE Diagnosis LIKE ‘%ref%’ OR Complaints LIKE ‘%ref%’ OR Treatments LIKE ‘%ref%’ OR Notes LIKE ‘%ref%’

    query(6) = Select * FROM May2006 WHERE SurgeryDate BETWEEN ‘01.05.06’ AND ‘08.05.06’

    query(7) = SELECT * FROM May2006 WHERE SurgeryDate BETWEEN ‘08.05.06’ AND ‘15.05.06’

    query(8) = SELECT * FROM May2006 WHERE SurgeryDate BETWEEN ‘15.05.06’ AND ‘22.05.06’

    query(9) = SELECT * FROM May2006 WHERE SurgeryDate BETWEEN ‘22.05.06’ AND ‘32.05.06’

    query(10) = SELECT * FROM May2006 A WHERE EXISTS (SELECT B.Treatments, B.Complaints FROM May2007 B WHERE (A.Complaints = B.Complaints OR A.Treatments = B.Treatments) AND A.Notes <> B.Notes AND A.Complaints <> ‘’ AND B.Complaints <> ‘’ AND A.Treatments <> ‘’ AND B.Treatments <> ‘’ AND A.Notes <> ‘’ AND B.Notes <> ‘’ AND A.Diagnosis <> ‘’ AND B.Diagnosis <> ‘’)

    query(11) = SELECT * FROM May2006 A WHERE EXISTS (SELECT * FROM May2007 B WHERE (A.Notes = B.Notes Or A.Treatments = B.Treatments OR A.DateOfBirth = B.DateOfBIrth) AND A.Notes <> ‘’ AND B.Notes <> ‘’ AND A.Treatments <> ‘’ AND B.Treatments <> ‘’)

    query(12) = SELECT * FROM May2006 WHERE Diagnosis IN (SELECT Diagnosis FROM May2007)

    query(13) = SELECT * FROM May2006 WHERE Treatments IN (SELECT Treatments FROM May2007 WHERE Notes <> ‘’) AND Notes <> ‘’

    query(14) = SELECT * FROM May2006 WHERE Complaints IN (SELECT Complaints FROM May2007)

    query(15) = SELECT * FROM May2006 WHERE Complaints IN (SELECT Complaints FROM May2007 WHERE (TimeOut - TimeIn > 10 AND TimeOut - TimeIn < 40)) AND (TimeOut - TimeIn > 10 AND TimeOut - TimeIn < 40)

    query(16) = SELECT * FROM May2006 WHERE Diagnosis IN (SELECT Diagnosis FROM May2007)

    query(17) = SELECT * FROM May2006 UNION SELECT * FROM May2007

    query(18) = SELECT * FROM (SELECT * FROM May2006 WHERE Diagnosis = ‘URTI’ UNION SELECT * FROM May2007 WHERE Diagnosis = ‘URTI’)

    query(19) = SELECT SurgeryDate, DateOfBirth, Sex, Diagnosis, TimeIn, TimeOut, Complaints, Treatments, Initials, IIF((Notes NOT LIKE ‘’), Notes, ‘No notes entry’) AS Notes FROM May2006

    query(20) = SELECT TOP 50 * FROM May2006 ORDER BY TimeOut DESC

    query(21) = SELECT TOP 20 * FROM May2006 ORDER BY TimeIn

    query(22) = SELECT * FROM May2007 WHERE Notes LIKE ‘%c%’

    query(23) = SELECT * FROM (SELECT * FROM May2007 UNION SELECT * FROM May2008)

    query(24) = SELECT TOP 10 * FROM (SELECT * FROM May2007 WHERE Diagnosis IN (SELECT Diagnosis FROM May2008 ORDER BY Diagnosis) ORDER BY Diagnosis)

    query(25) = SELECT * FROM May2007 WHERE TimeIn NOT BETWEEN 1050 AND 1730

    query(26) = SELECT * FROM May2007 WHERE Complaints IN (SELECT Complaints FROM May2008)

    query(27) = SELECT * FROM May2007 WHERE Diagnosis LIKE ‘%ref%’ OR Complaints LIKE ‘%ref%’ OR Treatments LIKE ‘%ref%’ OR Notes LIKE ‘%ref%’

    query(28) = Select * FROM May2007 WHERE SurgeryDate BETWEEN ‘01.05.07’ AND ‘08.05.07’

    query(29) = SELECT * FROM May2007 WHERE SurgeryDate BETWEEN ‘08.05.07’ AND ‘15.05.07’

    query(30) = SELECT * FROM May2007 WHERE SurgeryDate BETWEEN ‘15.05.07’ AND ‘22.05.07’

    query(31) = SELECT * FROM May2007 WHERE SurgeryDate BETWEEN ‘22.05.07’ AND ‘32.05.07’

    query(32) = SELECT * FROM May2007 A WHERE EXISTS (SELECT B.Treatments, B.Complaints FROM May2008 B WHERE (A.Complaints = B.Complaints OR A.Treatments = B.Treatments) AND A.Notes <> B.Notes AND A.Complaints <> ‘’ AND B.Complaints <> ‘’ AND A.Treatments <> ‘’ AND B.Treatments <> ‘’ AND A.Notes <> ‘’ AND B.Notes <> ‘’ AND A.Diagnosis <> ‘’ AND B.Diagnosis <> ‘’)

    query(33) = SELECT * FROM May2007 A WHERE EXISTS (SELECT * FROM May2008 B WHERE (A.Notes = B.Notes Or A.Treatments = B.Treatments OR A.DateOfBirth = B.DateOfBIrth) AND A.Notes <> ‘’ AND B.Notes <> ‘’ AND A.Treatments <> ‘’ AND B.Treatments <> ‘’)

    query(34) = SELECT * FROM May2007 WHERE Diagnosis IN (SELECT Diagnosis FROM May2008)

    query(35) = SELECT * FROM May2007 WHERE Treatments IN (SELECT Treatments FROM May2008 WHERE Notes <> ‘’) AND Notes <> ‘’

    query(36) = SELECT * FROM May2007 WHERE Complaints IN (SELECT Complaints FROM May2008)

    query(37) = SELECT * FROM May2007 WHERE Complaints IN (SELECT Complaints FROM May2008 WHERE (TimeOut - TimeIn > 10 AND TimeOut - TimeIn < 40)) AND (TimeOut - TimeIn > 10 AND TimeOut - TimeIn < 40)

    query(38) = SELECT * FROM May2007 WHERE Diagnosis IN (SELECT Diagnosis FROM May2008)

    query(39) = SELECT * FROM May2007 UNION SELECT * FROM May2008

    query(40) = SELECT * FROM (SELECT * FROM May2007 WHERE Diagnosis = ‘URTI’ UNION SELECT * FROM May2008 WHERE Diagnosis = ‘URTI’)

    query(41) = SELECT SurgeryDate, DateOfBirth, Sex, Diagnosis, TimeIn, TimeOut, Complaints, Treatments, Initials, IIF((Notes NOT LIKE ‘’), Notes, ‘No notes entry’) AS Notes FROM May2007

    query(42) = SELECT TOP 50 * FROM May2007 ORDER BY TimeOut DESC

    query(43) = SELECT TOP 20 * FROM May2007 ORDER BY TimeIn

    query(44) = SELECT * FROM May2008 WHERE Notes LIKE ‘%c%’

    query(45) = SELECT * FROM (SELECT * FROM May2008 UNION SELECT * FROM May2009)

    query(46) = SELECT TOP 10 * FROM (SELECT * FROM May2008 WHERE Diagnosis IN (SELECT Diagnosis FROM May2009 ORDER BY Diagnosis) ORDER BY Diagnosis)

    query(47) = SELECT * FROM May2008 WHERE TimeIn NOT BETWEEN 1050 AND 1730

    query(48) = SELECT * FROM May2008 WHERE Complaints IN (SELECT Complaints FROM May2009)

    query(49) = SELECT * FROM May2008 WHERE Diagnosis LIKE ‘%ref%’ OR Complaints LIKE ‘%ref%’ OR Treatments LIKE ‘%ref%’ OR Notes LIKE ‘%ref%’

    query(50) = Select * FROM May2008 WHERE SurgeryDate BETWEEN ‘01.05.08’ AND ‘08.05.08’

    query(51) = SELECT * FROM May2008 WHERE SurgeryDate BETWEEN ‘08.05.08’ AND ‘15.05.08’

    query(52) = SELECT * FROM May2008 WHERE SurgeryDate BETWEEN ‘15.05.08’ AND ‘22.05.08’

    query(53) = SELECT * FROM May2008 WHERE SurgeryDate BETWEEN ‘22.05.08’ AND ‘32.05.08’

    query(54) = SELECT * FROM May2008 A WHERE EXISTS (SELECT B.Treatments, B.Complaints FROM May2009 B WHERE (A.Complaints = B.Complaints OR A.Treatments = B.Treatments) AND A.Notes <> B.Notes AND A.Complaints <> ‘’ AND B.Complaints <> ‘’ AND A.Treatments <> ‘’ AND B.Treatments <> ‘’ AND A.Notes <> ‘’ AND B.Notes <> ‘’ AND A.Diagnosis <> ‘’ AND B.Diagnosis <> ‘’)

    query(55) = SELECT * FROM May2008 A WHERE EXISTS (SELECT * FROM May2009 B WHERE (A.Notes = B.Notes Or A.Treatments = B.Treatments OR A.DateOfBirth = B.DateOfBIrth) AND A.Notes <> ‘’ AND B.Notes <> ‘’ AND A.Treatments <> ‘’ AND B.Treatments <> ‘’)

    query(56) = SELECT * FROM May2008 WHERE Diagnosis IN (SELECT Diagnosis FROM May2009)

    query(57) = SELECT * FROM May2008 WHERE Treatments IN (SELECT Treatments FROM May2009 WHERE Notes <> ‘’) AND Notes <> ‘’

    query(58) = SELECT * FROM May2008 WHERE Complaints IN (SELECT Complaints FROM May2009)

    query(59) = SELECT * FROM May2008 WHERE Complaints IN (SELECT Complaints FROM May2009 WHERE (TimeOut - TimeIn > 10 AND TimeOut - TimeIn < 40)) AND (TimeOut - TimeIn > 10 AND TimeOut - TimeIn < 40)

    query(60) = SELECT * FROM May2008 WHERE Diagnosis IN (SELECT Diagnosis FROM May2009)

    query(61) = SELECT * FROM May2008 UNION SELECT * FROM May2009

    query(62) = SELECT * FROM (SELECT * FROM May2008 WHERE Diagnosis = ‘URTI’ UNION SELECT * FROM May2009 WHERE Diagnosis = ‘URTI’)

    query(63) = SELECT SurgeryDate, DateOfBirth, Sex, Diagnosis, TimeIn, TimeOut, Complaints, Treatments, Initials, IIF((Notes NOT LIKE ‘’), Notes, ‘No notes entry’) AS Notes FROM May2008

    query(64) = SELECT TOP 50 * FROM May2008 ORDER BY TimeOut DESC

    query(65) = SELECT TOP 20 * FROM May2008 ORDER BY TimeIn

    query(66) = SELECT * FROM May2009 WHERE Notes LIKE ‘%c%’

    query(67) = SELECT * FROM (SELECT * FROM May2009 UNION SELECT * FROM May2010)

    query(68) = SELECT TOP 10 * FROM (SELECT * FROM May2009 WHERE Diagnosis IN (SELECT Diagnosis FROM May2010 ORDER BY Diagnosis) ORDER BY Diagnosis)

    query(69) = SELECT * FROM May2009 WHERE TimeIn NOT BETWEEN 1050 AND 1730

    query(70) = SELECT * FROM May2009 WHERE Complaints IN (SELECT Complaints FROM May2010)

    query(71) = SELECT * FROM May2009 WHERE Diagnosis LIKE ‘%ref%’ OR Complaints LIKE ‘%ref%’ OR Treatments LIKE ‘%ref%’ OR Notes LIKE ‘%ref%’

    query(72) = Select * FROM May2009 WHERE SurgeryDate BETWEEN ‘01.05.09’ AND ‘08.05.09’

    query(73) = SELECT * FROM May2009 WHERE SurgeryDate BETWEEN ‘08.05.09’ AND ‘15.05.09’

    query(74) = SELECT * FROM May2009 WHERE SurgeryDate BETWEEN ‘15.05.09’ AND ‘22.05.09’

    query(75) = SELECT * FROM May2009 WHERE SurgeryDate BETWEEN ‘22.05.09’ AND ‘32.05.09’

    query(76) = SELECT * FROM May2009 A WHERE EXISTS (SELECT B.Treatments, B.Complaints FROM May2010 B WHERE (A.Complaints = B.Complaints OR A.Treatments = B.Treatments) AND A.Notes <> B.Notes AND A.Complaints <> ‘’ AND B.Complaints <> ‘’ AND A.Treatments <> ‘’ AND B.Treatments <> ‘’ AND A.Notes <> ‘’ AND B.Notes <> ‘’ AND A.Diagnosis <> ‘’ AND B.Diagnosis <> ‘’)

    query(77) = SELECT * FROM May2009 A WHERE EXISTS (SELECT * FROM May2010 B WHERE (A.Notes = B.Notes Or A.Treatments = B.Treatments OR A.DateOfBirth = B.DateOfBIrth) AND A.Notes <> ‘’ AND B.Notes <> ‘’ AND A.Treatments <> ‘’ AND B.Treatments <> ‘’)

    query(78) = SELECT * FROM May2009 WHERE Diagnosis IN (SELECT Diagnosis FROM May2010)

    query(79) = SELECT * FROM May2009 WHERE Treatments IN (SELECT Treatments FROM May2010 WHERE Notes <> ‘’) AND Notes <> ‘’

    query(80) = SELECT * FROM May2009 WHERE Complaints IN (SELECT Complaints FROM May2010)

    query(81) = SELECT * FROM May2009 WHERE Complaints IN (SELECT Complaints FROM May2010 WHERE (TimeOut - TimeIn > 10 AND TimeOut - TimeIn < 40)) AND (TimeOut - TimeIn > 10 AND TimeOut - TimeIn < 40)

    query(82) = SELECT * FROM May2009 WHERE Diagnosis IN (SELECT Diagnosis FROM May2010)

    query(83) = SELECT * FROM May2009 UNION SELECT * FROM May2010

    query(84) = SELECT * FROM (SELECT * FROM May2009 WHERE Diagnosis = ‘URTI’ UNION SELECT * FROM May2010 WHERE Diagnosis = ‘URTI’)

    query(85) = SELECT SurgeryDate, DateOfBirth, Sex, Diagnosis, TimeIn, TimeOut, Complaints, Treatments, Initials, IIF((Notes NOT LIKE ‘’), Notes, ‘No notes entry’) AS Notes FROM May2009

    query(86) = SELECT TOP 50 * FROM May2009 ORDER BY TimeOut DESC

    query(87) = SELECT TOP 20 * FROM May2009 ORDER BY TimeIn

    query(88) = SELECT * FROM May2010 WHERE Notes LIKE ‘%c%’

    query(89) = SELECT * FROM (SELECT * FROM May2010 UNION SELECT * FROM May2011)

    query(90) = SELECT TOP 10 * FROM (SELECT * FROM May2010 WHERE Diagnosis IN (SELECT Diagnosis FROM May2011 ORDER BY Diagnosis) ORDER BY Diagnosis)

    query(91) = SELECT * FROM May2010 WHERE TimeIn NOT BETWEEN 1050 AND 1730

    query(92) = SELECT * FROM May2010 WHERE Complaints IN (SELECT Complaints FROM May2011)

    query(93) = SELECT * FROM May2010 WHERE Diagnosis LIKE ‘%ref%’ OR Complaints LIKE ‘%ref%’ OR Treatments LIKE ‘%ref%’ OR Notes LIKE ‘%ref%’

    query(94) = Select * FROM May2010 WHERE SurgeryDate BETWEEN ‘01.05.10’ AND ‘08.05.10’

    query(95) = SELECT * FROM May2010 WHERE SurgeryDate BETWEEN ‘08.05.10’ AND ‘15.05.10’

    query(96) = SELECT * FROM May2010 WHERE SurgeryDate BETWEEN ‘15.05.10’ AND ‘22.05.10’

    query(97) = SELECT * FROM May2010 WHERE SurgeryDate BETWEEN ‘22.05.10’ AND ‘32.05.10’

    query(98) = SELECT * FROM May2010 A WHERE EXISTS (SELECT B.Treatments, B.Complaints FROM May2011 B WHERE (A.Complaints = B.Complaints OR A.Treatments = B.Treatments) AND A.Notes <> B.Notes AND A.Complaints <> ‘’ AND B.Complaints <> ‘’ AND A.Treatments <> ‘’ AND B.Treatments <> ‘’ AND A.Notes <> ‘’ AND B.Notes <> ‘’ AND A.Diagnosis <> ‘’ AND B.Diagnosis <> ‘’)

    query(99) = SELECT * FROM May2010 A WHERE EXISTS (SELECT * FROM May2011 B WHERE (A.Notes = B.Notes Or A.Treatments = B.Treatments OR A.DateOfBirth = B.DateOfBIrth) AND A.Notes <> ‘’ AND B.Notes <> ‘’ AND A.Treatments <> ‘’ AND B.Treatments <> ‘’)

    query(100) = SELECT * FROM May2010 WHERE Diagnosis IN (SELECT Diagnosis FROM May2011)

    query(101) = SELECT * FROM May2010 WHERE Treatments IN (SELECT Treatments FROM May2011 WHERE Notes <> ‘’) AND Notes <> ‘’

    query(102) = SELECT * FROM May2010 WHERE Complaints IN (SELECT Complaints FROM May2011)

    query(103) = SELECT * FROM May2010 WHERE Complaints IN (SELECT Complaints FROM May2011 WHERE (TimeOut - TimeIn > 10 AND TimeOut - TimeIn < 40)) AND (TimeOut - TimeIn > 10 AND TimeOut - TimeIn < 40)

    query(104) = SELECT * FROM May2010 WHERE Diagnosis IN (SELECT Diagnosis FROM May2011)

    query(105) = SELECT * FROM May2010 UNION SELECT * FROM May2011

    query(106) = SELECT * FROM (SELECT * FROM May2010 WHERE Diagnosis = ‘URTI’ UNION SELECT * FROM May2011 WHERE Diagnosis = ‘URTI’)

    query(107) = SELECT SurgeryDate, DateOfBirth, Sex, Diagnosis, TimeIn, TimeOut, Complaints, Treatments, Initials, IIF((Notes NOT LIKE ‘’), Notes, ‘No notes entry’) AS Notes FROM May2010

    query(108) = SELECT TOP 50 * FROM May2010 ORDER BY TimeOut DESC

    query(109) = SELECT TOP 20 * FROM May2010 ORDER BY TimeIn

    query(110) = SELECT * FROM May2011 WHERE Notes LIKE ‘%c%’

    query(111) = SELECT * FROM (SELECT * FROM May2011 UNION SELECT * FROM May2012)

    query(112) = SELECT TOP 10 * FROM (SELECT * FROM May2011 WHERE Diagnosis IN (SELECT Diagnosis FROM May2012 ORDER BY Diagnosis) ORDER BY Diagnosis)

    query(113) = SELECT * FROM May2011 WHERE TimeIn NOT BETWEEN 1050 AND 1730

    query(114) = SELECT * FROM May2011 WHERE Complaints IN (SELECT Complaints FROM May2012)

    query(115) = SELECT * FROM May2011 WHERE Diagnosis LIKE ‘%ref%’ OR Complaints LIKE ‘%ref%’ OR Treatments LIKE ‘%ref%’ OR Notes LIKE ‘%ref%’

    query(116) = Select * FROM May2011 WHERE SurgeryDate BETWEEN ‘01.05.11’ AND ‘08.05.11’

    query(117) = SELECT * FROM May2011 WHERE SurgeryDate BETWEEN ‘08.05.11’ AND ‘15.05.11’

    query(118) = SELECT * FROM May2011 WHERE SurgeryDate BETWEEN ‘15.05.11’ AND ‘22.05.11’

    query(119) = SELECT * FROM May2011 WHERE SurgeryDate BETWEEN ‘22.05.11’ AND ‘32.05.11’

    query(120) = SELECT * FROM May2011 A WHERE EXISTS (SELECT B.Treatments, B.Complaints FROM May2012 B WHERE (A.Complaints = B.Complaints OR A.Treatments = B.Treatments) AND A.Notes <> B.Notes AND A.Complaints <> ‘’ AND B.Complaints <> ‘’ AND A.Treatments <> ‘’ AND B.Treatments <> ‘’ AND A.Notes <> ‘’ AND B.Notes <> ‘’ AND A.Diagnosis <> ‘’ AND B.Diagnosis <> ‘’)

    query(121) = SELECT * FROM May2011 A WHERE EXISTS (SELECT * FROM May2012 B WHERE (A.Notes = B.Notes Or A.Treatments = B.Treatments OR A.DateOfBirth = B.DateOfBIrth) AND A.Notes <> ‘’ AND B.Notes <> ‘’ AND A.Treatments <> ‘’ AND B.Treatments <> ‘’)

    query(122) = SELECT * FROM May2011 WHERE Diagnosis IN (SELECT Diagnosis FROM May2012)

    query(123) = SELECT * FROM May2011 WHERE Treatments IN (SELECT Treatments FROM May2012 WHERE Notes <> ‘’) AND Notes <> ‘’

    query(124) = SELECT * FROM May2011 WHERE Complaints IN (SELECT Complaints FROM May2012)

    query(125) = SELECT * FROM May2011 WHERE Complaints IN (SELECT Complaints FROM May2012 WHERE (TimeOut - TimeIn > 10 AND TimeOut - TimeIn < 40)) AND (TimeOut - TimeIn > 10 AND TimeOut - TimeIn < 40)

    query(126) = SELECT * FROM May2011 WHERE Diagnosis IN (SELECT Diagnosis FROM May2012)

    query(127) = SELECT * FROM May2011 UNION SELECT * FROM May2012

    query(128) = SELECT * FROM (SELECT * FROM May2011 WHERE Diagnosis = ‘URTI’ UNION SELECT * FROM May2012 WHERE Diagnosis = ‘URTI’)

    query(129) = SELECT SurgeryDate, DateOfBirth, Sex, Diagnosis, TimeIn, TimeOut, Complaints, Treatments, Initials, IIF((Notes NOT LIKE ‘’), Notes, ‘No notes entry’) AS Notes FROM May2011

    query(130) = SELECT TOP 50 * FROM May2011 ORDER BY TimeOut DESC

    query(131) = SELECT TOP 20 * FROM May2011 ORDER BY TimeIn

    query(132) = SELECT * FROM May2012 WHERE Notes LIKE ‘%c%’

    query(133) = SELECT * FROM (SELECT * FROM May2012 UNION SELECT * FROM May2013)

    query(134) = SELECT TOP 10 * FROM (SELECT * FROM May2012 WHERE Diagnosis IN (SELECT Diagnosis FROM May2013 ORDER BY Diagnosis) ORDER BY Diagnosis)

    query(135) = SELECT * FROM May2012 WHERE TimeIn NOT BETWEEN 1050 AND 1730

    query(136) = SELECT * FROM May2012 WHERE Complaints IN (SELECT Complaints FROM May2013)

    query(137) = SELECT * FROM May2012 WHERE Diagnosis LIKE ‘%ref%’ OR Complaints LIKE ‘%ref%’ OR Treatments LIKE ‘%ref%’ OR Notes LIKE ‘%ref%’

    query(138) = Select * FROM May2012 WHERE SurgeryDate BETWEEN ‘01.05.12’ AND ‘08.05.12’

    query(139) = SELECT * FROM May2012 WHERE SurgeryDate BETWEEN ‘08.05.12’ AND ‘15.05.12’

    query(140) = SELECT * FROM May2012 WHERE SurgeryDate BETWEEN ‘15.05.12’ AND ‘22.05.12’

    query(141) = SELECT * FROM May2012 WHERE SurgeryDate BETWEEN ‘22.05.12’ AND ‘32.05.12’

    query(142) = SELECT * FROM May2012 A WHERE EXISTS (SELECT B.Treatments, B.Complaints FROM May2013 B WHERE (A.Complaints = B.Complaints OR A.Treatments = B.Treatments) AND A.Notes <> B.Notes AND A.Complaints <> ‘’ AND B.Complaints <> ‘’ AND A.Treatments <> ‘’ AND B.Treatments <> ‘’ AND A.Notes <> ‘’ AND B.Notes <> ‘’ AND A.Diagnosis <> ‘’ AND B.Diagnosis <> ‘’)

    query(143) = SELECT * FROM May2012 A WHERE EXISTS (SELECT * FROM May2013 B WHERE (A.Notes = B.Notes Or A.Treatments = B.Treatments OR A.DateOfBirth = B.DateOfBIrth) AND A.Notes <> ‘’ AND B.Notes <> ‘’ AND A.Treatments <> ‘’ AND B.Treatments <> ‘’)

    query(144) = SELECT * FROM May2012 WHERE Diagnosis IN (SELECT Diagnosis FROM May2013)

    query(145) = SELECT * FROM May2012 WHERE Treatments IN (SELECT Treatments FROM May2013 WHERE Notes <> ‘’) AND Notes <> ‘’

    query(146) = SELECT * FROM May2012 WHERE Complaints IN (SELECT Complaints FROM May2013)

    query(147) = SELECT * FROM May2012 WHERE Complaints IN (SELECT Complaints FROM May2013 WHERE (TimeOut - TimeIn > 10 AND TimeOut - TimeIn < 40)) AND (TimeOut - TimeIn > 10 AND TimeOut - TimeIn < 40)

    query(148) = SELECT * FROM May2012 WHERE Diagnosis IN (SELECT Diagnosis FROM May2013)

    query(149) = SELECT * FROM May2012 UNION SELECT * FROM May2013

    query(150) = SELECT * FROM (SELECT * FROM May2012 WHERE Diagnosis = ‘URTI’ UNION SELECT * FROM May2013 WHERE Diagnosis = ‘URTI’)

    query(151) = SELECT SurgeryDate, DateOfBirth, Sex, Diagnosis, TimeIn, TimeOut, Complaints, Treatments, Initials, IIF((Notes NOT LIKE ‘’), Notes, ‘No notes entry’) AS Notes FROM May2012

    query(152) = SELECT TOP 50 * FROM May2012 ORDER BY TimeOut DESC

    query(153) = SELECT TOP 20 * FROM May2012 ORDER BY TimeIn

    query(154) = SELECT * FROM May2013 WHERE Notes LIKE ‘%c%’

    query(155) = SELECT * FROM (SELECT * FROM May2013 UNION SELECT * FROM May2005)

    query(156) = SELECT TOP 10 * FROM (SELECT * FROM May2013 WHERE Diagnosis IN (SELECT Diagnosis FROM May2005 ORDER BY Diagnosis) ORDER BY Diagnosis)

    query(157) = SELECT * FROM May2013 WHERE TimeIn NOT BETWEEN 1050 AND 1730

    query(158) = SELECT * FROM May2013 WHERE Complaints IN (SELECT Complaints FROM May2005)

    query(159) = SELECT * FROM May2013 WHERE Diagnosis LIKE ‘%ref%’ OR Complaints LIKE ‘%ref%’ OR Treatments LIKE ‘%ref%’ OR Notes LIKE ‘%ref%’

    query(160) = Select * FROM May2013 WHERE SurgeryDate BETWEEN ‘01.05.13’ AND ‘08.05.13’

    query(161) = SELECT * FROM May2013 WHERE SurgeryDate BETWEEN ‘08.05.13’ AND ‘15.05.13’

    query(162) = SELECT * FROM May2013 WHERE SurgeryDate BETWEEN ‘15.05.13’ AND ‘22.05.13’

    query(163) = SELECT * FROM May2013 WHERE SurgeryDate BETWEEN ‘22.05.13’ AND ‘32.05.13’

    query(164) = SELECT * FROM May2013 A WHERE EXISTS (SELECT B.Treatments, B.Complaints FROM May2005 B WHERE (A.Complaints = B.Complaints OR A.Treatments = B.Treatments) AND A.Notes <> B.Notes AND A.Complaints <> ‘’ AND B.Complaints <> ‘’ AND A.Treatments <> ‘’ AND B.Treatments <> ‘’ AND A.Notes <> ‘’ AND B.Notes <> ‘’ AND A.Diagnosis <> ‘’ AND B.Diagnosis <> ‘’)

    query(165) = SELECT * FROM May2013 A WHERE EXISTS (SELECT * FROM May2005 B WHERE (A.Notes = B.Notes Or A.Treatments = B.Treatments OR A.DateOfBirth = B.DateOfBIrth) AND A.Notes <> ‘’ AND B.Notes <> ‘’ AND A.Treatments <> ‘’ AND B.Treatments <> ‘’)

    query(166) = SELECT * FROM May2013 WHERE Diagnosis IN (SELECT Diagnosis FROM May2005)

    query(167) = SELECT * FROM May2013 WHERE Treatments IN (SELECT Treatments FROM May2005 WHERE Notes <> ‘’) AND Notes <> ‘’

    query(168) = SELECT * FROM May2013 WHERE Complaints IN (SELECT Complaints FROM May2005)

    query(169) = SELECT * FROM May2013 WHERE Complaints IN (SELECT Complaints FROM May2005 WHERE (TimeOut - TimeIn > 10 AND TimeOut - TimeIn < 40)) AND (TimeOut - TimeIn > 10 AND TimeOut - TimeIn < 40)

    query(170) = SELECT * FROM May2013 WHERE Diagnosis IN (SELECT Diagnosis FROM May2005)

    query(171) = SELECT * FROM May2013 UNION SELECT * FROM May2005

    query(172) = SELECT * FROM (SELECT * FROM May2013 WHERE Diagnosis = ‘URTI’ UNION SELECT * FROM May2005 WHERE Diagnosis = ‘URTI’)

    query(173) = SELECT SurgeryDate, DateOfBirth, Sex, Diagnosis, TimeIn, TimeOut, Complaints, Treatments, Initials, IIF((Notes NOT LIKE ‘’), Notes, ‘No notes entry’) AS Notes FROM May2013

    query(174) = SELECT TOP 50 * FROM May2013 ORDER BY TimeOut DESC

    query(175) = SELECT TOP 20 * FROM May2013 ORDER BY TimeIn

    query(176) = SELECT * FROM May2014 WHERE Notes LIKE ‘%c%’

    query(177) = SELECT * FROM (SELECT * FROM May2014 UNION SELECT * FROM May2015)

    query(178) = SELECT TOP 10 * FROM (SELECT * FROM May2014 WHERE Diagnosis IN (SELECT Diagnosis FROM May2015 ORDER BY Diagnosis) ORDER BY Diagnosis)

    query(179) = SELECT * FROM May2014 WHERE TimeIn NOT BETWEEN 1050 AND 1730

    query(180) = SELECT * FROM May2014 WHERE Complaints IN (SELECT Complaints FROM May2015)

    query(181) = SELECT * FROM May2014 WHERE Diagnosis LIKE ‘%ref%’ OR Complaints LIKE ‘%ref%’ OR Treatments LIKE ‘%ref%’ OR Notes LIKE ‘%ref%’

    query(182) = Select * FROM May2014 WHERE SurgeryDate BETWEEN ‘01.05.14’ AND ‘08.05.14’

    query(183) = SELECT * FROM May2014 WHERE SurgeryDate BETWEEN ‘08.05.14’ AND ‘15.05.14’

    query(184) = SELECT * FROM May2014 WHERE SurgeryDate BETWEEN ‘15.05.14’ AND ‘22.05.14’

    query(185) = SELECT * FROM May2014 WHERE SurgeryDate BETWEEN ‘22.05.14’ AND ‘32.05.14’

    query(186) = SELECT * FROM May2014 A WHERE EXISTS (SELECT B.Treatments, B.Complaints FROM May2015 B WHERE (A.Complaints = B.Complaints OR A.Treatments = B.Treatments) AND A.Notes <> B.Notes AND A.Complaints <> ‘’ AND B.Complaints <> ‘’ AND A.Treatments <> ‘’ AND B.Treatments <> ‘’ AND A.Notes <> ‘’ AND B.Notes <> ‘’ AND A.Diagnosis <> ‘’ AND B.Diagnosis <> ‘’)

    query(187) = SELECT * FROM May2014 A WHERE EXISTS (SELECT * FROM May2015 B WHERE (A.Notes = B.Notes Or A.Treatments = B.Treatments OR A.DateOfBirth = B.DateOfBIrth) AND A.Notes <> ‘’ AND B.Notes <> ‘’ AND A.Treatments <> ‘’ AND B.Treatments <> ‘’)

    query(188) = SELECT * FROM May2014 WHERE Diagnosis IN (SELECT Diagnosis FROM May2015)

    query(189) = SELECT * FROM May2014 WHERE Treatments IN (SELECT Treatments FROM May2015 WHERE Notes <> ‘’) AND Notes <> ‘’

    query(190) = SELECT * FROM May2014 WHERE Complaints IN (SELECT Complaints FROM May2015)

    query(191) = SELECT * FROM May2014 WHERE Complaints IN (SELECT Complaints FROM May2015 WHERE (TimeOut - TimeIn > 10 AND TimeOut - TimeIn < 40)) AND (TimeOut - TimeIn > 10 AND TimeOut - TimeIn < 40)

    query(192) = SELECT * FROM May2014 WHERE Diagnosis IN (SELECT Diagnosis FROM May2015)

    query(193) = SELECT * FROM May2014 UNION SELECT * FROM May2015

    query(194) = SELECT * FROM (SELECT * FROM May2014 WHERE Diagnosis = ‘URTI’ UNION SELECT * FROM May2015 WHERE Diagnosis = ‘URTI’)

    query(195) = SELECT SurgeryDate, DateOfBirth, Sex, Diagnosis, TimeIn, TimeOut, Complaints, Treatments, Initials, IIF((Notes NOT LIKE ‘’), Notes, ‘No notes entry’) AS Notes FROM May2014

    query(196) = SELECT TOP 50 * FROM May2014 ORDER BY TimeOut DESC

    query(197) = SELECT TOP 20 * FROM May2014 ORDER BY TimeIn

    query(198) = SELECT * FROM May2015 WHERE Notes LIKE ‘%c%’

    query(199) = SELECT * FROM (SELECT * FROM May2015 UNION SELECT * FROM May2007)

    query(200) = SELECT TOP 10 * FROM (SELECT * FROM May2015 WHERE Diagnosis IN (SELECT Diagnosis FROM May2007 ORDER BY Diagnosis) ORDER BY Diagnosis)

    query(201) = SELECT * FROM May2015 WHERE TimeIn NOT BETWEEN 1050 AND 1730

    query(202) = SELECT * FROM May2015 WHERE Complaints IN (SELECT Complaints FROM May2006)

    query(203) = SELECT * FROM May2015 WHERE Diagnosis LIKE ‘%ref%’ OR Complaints LIKE ‘%ref%’ OR Treatments LIKE ‘%ref%’ OR Notes LIKE ‘%ref%’

    query(204) = Select * FROM May2015 WHERE SurgeryDate BETWEEN ‘01.05.15’ AND ‘08.05.15’

    query(205) = SELECT * FROM May2015 WHERE SurgeryDate BETWEEN ‘08.05.15’ AND ‘15.05.15’

    query(206) = SELECT * FROM May2015 WHERE SurgeryDate BETWEEN ‘15.05.15’ AND ‘22.05.15’

    query(207) = SELECT * FROM May2015 WHERE SurgeryDate BETWEEN ‘22.05.15’ AND ‘32.05.15’

    query(208) = SELECT * FROM May2015 A WHERE EXISTS (SELECT B.Treatments, B.Complaints FROM May2006 B WHERE (A.Complaints = B.Complaints OR A.Treatments = B.Treatments) AND A.Notes <> B.Notes AND A.Complaints <> ‘’ AND B.Complaints <> ‘’ AND A.Treatments <> ‘’ AND B.Treatments <> ‘’ AND A.Notes <> ‘’ AND B.Notes <> ‘’ AND A.Diagnosis <> ‘’ AND B.Diagnosis <> ‘’)

    query(209) = SELECT * FROM May2015 A WHERE EXISTS (SELECT * FROM May2006 B WHERE (A.Notes = B.Notes Or A.Treatments = B.Treatments OR A.DateOfBirth = B.DateOfBIrth) AND A.Notes <> ‘’ AND B.Notes <> ‘’ AND A.Treatments <> ‘’ AND B.Treatments <> ‘’)

    query(210) = SELECT * FROM May2015 WHERE Diagnosis IN (SELECT Diagnosis FROM May2006)

    query(211) = SELECT * FROM May2015 WHERE Treatments IN (SELECT Treatments FROM May2006 WHERE Notes <> ‘’) AND Notes <> ‘’

    query(212) = SELECT * FROM May2015 WHERE Complaints IN (SELECT Complaints FROM May2006)

    query(213) = SELECT * FROM May2015 WHERE Complaints IN (SELECT Complaints FROM May2006 WHERE (TimeOut - TimeIn > 10 AND TimeOut - TimeIn < 40)) AND (TimeOut - TimeIn > 10 AND TimeOut - TimeIn < 40)

    query(214) = SELECT * FROM May2015 WHERE Diagnosis IN (SELECT Diagnosis FROM May2006)

    query(215) = SELECT * FROM May2015 UNION SELECT * FROM May2006

    query(216) = SELECT * FROM (SELECT * FROM May2015 WHERE Diagnosis = ‘URTI’ UNION SELECT * FROM May2006 WHERE Diagnosis = ‘URTI’)

    query(217) = SELECT SurgeryDate, DateOfBirth, Sex, Diagnosis, TimeIn, TimeOut, Complaints, Treatments, Initials, IIF((Notes NOT LIKE ‘’), Notes, ‘No notes entry’)AS Notes FROM May2015

    query(218) = SELECT TOP 50 * FROM May2015 ORDER BY TimeOut DESC

    query(219) = SELECT TOP 20 * FROM May2015 ORDER BY TimeIn

    key_data_sqlResult = sqlResult(m)

    key_data_query = query(m)

    Next m

    ‘PASS THE SQL STRING AND CONNECTION OBJECT TO THE DATA_ADAPTER

    da = New OleDb.OleDbDataAdapter(key_data_query, con)

    ‘FILL THE DATASET WITH RECORDS FROM THE DATABASE TABLE

    da.Fill(ds, May_Consultations)

    ‘CLOSE THE DATABASE

    con.Close()

    ‘GET HOW MANY ROWS ARE IN THE DATABASE TABLE

    MaxRows = ds.Tables(May_Consultations).Rows.Count

    ‘SET A VAUE FOR THE INC VARIABLE

    inc = -1

    End Sub

    Private Sub RecordNumber()

    txtRecordNumber.Text = (Record & (inc + 1) & of & MaxRows & Records)

    End Sub

    Private Sub NavigateRecords()

    txtSurgeryDate.Text = ds.Tables(May_Consultations).Rows(inc).Item(0)

    txtDateOfBirth.Text = ds.Tables(May_Consultations).Rows(inc).Item(1)

    txtSex.Text = ds.Tables(May_Consultations).Rows(inc).Item(2)

    If IsDBNull(ds.Tables(May_Consultations).Rows(inc).Item(3)) = True Then

    txtDiagnosis.Text =

    Else

    txtDiagnosis.Text = ds.Tables(May_Consultations).Rows(inc).Item(3)

    End If

    ‘txtDiagnosis.Text = ds.Tables(May_Consultations).Rows(inc).Item(3)

    txtTimeIn.Text = ds.Tables(May_Consultations).Rows(inc).Item(4)

    txtTimeOut.Text = ds.Tables(May_Consultations).Rows(inc).Item(5)

    If IsDBNull(ds.Tables(May_Consultations).Rows(inc).Item(6)) = True Then

    txtComplaints.Text =

    Else

    txtComplaints.Text = ds.Tables(May_Consultations).Rows(inc).Item(6)

    End If

    ‘txtComplaints.Text = ds.Tables(May_Consultations).Rows(inc).Item(6)

    If IsDBNull(ds.Tables(May_Consultations).Rows(inc).Item(7)) = True Then

    txtTreatments.Text =

    Else

    txtTreatments.Text = ds.Tables(May_Consultations).Rows(inc).Item(7)

    End If

    ‘txtTreatments.Text = ds.Tables(May_Consultations).Rows(inc).Item(7)

    If IsDBNull(ds.Tables(May_Consultations).Rows(inc).Item(8)) = True Then

    txtInitials.Text =

    Else

    txtInitials.Text = ds.Tables(May_Consultations).Rows(inc).Item(8)

    End If

    ‘txtInitials.Text = ds.Tables(May_Consultations).Rows(inc).Item(8)

    If IsDBNull(ds.Tables(May_Consultations).Rows(inc).Item(9)) = True Then

    txtNotes.Text =

    Else

    txtNotes.Text = ds.Tables(May_Consultations).Rows(inc).Item(9)

    End If

    ‘txtNotes.Text = ds.Tables(May_Consultations).Rows(inc).Item(9)

    RecordNumber()

    QueryResult()

    End Sub

    Private Sub btnNext_Click(sender As Object, e As EventArgs) Handles btnNext.Click

    If inc <> MaxRows - 1 Then

    inc = inc + 1

    NavigateRecords()

    Else

    MessageBox.Show(No More Rows)

    MessageBox.Show(The result of the query is + key_data_sqlResult)

    End If

    End Sub

    Private Sub btnPrevious_Click(sender As Object, e As EventArgs) Handles btnPrevious.Click

    If inc > 0 Then

    inc = inc - 1

    NavigateRecords()

    ElseIf inc = -1 Then

    MessageBox.Show(No Records Yet)

    ElseIf inc = 0 Then

    MessageBox.Show(First Record)

    End If

    End Sub

    Private Sub btnLast_Click(sender As Object, e As EventArgs) Handles btnLast.Click

    If inc <> MaxRows - 1 Then

    inc = MaxRows - 1

    NavigateRecords()

    End If

    End Sub

    Private Sub btnFirst_Click(sender As Object, e As EventArgs) Handles btnFirst.Click

    If inc <> 0 Then

    inc = 0

    NavigateRecords()

    End If

    End Sub

    Private Sub btnUpdate_Click(sender As Object, e As EventArgs) Handles btnUpdate.Click

    Dim cb As New OleDb.OleDbCommandBuilder(da)

    If inc = -1 Then

    MessageBox.Show(No Record to be updated)

    Else

    ds.Tables(May_Consultations).Rows(inc).Item(0) = txtSurgeryDate.Text

    ds.Tables(May_Consultations).Rows(inc).Item(1) = txtDateOfBirth.Text

    ds.Tables(May_Consultations).Rows(inc).Item(2) = txtSex.Text

    If IsDBNull(txtDiagnosis.Text) = True Then

    ds.Tables(May_Consultations).Rows(inc).Item(3) =

    Else

    ds.Tables(May_Consultations).Rows(inc).Item(3) = txtDiagnosis.Text

    End If

    ds.Tables(May_Consultations).Rows(inc).Item(4) = txtTimeIn.Text

    ds.Tables(May_Consultations).Rows(inc).Item(5) = txtTimeOut.Text

    If IsDBNull(txtComplaints.Text) = True Then

    ds.Tables(May_Consultations).Rows(inc).Item(6) =

    Else

    ds.Tables(May_Consultations).Rows(inc).Item(6) = txtComplaints.Text

    End If

    If IsDBNull(txtTreatments.Text) = True Then

    ds.Tables(May_Consultations).Rows(inc).Item(7) =

    Else

    ds.Tables(May_Consultations).Rows(inc).Item(7) = txtTreatments.Text

    End If

    ds.Tables(May_Consultations).Rows(inc).Item(8) = txtInitials.Text

    If IsDBNull(txtNotes.Text) = True Then

    ds.Tables(May_Consultations).Rows(inc).Item(9) =

    Else

    ds.Tables(May_Consultations).Rows(inc).Item(9) = txtNotes.Text

    da.Update(ds, May_Consultations)

    MessageBox.Show(Data updated)

    End If

    End If

    End Sub

    Private Sub btnAddNew_Click(sender As Object, e As EventArgs) Handles btnAddNew.Click

    btnCommit.Enabled = True

    btnAddNew.Enabled = False

    btnUpdate.Enabled = False

    btnDelete.Enabled = False

    txtSurgeryDate.Clear()

    txtDateOfBirth.Clear()

    txtSex.Clear()

    txtDiagnosis.Clear()

    txtTimeIn.Clear()

    txtTimeOut.Clear()

    txtComplaints.Clear()

    txtTreatments.Clear()

    txtInitials.Clear()

    txtNotes.Clear()

    txtRecordNumber.Clear()

    End Sub

    Private Sub btnClear_Click(sender As Object, e As EventArgs) Handles btnClear.Click

    btnCommit.Enabled = False

    btnAddNew.Enabled = True

    btnUpdate.Enabled = True

    btnDelete.Enabled = True

    inc = 0

    NavigateRecords()

    End Sub

    Private Sub btnCommit_Click(sender As Object, e As EventArgs) Handles btnCommit.Click

    If inc <> -1 Then

    Dim cb As New OleDb.OleDbCommandBuilder(da)

    Dim dsNewRow As DataRow

    dsNewRow = ds.Tables(May_Consultations).NewRow()

    dsNewRow.Item(SurgeryDate) = txtSurgeryDate.Text

    dsNewRow.Item(DateOfBirth) = txtDateOfBirth.Text

    dsNewRow.Item(Sex) = txtSex.Text

    dsNewRow.Item(Diagnosis) = txtDiagnosis.Text

    dsNewRow.Item(TimeIn) = txtTimeIn.Text

    dsNewRow.Item(TimeOut) = txtTimeOut.Text

    dsNewRow.Item(Complaints) = txtComplaints.Text

    dsNewRow.Item(Treatments) = txtTreatments.Text

    ‘dsNewRow.Item(NumbersID) = txtNumbersID.Text

    dsNewRow.Item(Initials) = txtInitials.Text

    dsNewRow.Item(Notes) = txtNotes.Text

    ds.Tables(May_Consultations).Rows.Add(dsNewRow)

    da.Update(ds, May_Consultations)

    MessageBox.Show(New Record added to the Database)

    btnCommit.Enabled = False

    btnAddNew.Enabled = True

    btnUpdate.Enabled = True

    btnDelete.Enabled = True

    End If

    End Sub

    Private Sub btnDelete_Click(sender As Object, e As EventArgs) Handles btnDelete.Click

    If MessageBox.Show(Do you really want to Delete this Record?, Delete, MessageBoxButtons.YesNo, MessageBoxIcon.Warning) = DialogResult.No Then

    MessageBox.Show(Operation Cancelled)

    Exit Sub

    End If

    Dim cb As New OleDb.OleDbCommandBuilder(da)

    ds.Tables(May_Consultations).Rows(inc).Delete()

    MaxRows = MaxRows - 1

    inc = 0

    da.Update(ds, May_Consultations)

    NavigateRecords()

    End Sub

    Private Sub QueryResult()

    ‘txtRecordNumber.Text = (Record & (inc + 1) & of & MaxRows & Records)

    txtQueryResult.Text = (Record & (inc + 1) & of & key_data_sqlResult)

    End Sub

    End Class

    May 1997 to May 2005 Surgery Consultations Form1

    Public Class Form1

    Dim SecondForm As New Form2

    Public Shared ComboText As String

    Public Shared qryPresent As Boolean

    Public Shared sqlQuestion(198) ‘DECLARES sqlQuestion array.

    Public Shared query(198) As String ‘DECLARES query array.

    Public Shared sqlResult(198) As String ‘DECLARES sqlResult array.

    Public Shared cb As ComboBox

    Dim qryA As String

    Dim QueryResult1 As String

    Dim MaxRows As Integer

    Dim inc As Integer

    Dim m As Integer

    Dim i As Integer

    Dim z As Integer

    Dim n As Integer

    Dim key_data_sqlResult As String ‘DECLARES THE VARIABLE key_data_query.

    Dim key_data_query As String ‘DECLARES THE VARIABLE key_sqlResult.

    Dim con As New OleDb.OleDbConnection ‘THE CONNECTION OBJECT

    Dim dbProvider As String ‘HOLDS THE PROVIDER

    Dim dbSource As String ‘HOLDS THE DATA SOURCE

    Dim MyDocumentsFolder As String ‘HOLDS THE DOCUMENTS FOLDER

    Dim TheDatabase As String ‘HOLDS THE DATABASE NAME

    Dim FullDatabasePath As String ‘HOLDS THE DATABASE PATH

    Dim ds As New DataSet ‘HOLDS A DataSet OBJECT

    Dim da As OleDb.OleDbDataAdapter ‘HOLDS A DataAdapter OBJECT

    Dim sql As String ‘HOLDS A SQL STRING

    ‘STORE QUERY RESULTS

    ‘sqlResult(0) = Patients seen in May 1997 whose notes entries began with the letter ‘C’

    ‘sqlResult(1) = Patients seen in May 1997 and in May 1998.

    ‘sqlResult(2) = Patients seen in May 1997 with entry under diagnosis, showing only the first ten records. The results are to be ordered by diagnosis in ascending order. These are for those seen in May 1997 and have similar diagnosis in May 1998

    ‘sqlResult(3) = The appointments before 1050 hours and after 1730 hours in May 1997.

    ‘sqlResult(4) = Patients seen in May 1997 who have similar complaints as those seen in May 1998

    ‘sqlResult(5) = Patients referred in May 1997.

    ‘sqlResult(6) = Patients seen in the first week of May 1997.

    ‘sqlResult(7) = Patients seen in the second week of May 1997.

    ‘sqlResult(8) = Patients seen in the third week of May 1997.

    ‘sqlResult(9) = Patients seen from the 22nd to the end of May 1997.

    ‘sqlResult(10) = Patients seen in May 1997 who had similarly entered complaints and similarly entered treatments in both months, May 1997 and May 1998, but the notes entered in both months are not similar, and there are entries under complaints, treatments, notes and diagnosis in both months

    ‘sqlResult(11) = Patients seen in May 1997 who had similarly entered notes, similarly entered treatments or similarly entered date of births in May 1998.

    ‘sqlResult(12) = Patients seen in May 1997 who had similarly entered diagnosis as those seen in May 1998

    ‘sqlResult(13) = Patients seen in May 1997 who have similar entries under treatments as the consultations seen in May 1998 with both years of consultations having had entries under Notes

    ‘sqlResult(14) = Patients seen in May 1997 who have similar complaints as those seen in May 1998

    ‘sqlResult(15) = Patients seen in May 1997 who had similarly complaints entries as those seen in May 1998, both having consultation time of more than 10 minutes.

    ‘sqlResult(16) = Patients seen in May 1997 who had similarly entered diagnosis as those seen in May 1998.

    ‘sqlResult(17) = Patients seen in May 1997 and May 1998.

    ‘sqlResult(18) = Patients seen in May 1997 who had entries of URTI under Diagnosis and patients seen in May 1998 who also had similar entries under Diagnosis.

    ‘sqlResult(19) = Patients seen in May 1997 showing the notes column with no record entry provided they originally had nothing entered.

    ‘sqlResult(20) = The last fifty seen appointments in May 1997.

    ‘sqlResult(21) = First twenty appointments in May 1997.

    ‘sqlResult(22) = Patients seen in May 1998 whose notes entries began with the letter ‘C’

    ‘sqlResult(23) = Patients seen in May 1998 and in May 1999.

    ‘sqlResult(24) = Patients seen in May 1998 with entry under diagnosis, showing only the first ten records. The results are to be ordered by diagnosis in ascending order. These are for those seen in May 1998 and have similar diagnosis in May 1999

    ‘sqlResult(25) = The appointments before 1050 hours and after 1730 hours in May 1998.

    ‘sqlResult(26) = Patients seen in May 1998 who have similar complaints as those seen in May 1999

    ‘sqlResult(27) = Patients referred in May 1998.

    ‘sqlResult(28) = Patients seen in the first week of May 1998.

    ‘sqlResult(29) = Patients seen in the second week of May 1998.

    ‘sqlResult(30) = Patients seen in the third week of May 1998.

    ‘sqlResult(31) = Patients seen from the 22nd to the end of May 1998.

    ‘sqlResult(32) = Patients seen in May 1998 who had similarly entered complaints and similarly entered treatments in both months, May 1998 and May 1999, but the notes entered in both months are not similar, and there are entries under complaints, treatments, notes and diagnosis in both months

    ‘sqlResult(33) = Patients seen In May 1998 who had similarly entered notes, similarly entered treatments Or similarly entered Date Of births In May 1999.

    ‘sqlResult(34) = Patients seen In May 1998 who had similarly entered diagnosis As those seen In May 1999

    ‘sqlResult(35) = Patients seen In May 1998 who have similar entries under treatments As the consultations seen In May 1999 With both years Of consultations having had entries under Notes

    ‘sqlResult(36) = Patients seen In May 1998 who have similar complaints As those seen In May 1999

    ‘sqlResult(37) = Patients seen In May 1998 who had similarly complaints entries As those seen In May 1999, both having consultation time Of more than 10 minutes.

    ‘sqlResult(38) = Patients seen In May 1998 who had similarly entered diagnosis As those seen In May 1999.

    ‘sqlResult(39) = Patients seen In May 1998 And May 1999.

    ‘sqlResult(40) = Patients seen In May 1998 who had entries Of URTI under Diagnosis And patients seen In May 1999 who also had similar entries under Diagnosis.

    ‘sqlResult(41) = Patients seen In May 1998 showing the notes column With no record entry provided they originally had Nothing entered.

    ‘sqlResult(42) = The last fifty seen appointments In May 1998.

    ‘sqlResult(43) = First twenty appointments In May 1998.

    ‘sqlResult(44) = Patients seen In May 1999 whose notes entries began With the letter ‘C’

    ‘sqlResult(45) = Patients seen in May 1999 and in May 2000.

    ‘sqlResult(46) = Patients seen in May 1999 with entry under diagnosis, showing only the first ten records. The results are to be ordered by diagnosis in ascending order. These are for those seen in May 1999 and have similar diagnosis in May 2000

    ‘sqlResult(47) = The appointments before 1050 hours and after 1730 hours in May 1999.

    ‘sqlResult(48) = Patients seen in May 1999 who have similar complaints as those seen in May 2000

    ‘sqlResult(49) = Patients referred in May 1999.

    ‘sqlResult(50) = Patients seen in the first week of May 1999.

    ‘sqlResult(51) = Patients seen in the second week of May 1999.

    ‘sqlResult(52) = Patients seen in the third week of May 1999.

    ‘sqlResult(53) = Patients seen from the 22nd to the end of May 1999.

    ‘sqlResult(54) = Patients seen in May 1999 who had similarly entered complaints and similarly entered treatments in both months, May 1999 and May 2000, but the notes entered in both months are not similar, and there are entries under complaints, treatments, notes and diagnosis in both months

    ‘sqlResult(55) = Patients seen in May 1999 who had similarly entered notes, similarly entered treatments or similarly entered date of births in May 2000.

    ‘sqlResult(56) = Patients seen in May 1999 who had similarly entered diagnosis as those seen in May 2000

    ‘sqlResult(57) = Patients seen in May 1999 who have similar entries under treatments as the consultations seen in May 2000 with both years of consultations having had entries under Notes

    ‘sqlResult(58) = Patients seen in May 1999 who have similar complaints as those seen in May 2000

    ‘sqlResult(59) = Patients seen in May 1999 who had similarly complaints entries as those seen in May 2000, both having consultation time of more than 10 minutes.

    ‘sqlResult(60) = Patients seen in May 1999 who had similarly entered diagnosis as those seen in May 2000.

    ‘sqlResult(61) = Patients seen in May 1999 and May 2000.

    ‘sqlResult(62) = Patients seen in May 1999 who had entries of URTI under Diagnosis and patients seen in May 2000 who also had similar entries under Diagnosis.

    ‘sqlResult(63) = Patients seen in May 1999 showing the notes column with no record entry provided they originally had nothing entered.

    ‘sqlResult(64) = The last fifty seen appointments in May 1999.

    ‘sqlResult(65) = First twenty appointments in May 1999.

    ‘sqlResult(66) = Patients seen in May 2000 whose notes entries began with the letter ‘C’

    ‘sqlResult(67) = Patients seen in May 2000 and in May 2001.

    ‘sqlResult(68) = Patients seen in May 2000 with entry under diagnosis, showing only the first ten records. The results are to be ordered by diagnosis in ascending order. These are for those seen in May 2000 and have similar diagnosis in May 2001

    ‘sqlResult(69) = The appointments before 1050 hours and after 1730 hours in May 2000.

    ‘sqlResult(70) = Patients seen in May 2000 who have similar complaints as those seen in May 2001

    ‘sqlResult(71) = Patients referred in May 2000.

    ‘sqlResult(72) = Patients seen in the first week of May 2000.

    ‘sqlResult(73) = Patients seen in the second week of May 2000.

    ‘sqlResult(74) = Patients seen in the third week of May 2000.

    ‘sqlResult(75) = Patients seen from the 22nd to the end of May 2000.

    ‘sqlResult(76) = Patients seen in May 2000 who had similarly entered complaints and similarly entered treatments in both months, May 2000 and May 2001, but the notes entered in both months are not similar, and there are entries under complaints, treatments, notes and diagnosis in both months

    ‘sqlResult(77) = Patients seen in May 2000 who had similarly entered notes, similarly entered treatments or similarly entered date of births in May 2001.

    ‘sqlResult(78) = Patients seen in May 2000 who had similarly entered diagnosis as those seen in May 2001

    ‘sqlResult(79) = Patients seen in May 2000 who have similar entries under treatments as the consultations seen in May 2001 with both years of consultations having had entries under Notes

    ‘sqlResult(80) = Patients seen in May 2000 who have similar complaints as those seen in May 2001

    ‘sqlResult(81) = Patients seen in May 2000 who had similarly complaints entries as those seen in May 2001, both having consultation time of more than 10 minutes.

    ‘sqlResult(82) = Patients seen in May 2000 who had similarly entered diagnosis as those seen in May 2001.

    ‘sqlResult(83) = Patients seen in May 2000 and May 2001.

    ‘sqlResult(84) = Patients seen in May 2000 who had entries of URTI under Diagnosis and patients seen in May 2001 who also had similar entries under Diagnosis.

    ‘sqlResult(85) = Patients seen in May 2000 showing the notes column with no record entry provided they originally had nothing entered.

    ‘sqlResult(86) = The last fifty seen appointments in May 2000.

    ‘sqlResult(87) = First twenty appointments in May 2000.

    ‘sqlResult(88) = Patients seen in May 2001 whose notes entries began with the letter ‘C’

    ‘sqlResult(89) = Patients seen in May 2001 and in May 2002.

    ‘sqlResult(90) = Patients seen in May 2001 with entry under diagnosis, showing only the first ten records. The results are to be ordered by diagnosis in ascending order. These are for those seen in May 2001 and have similar diagnosis in May 2002

    ‘sqlResult(91) = The appointments before 1050 hours and after 1730 hours in May 2001.

    ‘sqlResult(92) = Patients seen in May 2001 who have similar complaints as those seen in May 2002

    ‘sqlResult(93) = Patients referred in May 2001.

    ‘sqlResult(94) = Patients seen in the first week of May 2001.

    ‘sqlResult(95) = Patients seen in the second week of May 2001.

    ‘sqlResult(96) = Patients seen in the third week of May 2001.

    ‘sqlResult(97) = Patients seen from the 22nd to the end of May 2001.

    ‘sqlResult(98) = Patients seen in May 2001 who had similarly entered complaints and similarly entered treatments in both months, May 2001 and May 2002, but the notes entered in both months are not similar, and there are entries under complaints, treatments, notes and diagnosis in both months

    ‘sqlResult(99) = Patients seen in May 2001 who had similarly entered notes, similarly entered treatments or similarly entered date of births in May 2002.

    ‘sqlResult(100) = Patients seen in May 2001 who had similarly entered diagnosis as those seen in May 2002

    ‘sqlResult(101) = Patients seen in May 2001 who have similar entries under treatments as the consultations seen in May 2002 with both years of consultations having had entries under Notes

    ‘sqlResult(102) = Patients seen in May 2001 who have similar complaints as those seen in May 2002

    ‘sqlResult(103) = Patients seen in May 2001 who had similarly complaints entries as those seen in May 2002, both having consultation time of more than 10 minutes.

    ‘sqlResult(104) = Patients seen in May 2001 who had similarly entered diagnosis as those seen in May 2002.

    ‘sqlResult(105) = Patients seen in May 2001 and May 2002.

    ‘sqlResult(106) = Patients seen in May 2001 who had entries of URTI under Diagnosis and patients seen in May 2002 who also had similar entries under Diagnosis.

    ‘sqlResult(107) = Patients seen in May 2001 showing the notes column with no record entry provided they originally had nothing entered.

    ‘sqlResult(108) = The last fifty seen appointments in May 2001.

    ‘sqlResult(109) = First twenty appointments in May 2001.

    ‘sqlResult(110) = Patients seen in May 2002 whose notes entries began with the letter ‘C’

    ‘sqlResult(111) = Patients seen in May 2002 and in May 2003.

    ‘sqlResult(112) = Patients seen in May 2002 with entry under diagnosis, showing only the first ten records. The results are to be ordered by diagnosis in ascending order. These are for those seen in May 2002 and have similar diagnosis in May 2003

    ‘sqlResult(113) = The appointments before 1050 hours and after 1730 hours in May 2002.

    ‘sqlResult(114) = Patients seen in May 2002 who have similar complaints as those seen in May 2003

    ‘sqlResult(115) = Patients referred in May 2002.

    ‘sqlResult(116) = Patients seen in the first week of May 2002.

    ‘sqlResult(117) = Patients seen in the second week of May 2002.

    ‘sqlResult(118) = Patients seen in the third week of May 2002.

    ‘sqlResult(119) = Patients seen from the 22nd to the end of May 2002.

    ‘sqlResult(120) = Patients seen in May 2002 who had similarly entered complaints and similarly entered treatments in both months, May 2002 and May 2003, but the notes entered in both months are not similar, and there are entries under complaints, treatments, notes and diagnosis in both months

    ‘sqlResult(121) = Patients seen in May 2002 who had similarly entered notes, similarly entered treatments or similarly entered date of births in May 2003.

    ‘sqlResult(122) = Patients seen in May 2002 who had similarly entered diagnosis as those seen in May 2003

    ‘sqlResult(123) = Patients seen in May 2002 who have similar entries under treatments as the consultations seen in May 2003 with both years of consultations having had entries under Notes

    ‘sqlResult(124) = Patients seen in May 2002 who have similar complaints as those seen in May 2003

    ‘sqlResult(125) = Patients seen in May 2002 who had similarly complaints entries as those seen in May 2003, both having consultation time of more than 10 minutes.

    ‘sqlResult(126) = Patients seen in May 2002 who had similarly entered diagnosis as those seen in May 2003.

    ‘sqlResult(127) = Patients seen in May 2002 and May 2003.

    ‘sqlResult(128) = Patients seen in May 2002 who had entries of URTI under Diagnosis and patients seen in May 2003 who also had similar entries under Diagnosis.

    ‘sqlResult(129) = Patients seen in May 2002 showing the notes column with no record entry provided they originally had nothing entered.

    ‘sqlResult(130) = The last fifty seen appointments in May 2002.

    ‘sqlResult(131) = First twenty appointments in May 2002.

    ‘sqlResult(132) = Patients seen in May 2003 whose notes entries began with the letter ‘C’

    ‘sqlResult(133) = Patients seen in May 2003 and in May 2004.

    ‘sqlResult(134) = Patients seen in May 2003 with entry under diagnosis, showing only the first ten records. The results are to be ordered by diagnosis in ascending order. These are for those seen in May 2003 and have similar diagnosis in May 2004

    ‘sqlResult(135) = The appointments before 1050 hours and after 1730 hours in May 2003.

    ‘sqlResult(136) = Patients seen in May 2003 who have similar complaints as those seen in May 2004

    ‘sqlResult(137) = Patients referred in May 2003.

    ‘sqlResult(138) = Patients seen in the first week of May 2003.

    ‘sqlResult(139) = Patients seen in the second week of May 2003.

    ‘sqlResult(140) = Patients seen in the third week of May 2003.

    ‘sqlResult(141) = Patients seen from the 22nd to the end of May 2003.

    ‘sqlResult(142) = Patients seen in May 2003 who had similarly entered notes, similarly entered treatments or similarly entered date of births in May 2004.

    ‘sqlResult(143) = Patients seen in May 2003 who had similarly entered complaints and similarly entered treatments in both months, May 2003 and May 2004, but the notes entered in both months are not similar, and there are entries under complaints, treatments, notes and diagnosis in both months.

    ‘sqlResult(144) = Patients seen in May 2003 who had similarly entered diagnosis as those seen in May 2004

    ‘sqlResult(145) = Patients seen in May 2003 who have similar entries under treatments as the consultations seen in May 2004 with both years of consultations having had entries under Notes

    ‘sqlResult(146) = Patients seen in May 2003 who have similar complaints as those seen in May 2004

    ‘sqlResult(147) = Patients seen in May 2003 who had similarly complaints entries as those seen in May 2004, both having consultation time of more than 10 minutes.

    ‘sqlResult(148) = Patients seen in May 2003 who had similarly entered diagnosis as those seen in May 2004.

    ‘sqlResult(149) = Patients seen in May 2003 and May 2004.

    ‘sqlResult(150) = Patients seen in May 2003 who had entries of URTI under Diagnosis and patients seen in May 2004 who also had similar entries under Diagnosis.

    ‘sqlResult(151) = Patients seen in May 2003 showing the notes column with no record entry provided they originally had nothing entered.

    ‘sqlResult(152) = The last fifty seen appointments in May 2003.

    ‘sqlResult(153) = First twenty appointments in May 2003.

    ‘sqlResult(154) = Patients seen in May 2004 whose notes entries began with the letter ‘C’

    ‘sqlResult(155) = Patients seen in May 2004 and in May 2005.

    ‘sqlResult(156) = Patients seen in May 2004 with entry under diagnosis, showing only the first ten records. The results are to be ordered by diagnosis in ascending order. These are for those seen in May 2004 and have similar diagnosis in May 2005

    ‘sqlResult(157) = The appointments before 1050 hours and after 1730 hours in May 2004.

    ‘sqlResult(158) = Patients seen in May 2004 who have similar complaints as those seen in May 2005

    ‘sqlResult(159) = Patients referred in May 2004.

    ‘sqlResult(160) = Patients seen in the first week of May 2004.

    ‘sqlResult(161) = Patients seen in the second week of May 2004.

    ‘sqlResult(162) = Patients seen in the third week of May 2004.

    ‘sqlResult(163) = Patients seen from the 22nd to the end of May 2004.

    ‘sqlResult(164) = Patients seen in May 2004 who had similarly entered complaints and similarly entered treatments in both months, May 2004 and May 2005, but the notes entered in both months are not similar, and there are entries under complaints, treatments, notes and diagnosis in both months.

    ‘sqlResult(165) = Patients seen in May 2004 who had similarly entered notes, similarly entered treatments or similarly entered date of births in May 2005.

    ‘sqlResult(166) = Patients seen in May 2004 who had similarly entered diagnosis as those seen in May 2005

    ‘sqlResult(167) = Patients seen in May 2004 who have similar entries under treatments as the consultations seen in May 2005 with both years of consultations having had entries under Notes

    ‘sqlResult(168) = Patients seen in May 2004 who have similar complaints as those seen in May 2005

    ‘sqlResult(169) = Patients seen in May 2004 who had similarly complaints entries as those seen in May 2005, both having consultation time of more than 10 minutes.

    ‘sqlResult(170) = Patients seen in May 2004 who had similarly entered diagnosis as those seen in May 2005.

    ‘sqlResult(171) = Patients seen in May 2004 and May 2005.

    ‘sqlResult(172) = Patients seen in May 2004 who had entries of URTI under Diagnosis and patients seen in May 2005 who also had similar entries under Diagnosis.

    ‘sqlResult(173) = Patients seen in May 2004 showing the notes column with no record entry provided they originally had nothing entered.

    ‘sqlResult(174) = The last fifty seen appointments in May 2004.

    ‘sqlResult(175) = First twenty appointments in May 2004.

    ‘sqlResult(176) = Patients seen in May 2005 whose notes entries began with the letter ‘C’

    ‘sqlResult(177) = Patients seen in May 2005 and in May 1997.

    ‘sqlResult(178) = Patients seen in May 2005 with entry under diagnosis, showing only the first ten records. The results are to be ordered by diagnosis in ascending order. These are for those seen in May 2005 and have similar diagnosis in May 1997

    ‘sqlResult(179) = The appointments before 1050 hours and after 1730 hours in May 2005.

    ‘sqlResult(180) = Patients seen in May 2005 who have similar complaints as those seen in May 1997

    ‘sqlResult(181) = Patients referred in May 2005.

    ‘sqlResult(182) = Patients seen in the first week of May 2005.

    ‘sqlResult(183) = Patients seen in the second week of May 2005.

    ‘sqlResult(184) = Patients seen in the third week of May 2005.

    ‘sqlResult(185) = Patients seen from the 22nd to the end of May 2005.

    ‘sqlResult(186) = Patients seen in May 2005 who had similarly entered complaints and similarly entered treatments in both months, May 2005 and May 1997, but the notes entered in both months are not similar, and there are entries under complaints, treatments, notes and diagnosis in both months.

    ‘sqlResult(187) = Patients seen in May 2005 who had similarly entered notes, similarly entered treatments or similarly entered date of births in May 1997.

    ‘sqlResult(188) = Patients seen in May 2005 who had similarly entered diagnosis as those seen in May 1997

    ‘sqlResult(189) = Patients seen in May 2005 who have similar entries under treatments as the consultations seen in May 1997 with both years of consultations having had entries under Notes

    ‘sqlResult(190) = Patients seen in May 2005 who have similar complaints as those seen in May 1997

    ‘sqlResult(191) = Patients seen in May 2005 who had similarly complaints entries as those seen in May 1997, both having consultation time of more than 10 minutes.

    ‘sqlResult(192) = Patients seen in May 2005 who had similarly entered diagnosis as those seen in May 1997.

    ‘sqlResult(193) = Patients seen in May 2005 and May 1997.

    ‘sqlResult(194) = Patients seen in May 2005 who had entries of URTI under Diagnosis and patients seen in May 1997 who also had similar entries under Diagnosis.

    ‘sqlResult(195) = Patients seen in May 2005 showing the notes column with no record entry provided they originally had nothing entered.

    ‘sqlResult(196) = The last fifty seen appointments in May 2005.

    ‘sqlResult(197) = First twenty appointments in May 2005.

    ‘STORE THE SQL STRING

    ‘1 Write a query that lists all patients seen in May 1997 whose notes entries began with the letter ‘C’

    ‘2 Write a query that displays all the consultations in May 1997 And May 1998

    ‘3 Write a query that lists all patients seen in May 1997 with entry under diagnosis, showing only the first ten records. The results are to be ordered by diagnosis in ascending order. These are for those seen in May 1997 And have similar diagnosis in May 1998

    ‘4 Write a query that lists appointments before 1050 hours And after 1730 hours in May 1997

    ‘5 Write a query that lists those seen in May 1997 who have similar complaints as those seen in May 1998

    ‘6 Write a query to list all those referred in May 1997

    ‘7 Write a query that lists all consultations in the first week of May 1997

    ‘8 Write a query that lists all consultations in the second week of May 1997

    ‘9 Write a query that lists all consultations in the third week of May 1997

    ‘10 Write a query that lists all

    Enjoying the preview?
    Page 1 of 1