1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Nady [450]
4 years ago
10

Create a stored procedure sp_Q1 that takes two country names like 'Japan' or 'USA'as two inputs and returns two independent sets

of rows: (1) all suppliers in the input countries, and (2) products supplied by these suppliers. The returned suppliers should contain SupplierID, CompanyName, Phone, and Country. The returned products require their ProductID, ProductName, UnitPrice, SupplierID, and must sorted by SupplierID.

Computers and Technology
1 answer:
Zigmanuir [339]4 years ago
7 0

Answer:

Check the explanation

Explanation:

CREATE PROCEDURE sp_Q1

<u><em>"at"</em></u>country1 NVARCHAR(15),

<u><em>"at"</em></u>country2 NVARCHAR(15)

AS

BEGIN

  BEGIN

      SELECT SupplierID, CompanyName, Phone, Country FROM suppliers

      where Country in (<u><em>"at"</em></u>country1,<u><em>"at"</em></u>country2)

     

  SELECT ProductID, ProductName, UnitPrice, SupplierID FROM Products

      where SupplierID in(

      SELECT SupplierID FROM suppliers

      where Country in (<u><em>"at"</em></u>country1,<u><em>"at"</em></u>country2)) ORDER BY SupplierID

  END

END

GO

-- Testing script.

DECLARE <u><em>"at"</em></u>RC int

DECLARE <u><em>"at"</em></u>country1 nvarchar(15)

DECLARE <u><em>"at"</em></u>country2 nvarchar(15)

-- Set parameter values here.

set <u><em>"at"</em></u>country1='UK'

set <u><em>"at"</em></u>country2='Canada'

EXECUTE <u><em>"at"</em></u>RC = [dbo].[sp_Q1]

<u><em>"at"</em></u>country1

,<u><em>"at"</em></u>country2

GO

Kindly check the attached images below to see how it looks like on a code editor.

You might be interested in
What is the purpose of the Chart feature in Word?
Burka [1]

Answer:

i think its the second one

Explanation:

7 0
3 years ago
Read 2 more answers
Who know's web Design
balu736 [363]

Answer: B

Explanation:

inline is the answer

4 0
3 years ago
Explain why it is important to continually evaluate long-term goals
lilavasa [31]
It is important to continually evaluate long term goals because one's life situation can change from day to day. For example, one can be without work for many months and despairing of ever getting work when finally conditions improve and work becomes available. Life is full of opportunities and sooner or later opportunities will arise so that whereas the long term situation looked economically bleak before, now it can improve significantly.
3 0
4 years ago
What is a project?
Elan Coil [88]
Simply put, a project is a series of tasks that need to be completed in order to reach a specific outcome. A project can also be defined as a set of inputs and outputs required to achieve a particular goal. Projects can range from simple to complex and can be managed by one person or a hundred.
5 0
3 years ago
Read 2 more answers
Nvm, Its B.
denis-greek [22]
B) which ice cream flavor do the most student prefer?
6 0
3 years ago
Other questions:
  • Describe a situation involving making a copy of a computer program or an entertainment file of some sort for which you think it
    7·1 answer
  • What is the speedup of going from a 1-issue processor to a 2-issue processor? use your code from part a for both 1-issue and 2-i
    11·1 answer
  • What are some of the good effects of social media
    7·1 answer
  • Bob has been assigned to set up a digital certificate solution for use with e-mail. One of the requirements he has been given is
    10·1 answer
  • Who was the inventor of the iPhone?
    13·2 answers
  • A RAID structure ____. is primarily used for security reasons is primarily used to ensure higher data reliability stands for red
    14·1 answer
  • A major concern about ESP claims is that proponents explain both the positive and negative findings. By explaining the negative
    14·1 answer
  • Which are guidlines for using themes? Check all that apply
    13·1 answer
  • This image shows a web designer’s grids for different pages on a website. The uppermost box on each page is the website’s identi
    15·2 answers
  • Answer pleaseeeeeeeeeee!
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!