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]
3 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]3 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
Whats the answer to 9? i really need help with this in the next 20 minutes. ty if u help me!
gayaneshka [121]

Answer:

A very precise number B

Explanation:

Hope you pass

3 0
3 years ago
List the seven basic internal components found in a computer tower
egoroff_w [7]
1. Motherboard (you plug all other components to it)
2. Processor (CPU)
3. Memory (RAM)
4. Graphics card
5. Sound card (sometimes integrated with motherboard)
6. Hard Disk Drive (HDD)
7. Power supply unit
6 0
3 years ago
Read 2 more answers
Will a debit card still work if i put stickers on it?
laiz [17]

Answer:

Explanation:

Yes, it may still be readable, but if they refuse to take it you have no ground to stand on. (If you obscure the signature, at least make sure the CVV is readable or reprinted on top.) The plastic covering should not interfere with the mag stripe.

8 0
3 years ago
Read 2 more answers
The home keys on the numeric keypad are?
Eva8 [605]
4, 5 , 6 , and plus key
456+
5 0
3 years ago
Read 2 more answers
When ____ is pressed after entering an email address or web address, word automatically formats the address as a hyperlink, that
bixtya [17]
The word enter is your password
6 0
3 years ago
Read 2 more answers
Other questions:
  • _______________ is the term for the convergence of real-time and non-real-time communications services such as telephony, instan
    11·1 answer
  • Which of the following is a technique used by hackers to identify unsecured wireless network locations to other hackers?A. Blues
    10·1 answer
  • FIGURE A-1—Use the information in this chart to answer Question 1.
    6·1 answer
  • Write a program that first gets a list of integers from input. The input begins with an integer indicating the number of integer
    6·1 answer
  • True or False: To create a function in python, you start with the keyword "def"
    5·2 answers
  • The question is inside the screenshot
    13·1 answer
  • 100POINTS!!!!!!!!!!!!!!!!!!!I WILL ANSWER ALL OF YOUR QUESTIONS PLEASE LOVES:)))Upload your completed project including the foll
    12·1 answer
  • This is science I just couldn’t find it
    15·1 answer
  • What does the coding phase involve?
    11·2 answers
  • I need a solution for this problem asap.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!