using sql do the following
Write a script that uses the XML document shown below to update the contact information in the Vendors table.
<ContactUpdates>
<Contact VendorID="2">
<LastName>Stanley</LastName>
<FirstName>Henry</FirstName>
</Contact>
<Contact VendorID="12">
<LastName>Ono</LastName>
<FirstName>Santa</FirstName>
</Contact>
</ContactUpdates>
Here I am providing the answer for the above question:
Script:
UPDATE Vendors SET LastName="Stanley" , FirstName="Henry" WHERE VendorID=2;
UPDATE Vendors SET LastName="Ono" , FirstName="Santa" WHERE VendorID=12;
Hoping that the above answer will help you...Thank you...
using sql do the following Write a script that uses the XML document shown below to...
Write SQL code please. Tables are attached with their
appropriate fields for reference.
The Marketing Department requires a vendor listing that shows the following fields: 1. - Vendor Name Vendor Contact First Name - Vendor Contact Last Name - Vendor City - Vendor State - Vendor Zip Code Note: Sort by vendor state The Finance Department requires a report that shows payment totals greater than $50.00. List the following fields 2. - Vendorid - Payment Total - Payment Date The...
Complete the following using Microsoft® SQL Server® 2016: Write SQL scripts in Microsoft® SQL Server® for OLTP that include: A Data Definition Language (DDL) script creating the four tables with appropriate data types, primary and foreign keys Data Manipulation Language (DML) scripts that insert a minimum of five records into each table Select scripts showing the full contents of each table Write and run a test script for Step Two. Save a screenshot of the results. Create a 6-page Technical...
I am using Oracle SQL Live so please write the SQL Query in the format that Oracle SQL Live can run I need to create a trigger that will update the Product QoH when a new product is purchased. (A new product is purchased when a row is added to the line table). I have linked the code of the script since it exceed Chegg’s Character Limit: https://docs.google.com/document/d/1HbHnMrk6Qw99B72kpDyYCFibUJVsYEi-6RKDsmb3fg4/edit?usp=sharing
Q.4. Considering the XML Schema shown below, answer the following questions: a) Write an XML document that conforms to the rules of the xml schema given below. Add atleast two book elements. b) Modify the XML schema to add an attribute “id” to the book element which is of the type string and is a mandatory. c) In the XML schema, change the definition of the element “price” such that value of price cannot be lower than 10...
Given the following table structure, write the SQL code to display all the first and last names of the individuals that have a last name that begins with the letter 'M! CREATE TABLE Persons Personi int LastName varchar(80). FirstName varchar(80). Address varchar(125). State char(2) Given the following table structure, write the SQL code to display all the first and last names of the individuals that have a last name that does not contain the letter 'S: CREATE TABLE Persons PersonlDint,...
1) Write or select the correct SQL statement that satisfies the following case: Change record with value 'Nick' to 'Cuba' for the 'Last Name' attribute in the table 'Vendors' A. UPDATE VENDORS SET LAST_NAME='CUBA' WHERE LAST_NAME=NICK B.INSERT INTO LAST_NAME VALUES("NICK"); C.INSERT INTO 'NICK' VALUES('VENDORS'); D. INSERT INTO VENDORS WHERE LAST_NAME="NICK" 2) Write or select the correct SQL statement that satisfies the following case: Change record with value 'Gary' to 'Jada' for the 'Style' attribute in the table 'Invoice_Line' A. INSERT...
Do these codes look right for the following 5 statements. This is using Oracle SQL: Write a query that displays the title, ISBN, and wholesale cost of books whose wholesale cost is more than the average of all books. Format the retail price with dollars and cents. Write a query that displays the title and publication date of the oldest book in the BOOKS table. Format the date with the complete name of the month and a comma after the...
Assume that The Queen Anne Curiosity Shop designs a database with the following tables. CUSTOMER (CustomerID, LastName, FirstName, EmailAddress, EncyptedPassword, City, State, ZIP, Phone, ReferredBy) EMPLOYEE (EmployeeID, LastName, FirstName, Position, Supervisor, OfficePhone, EmailAddress) VENDOR (VendorID, CompanyName, ContactLastName, ContactFirstName, Address, City, State, ZIP, Phone, Fax, EmailAddress) ITEM (ItemID, ItemDescription, PurchaseDate, ItemCost, ItemPrice, VendorID) SALE (SaleID, CustomerID, EmployeeID, SaleDate, SubTotal, Tax, Total) SALE_ITEM (SaleID, SaleItemID, ItemID, ItemPrice) The referential integrity constraints are: ReferredBy in CUSTOMER must exist in CustomerID in CUSTOMER Supervisor...
NEED THE SQL QUERIES ASAP PLEASE(LIKE 1 HOUR) THE ONES WITH ID ARE PRIMARY KEYS OR FOREIGN etc Customer [ CustID, LastName, FirstName, Address, City, State, Zip, Phone, Fax, Email] Product [ ProdID, Description, Color, Size, Pack] Sales [ TransID, CustID, ProdID, Price, Quantity, Amount] Write SQL statement to produce a list of unique products and their prices from the Sales table. Please ensure that the products do not repeat. Write an SQL statement to list ProdID and Description for...
SQL Homework Create a single script to do all of the following. Be sure to create in such a way that it can be re-run multiple times. Create a database named homework. In this database, create three tables: Student, Course, StudentCourse - Create the Student table with the following fields in this order: studentID as an integer; do not allow empty values firstName as a variable number of characters, max 30, with a null default value lastName as a variable...