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
The basic components of cartridges and shotshells are similar. Shot pellets and a bullet are examples of which basic component?
Liono4ka [1.6K]
The answer is projectile. Handguns and rifles use a cartridge having a single projectile or bullet. Shotguns use a shot shell comprising either a single bullet or a big number of small projectiles (shot or pellets). Though, the basic components of cartridges and shot shells are alike.
5 0
3 years ago
What is the next line?
Evgen [1.6K]

Answer:3

Explanation: it’s 3

3 0
3 years ago
Read 2 more answers
Write a program that asks the user to input their first and last names. The first prompt should state:
VikaD [51]

first = input("Please input your first name: ")

last = input("Please input your last name: ")

print(last+", "+first)

I hope this helps!

8 0
2 years ago
how many bits must be flipped (i.e. changed from 0 to 1 or from 1 to 0) in order to capitalize a lowercase 'a' that’s represente
lianna [129]
Lowercase a is decimal 97 ; upper case is decimal 65

It's easier to think of them in octal, however: a = octal 141, and A is octal 101

octal to binary is easy, each digit is three bits. 
141 = 001 100 001 
101 = 001 000 001

So, how many bits are changed above? 
4 0
3 years ago
Type the correct answer in the box. Spell all words correctly.
diamong [38]
The answer is handouts.
A handout is a pamphlet with information on your presentation you can give to your audience
8 0
3 years ago
Other questions:
  • How do type declaration statements for simple variables affect the readability of a language, considering that some languages do
    10·1 answer
  • What is a major plastics engineering project that is going on right now in Arizona?
    9·1 answer
  • Skinner designed a soundproof apparatus, often equipped with a lever or bar, with which he conducted his experiments in operant
    9·1 answer
  • Give the Division Hashing function and the index it maps the key 2000 into, assuming a primary storage area array size of 61 ele
    6·1 answer
  • Andy, a developer, is designing a new program. Which tool should Andy use to help him complete his task?
    13·1 answer
  • The__ key is used to group or identify a field or record within a table. (you don't need it).
    5·2 answers
  • What is a disadvantage of using transitions in a PowerPoint presentation?
    9·1 answer
  • You are part of a team that is setting up a movie streaming service. The company is planning on initially making available 500 m
    8·1 answer
  • Which of the following describes the line spacing feature? Select all that apply. adds space between words adds space between li
    8·1 answer
  • A good information that contains the facts necessary for decision makers to solve a problem is characterized by the __________.
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!