Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1. Write a nested cursor to print the hierarchy of product categories. Print a category and all its subcategories like the format below. 2. a)
1. Write a nested cursor to print the hierarchy of product categories. Print a category and all its subcategories like the format below.
2.
a) Use a SCROLL cursor and iterate through the product names in reverse alphabetical order.
b) How can the above question be achieved using a non-scroll cursor?
AdventureWorksLT Schema SalesLT Schema Best Print Results if 8.5x11 paper, Landscape Fit to 1 sheet Dbo Schema PK ProductID U1 Name U2 ProductNumber FK1 U1 Name U2 rowguid ModifiedDate PK ErrorloglD Database Version VersionDate ModifiedDate ErrorNumber CustomerAddress PK,FK2 CustomerlD PK,FK1 AddressID FK2 ProductCategorylD SellStartDate SellEndDate U1 Name ErrorLine U2 rowguid AddressType rowguid ModifiedDate ModifiedDate U1 leName U3 rowguid PK SalesOrderlD PK,FK2 ProductModellD RevisionNumber PK Culture DueDate 1 AddressLine1 11 City 11 StateProvince 1 PostalCode PK CustomerlD U2 SalesOrderNumber Title U1 rowguid FK1,11 CustomerlD ShipMethod ModifiedDate PK LastName PK,FK1 SalesOrderlD SubTotal TaxAmt Freight +TotalDue U1 rowguid Modified Date 11 EmailAddress FK2,11ProductID Key l Index U Unique Index X XML Index +Computed Colum PK Pimary Key FK Foreign Key PasswordHashh Password Salt U1 rowguid LineTotal rowguid ModifiedDate ModifiedDate U1 rowguid U1 FK2 ShipToAddressID FK3 BillToAddressID ModifiedDateStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started