A GUIDE TO SQL
A GUIDE TO SQL
9th Edition
ISBN: 9781305897397
Author: Pratt
Publisher: CENGAGE L
Expert Solution & Answer
Book Icon
Chapter 8, Problem 6SCG

Explanation of Solution

a.

Deleting query in the table “OWNER”:

Public Function Owner_Delete(I_OWNER_NUM)

    Dim strSQL As String

    strSQL = "DELETE FROM OWNER WHERE OWNER_NUM = '"

    strSQL = strSQL & I_OWNER_NUM

    strSQL = strSQL & "'"

    DoCmd.RunSQL strSQL

End Function

 Explanation:

  • Create a function named as “Owner_Delete” and pass an argument “I_OWNER_NUM”.
  • Set the strSQL string variable to “DELETE FROM OWNER WHERE OWNER_NUM = '” and make everything necessary in the command including the single quotation mark preceding the order number...

Explanation of Solution

b.

Updating query:

Public Function Owner_Update(I_OWNER_NUM, I_LAST_NAME)

    Dim strSQL As String

    strSQL = "UPDATE OWNER SET LAST_NAME = '"

    strSQL = strSQL & I_LAST_NAME

    strSQL = strSQL & "' WHERE OWNER_NUM = '"

    strSQL = strSQL & I_OWNER_NUM

    strSQL = strSQL & "'"

    DoCmd.RunSQL strSQL

End Function

 Explanation:

  • Create a function named as “Owner_Update” and pass the arguments “I_OWNER_NUM” and “I_LAST_NAME”.
  • Set the strSQL string variable to “UPDATE OWNER SET LAST_NAME = '” and make everything necessary in the command including the single quotation mark preceding the order number...

Explanation of Solution

c.

Retrieving the list in the table “CONDO_UNIT”:

Public Function Find_Condos(I_SQR_FT)

    Dim rs As New ADODB.Recordset

    Dim cnn As ADODB.Connection

    Dim strSQL As String

    Set cnn = CurrentProject.Connection

    strSQL = "SELECT LOCATION_NUM, UNIT_NUM, CONDO_FEE, OWNER_NUM FROM CONDO_UNIT WHERE SQR_FT = "

    strSQL = strSQL & I_SQR_FT

       rs.Open strSQL, cnn, adOpenStatic, , adCmdText

    Do Until rs.EOF

        Debug.Print (rs!LOCATION_NUM)

        Debug.Print (rs!UNIT_NUM)

        Debug.Print (rs!CONDO_FEE)

        Debug.Print (rs!OWNER_NUM)

        rs.MoveNext

    Loop

End Function

 Explanation:

  • Create a function named as “Find_Condos” and pass an argument “I_SQR_FT”...

Blurred answer
Students have asked these similar questions
Explian thiS C program #include<stdio.h> int countSetBits(int n) {    int count = 0;    while (n) {        count += n & 1;        n >>= 1;    }    return count;} int main() {    int num;    printf("Enter a number: ");    scanf("%d", &num);    printf("Output: %d units\n", countSetBits(num));    return 0;}
Please provide the Mathematica code
Explian this C program code. #include <stdio.h> void binary(unsigned int n) { if (n /2!=0) { binary(n /2); } printf("%d", n %2); } int main() { unsignedint number =33777; unsignedchar character ='X';   printf("Number: %u\n", number); printf("Binary: "); binary(number); printf("\nDecimal: %u\nHexadecimal: 0x%X\n\n", number, number);   printf("Character: %c\n", character); printf("ASCII Binary: "); binary(character); printf("\nASCII Decimal: %u\nASCII Hexadecimal: 0x%X\n", character, character);   return0; }
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
A Guide to SQL
Computer Science
ISBN:9781111527273
Author:Philip J. Pratt
Publisher:Course Technology Ptr
Text book image
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage
Text book image
Oracle 12c: SQL
Computer Science
ISBN:9781305251038
Author:Joan Casteel
Publisher:Cengage Learning
Text book image
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:9781337102124
Author:Diane Zak
Publisher:Cengage Learning
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781305627482
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781285196145
Author:Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Publisher:Cengage Learning