Page 1 of 1

46. Question 3 Write SQL statement that display patients' surname, initial, gender and respaccount as displayed in the o

Posted: Thu May 26, 2022 9:50 am
by answerhappygod
46 Question 3 Write Sql Statement That Display Patients Surname Initial Gender And Respaccount As Displayed In The O 1
46 Question 3 Write Sql Statement That Display Patients Surname Initial Gender And Respaccount As Displayed In The O 1 (42.38 KiB) Viewed 38 times
46. Question 3 Write SQL statement that display patients' surname, initial, gender and respaccount as displayed in the output. The query must display all patients that have a surname ending with 'a' or the last 4 letters ending with 'nana" or first name ending with 'n'. Ensure that the sumame has a maximum length of 10 characters. Sort surnames in Ascending order. Your output should resemble the one below. Init Surname RespAccount J De Waardt *****01145053******* J Lewis *****06137845******* L Manana *****01085607******* J Mhlanga *****09124123******* P Mhlanga *****10091656******* 47. Question 4 [10] Create a query to retrieve patient's number, surname, pin, number of characters in a first name, and a numeric position of the letter 'A' from the surname. 10 ICT1511/102/0/2022 For every patient number with less than 13 digits, add the zeros (0) as detailed in the output to make it be 13 digits. Pin is derived from surname, right padded stars and the total number of characters of the surname. PAT# Surname Pin Surname Length Position 7503305057803 Mhlanga nga PATRICIA7 8110102467081 Lewis S*******JOHNSONS 7 5432100000000 Lewis S****** PATRICIAS 7809124123456 Mhlanga nga JAMES7 9310012356082 Mdluli li PRETTY6 9001085607084 Manana na****** LUCKY6 8 5 6 5