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
jeyben [28]
3 years ago
11

/* Q1. (20 points)Create a stored procedure sp_Q1 that takes two country names like 'Japan' or 'USA'as two inputs and returns tw

o 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.You should include 'go' to indicate the end of script that creates the procedure and you must include a simple testing script to call your sp_Q1 using 'UK' and 'Canada' as its two inputs\.\**For your reference only: A sample solution shows this procedure can be created in11 to 13 lines of code. Depending on logic and implementation or coding style, yoursolution could be shorter or longer\.\*/
Computers and Technology
1 answer:
Svet_ta [14]3 years ago
7 0

Answer:

See the program code at explaination

Explanation:

CREATE PROCEDURE sp_Q1

atcountry1 NVARCHAR(15),

atcountry2 NVARCHAR(15)

AS

BEGIN

BEGIN

SELECT SupplierID, CompanyName, Phone, Country FROM suppliers

where Country in (atcountry1,atcountry2)

SELECT ProductID, ProductName, UnitPrice, SupplierID FROM Products

where SupplierID in(

SELECT SupplierID FROM suppliers

where Country in (atcountry1,atcountry2)) ORDER BY SupplierID

END

END

GO

-- Testing script.

DECLARE atRC int

DECLARE atcountry1 nvarchar(15)

DECLARE atcountry2 nvarchar(15)

-- Set parameter values here.

set atcountry1='UK'

set atcountry2='Canada'

EXECUTE atRC = [dbo].[sp_Q1]

atcountry1

,atcountry2

GO

Note: please kindly replace all the "at" with the correct at symbol.

The editor doesn't support it on Brainly.

You might be interested in
_______ imaging technology defines locations in the brain where neurons are especially active using safe radioactive isotopes to
Radda [10]

Answer:

Positron Emission Tomography (PET)

Explanation:

4 0
3 years ago
Read 2 more answers
What is the function of a header when writing HTML
marusya05 [52]
The Function of a header is that it makes your TEXT LOOK BIGGER

5 0
3 years ago
What is the difference between delete and backspace key?​
vladimir2022 [97]
They are the same thing
5 0
4 years ago
Read 2 more answers
You have been given a laptop to use for work. You connect the laptop to your company network, use it from home, and use it while
VashaNatasha [74]
  • You can get a antivirus subscription that will kill malwares
  • Also, you can avoid going on websites you don't trust
  • I hope this helps you.
4 0
3 years ago
You should see the following code in your programming
Karo-lina-s [1.5K]

Answer:

import simplegui

import random

def draw_handler(canvas):

for x in range(1000):

colorList = ["Yellow", "Red", "Purple", "White", "Green", "Blue", "Pink", "Orange"]

c = random.choice(colorList)

x = random.randint(1,600)

y = random.randint(1,600)

canvas.draw_point([x, y], c)

frame = simplegui.create_frame('Testing', 600, 600)

frame.set_canvas_background("Black")

frame.set_draw_handler(draw_handler)

frame.start()

Explanation:

I used a for loop, setting my range to 1000 which is how you create exactly 1000 points. Next, I defined my color array, my x randint value, and my y randint value. I set both the x and y randint values to 1 - 600 since the frame is 600x600. The rest is pretty self explanatory.

4 0
3 years ago
Other questions:
  • 7.14 LAB: Word frequencies Write a program that reads a list of words. Then, the program outputs those words and their frequenci
    10·1 answer
  • What is A/B Testing
    10·2 answers
  • How many water bottles must be collected to win?
    8·2 answers
  • Using computer software, compare the 2016 year-to-date sales through February to the 2017 year-to-date sales through February fo
    15·1 answer
  • What is the process for creating a new merge document for address labels?
    10·2 answers
  • The foundation of secure communication on the internet replies on asymmetric encryption, with the use of Public and Private keys
    10·1 answer
  • ¿cuáles son los usos que se le pueden dar a una bicicleta?
    6·1 answer
  • Which of the following is NOT one of the four benefits of using email?
    14·1 answer
  • Information about www
    14·1 answer
  • Look at the picture ​
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!