Question: SQL queries 1. Write a nested cursor to print the hierarchy of product categories. Print a category and all its subcategories like the format below.

SQL queries

SQL queries 1. Write a nested cursor to print the hierarchy of

1. Write a nested cursor to print the hierarchy of product categories. Print a category and all its subcategories like the format below.

product categories. Print a category and all its subcategories like the format

2.

a) Use a SCROLL cursor and iterate through the product names in reverse alphabetical order.

b) Print the same output as above using a non-scroll cursor.

Please specify your comment. What do you mean by bad format? Does it mean my question is in bad format? or the output(2nd photo uploaded) is bad format? PLUS I have uploaded questions like this and have gotten correct solution without any problems.

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 ModifiedDate

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!