Premium Essay

It350

In:

Submitted By Maresca1973
Words 527
Pages 3
SQL Server
Kaplan University
IT350
May 18 2014

1.. Write a query using the Production.ProductReview table. Use CONTAINS to find all the rows that have the word socks in the Comments column. Return the ProductID and Comments columns
Answer;
Free text is used to look for columns that contain character-based data types for values that match the meaning and not the words in the search condition. Meanwhile the like operator is used to perform wildcard pattern matches. And also in the where clause of a select, insert, update and delete statements. SELECT ProductID, Comments FROM Production.ProductReview WHERE CONTAINS (Comments,'socks');

2 Select all the columns and rows from the production.productlistprice, display output in order of lowest to highest price.
Answer
SELECT * FROM production.ProductListPriceHistory order by ListPrice;

Q3. Write a query that returns the business entity ID and name columns (concatenated to show as 1 formatted column called Full Name) from the Person.Person table. Sort the results by Full Name . Make sure to account for Nulls.
Answer;
SELECT BusinessEntityID, FirstName + ' ' + MiddleName + ' ' + LastName AS "Full Name"
FROM Person.Person;

Q4. Write a query using the Sales.SpecialOffer table that multiplies the MaxQty column by the DiscountPct column. If the MaxQty value is NULL, replace it with the value 10. Include the SpecialOfferID and Description columns in the results.
SELECT SpecialOfferID,Description, DiscountPct * ISNULL(MaxQty,10) AS MaxDiscount
FROM Sales.SpecialOffer;

Q5. Write a query that displays characters 10 to 15 of the AddressLine1 column in the Person.Address table.
Answer.
SELECT AddressLine1, SUBSTRING(AddressLine1,10,6) as "Characters 10 - 15" FROM Person.Address

Q6. All the data in the ProductNumber in the Production.Product table contains a hyphen (-). Write a query that uses the

Similar Documents

Free Essay

It350 Unit 1

...When it comes to proprietary closed source software, this software is copyrighted and exclusively owned by the person or company that had the software copyrighted. Users of the software are not allowed to make any changes to the software without the owners consent and must only use and obtain the software if a license is purchased from the owner or company. In some cases, this software can only run add on components from the proprietary owner. Owners also charge a price for their software, which is part of the licensing agreement with the perspective end user. Closed source software is also known to provide some type of technical support and warranty, which is part of the licensing agreement. So if the user is having problems or experience some type of malfunction, they are guaranteed to receive some type of assistance should a problem arise. Open Source software on the other hand is not licensed exclusively under the same rights as closed sourced program. This type of software is available under a free license that allow others to do further research on the software as well as making modifications to it. Since it is under a free license the software is normally free of charge for users. Open source software can also be distributed through various forms compared to the restricted distribution of close source software. Open source software is also not under any type of warranty as the software is free. So if a user happens to have some type of malfunction with open source...

Words: 554 - Pages: 3