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
love history [14]
4 years ago
5

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

s of rows: (1) all suppliers in the input countries (SUPPLIERS TABLE) , and (2) products supplied by these suppliers (PRODUCTS TABLE). The returned suppliers should contain SupplierID, CompanyName, Phone, and Country. The returned products require their ProductID, ProductName, UnitPrice, SupplierID, and must be sorted by SupplierID. You must include a simple testing script to call your sp_Q1 using 'UK' and 'Canada' as its two inputs.
Computers and Technology
1 answer:
wolverine [178]4 years ago
5 0

Answer:

Kindly note that, you're to replace "at" with shift 2 as the brainly text editor can't take the symbol

If you are executing this script with any other script, Add "GO" to the line above "CREATE PROCEDURE", on a line all by itself, and it should fix that error of 'CREATE/ALTER PROCEDURE'

Explanation:

CREATE PROCEDURE sp_Q1

"at"country1 NVARCHAR(15),

"at"country2 NVARCHAR(15)

AS

BEGIN

  BEGIN

      SELECT SupplierID, CompanyName, Phone, Country FROM suppliers

      where Country in ("at"country1,"at"country2)

     

  SELECT ProductID, ProductName, UnitPrice, SupplierID FROM Products

      where SupplierID in(

      SELECT SupplierID FROM suppliers

      where Country in ("at"country1,"at"country2)) ORDER BY SupplierID

  END

END

GO

-- Testing script.

DECLARE "at"RC int

DECLARE "at"country1 nvarchar(15)

DECLARE "at"country2 nvarchar(15)

-- Set parameter values here.

set "at"country1='UK'

set "at"country2='Canada'

EXECUTE "at"RC = [dbo].[sp_Q1]

"at"country1

,"at"country2

GO

You might be interested in
What role do visual merchandisers play on the marketing team
almond37 [142]

They are responsible for the total merchandise or service presentation, the overall business/brand image, and even the building and placement of design elements.


8 0
3 years ago
Write a paper, 2-3 paragraphs that discuss how to defend ideas objectively through effective communication. Include the skills n
mojhsa [17]

Wot in tarnation? -_-

  • how to defend ideas objectively the effective communication
  1. Being clear and concrete so that your point gets across without any ambiguity that might make someone else interpret your idea in the wrong way
  2. Use language that is neutral and does not have any negative or positive connotations that might the listener or reader assume you have a bias
  3. Use evidence and data to back up your claim from reputable sources and not just your own personal opinion

  • Skills to prevent conflicts and promote buy-ins
  1. You need to know how to listen in order to communicate effectively, pay attention to how other people respond to what you say so you can either apologize for your behavior or look out for in the future. Listening also shows that you value the other person's opinion and thus might make them more likely to treat you with the same respect
  2. Encourage other people to buy into your ideas by being confident about them and again using evidence so that people can trust what you're saying has some merit to it.
8 0
3 years ago
You have been asked to write a program for the Duckie's Obstacle Race. The program calculates the total number of racers, the fa
oksano4ka [1.4K]

The program illustrates the use of loops and conditional statements

  • Conditional statements are used to make decisions
  • Loops are used for operations that must be repeated until a certain condition is met.

<h3>The race program</h3>

The program written in Python, where comments are used to explain each action is as follows:

#This initializes the variables to 0

totalRaceTime = 0; minRaceTime = 0; maxRaceTime = 0; countTimes = 0

#This gets input for the number of race times

numTimes = int(input("Number of times: "))

#This opens a sentinel controlled loop

while countTimes < numTimes:

   #This gets the race time

   raceTime = int(input("Race time: "))

   if countTimes == 0:

       minRaceTime = raceTime

       maxRaceTime = raceTime

   #This determines the highest race time

   if raceTime > maxRaceTime:

       maxRaceTime = raceTime

   #This determines the leest race time

   if raceTime < minRaceTime:

       minRaceTime = raceTime

   #This determines the total race time

   totalRaceTime+=raceTime

   countTimes+=1

#This prints the highest race time

print("Maximum: ",maxRaceTime)

#This prints the least race time

print("Minimum: ",minRaceTime)

#This prints the average race time

print("Average: ",round(totalRaceTime/numTimes,2))

Read more about while loops and conditional statements at:

brainly.com/question/24833629

4 0
2 years ago
Why are all the expert and tutor verified answers wrong???
posledela
They’re right, most of the time the question you ask can confuse them or you may say it incorrect etc.
3 0
2 years ago
Read 2 more answers
4.2 lesson practice help plzs
sertanlavr [38]

The output is 21 because c is incremented by 3 until it surpasses 10 and the value of c is added to sum each time the loop runs.

I hope this helps!

8 0
3 years ago
Other questions:
  • In what country did true printing first take place?
    12·2 answers
  • If num is an int which expression always evaluates to true if num holds an odd number
    15·1 answer
  • (True/False) Utilizing a higher bandwidth can support a larger volume of data (in bits per second) to be transmitted than a lowe
    13·2 answers
  • How do you understand a scientific problem? Give two (2) examples of a scientific problem you
    10·1 answer
  • Cliff just started working with a client who has a very disorganized AdWords account. What’s an effective way for him to begin r
    15·1 answer
  • Which two of the following skills are important for a meteorologist
    12·1 answer
  • A palindrome is a string that reads the same from left to right and from right to left. Design an algorithm to find the minimum
    15·1 answer
  • question 2 what are some types of software that you'd want to have an explicit application policy for? check all that apply.
    13·1 answer
  • Decades of research throughout the world have found a _____ correlation between academic achievement and socioeconomic status, l
    10·1 answer
  • What is the purpose of system software?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!