Write a select statement that returns four columns

Assignment Help Computer Engineering
Reference no: EM132163017

USEING SQL Server Database Development

Open the AP database using the SQL Server 2012 Management Studio. Please make sure you review the SQL syntax for each query that is created.

Please create solutions to the following queries:

1. Write a select statement that returns four columns based on the InvoiceTotal column of the invoices table, AP database.

a. Use the CAST function to return the first column with 0 digits to the right of the decimal point

b. Use the CAST function to return the second column with a $ in front of the value.

c. Using the CONVERT function to return the third column with the smallest precision in mind to return the scale of 3.

d. Use the CONVERT function to return the fourth column with a $ in front and back of the value. There should be no spaces between the symbols and number. i.e $3,813.33$

One row example without the headers:

3813 $3813.33 3813.330 $3,813.33$

2. Write a SELECT statement that returns two columns based on the Vendors table. The first column, Contact, is the vendor contact name, the second is the phone.

a. For the contact, the first name is followed by last name initial (for example, "John S.")

b. The second column, Phone, is the VendorPhone column without the area code.

Criteria:

1) Only return rows for those vendors in the 559 area code. You can only use the numbers "559" in the search, no parenthesis.

2) Sort the result set by last name.

One row example with headers:

Contact Phone

Thom A. 555-8484

Reference no: EM132163017

Questions Cloud

Write a program that wihtout the use of boolean variable : Using C++ microsoft visual studios write a program that wihtout the use of boolean variable allows the user to enter a integer.
Tax expenditure affect the public budget : Explain why a tax expenditure can be thought of as off-budget. How, precisely, does a tax expenditure affect the public budget?
Design a new website and you are interviewing : Explain how your questions help you understand how they navigate the sides and have the styling impacts their experience.
Display the total ticket sales to males : Create and save a data entry form to input more records into the table. Use the form to add 10 more records and save the database with the extra records.
Write a select statement that returns four columns : Write a select statement that returns four columns based on the InvoiceTotal column of the invoices table, AP database.
What is the total surplus with the ceiling price : When the government imposes a price ceiling 12$, disequilibrium between quantity demanded and quantity supplied results in what?
Output and consumption of the good : Explain why a competitive market would generally lead to too much output and consumption of the good if production of the good generates a negative externality.
Life of how a change in the market : Think of a relevant example in your own life of how a change in the market
How do the norms and values around investing : How do the norms and values around investing (esp. Impact investing (differ in japan?

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd