/* Q1. (20 points)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.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\.\*/

Answers

Answer 1
Answer:

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.


Related Questions

What does I/O mean in computing​
Your friend sees an error message during Windows startup about a corrupted bootmgr file. He has another computer with a matching configuration and decides to copy the bootmgr file from the working computer to the computer with the problem. However, your friend is having problems finding the bootmgr file and asks for your help. What is your best response?
Develop a crawler that collects the email addresses in the visited web pages. You can write a function emails() that takes a document (as a string) as input and returns the set of email addresses (i.e., strings) appearing in it. You should use a regular expression to find the email addresses in the document.
The Internet is considered a WAN. *TrueFalse
Corey set up his presentation for delivery to his team.

software that interprets commands from the keyboard and mouse is also known as the? A. desktop B. Operating system C. operating disk D. hard drive

Answers

Answer:

C

Explanation:

Most slide layouts include at least one ________ by default.Question 2 options:

placeholder

action button

transition

animation

Answers

Hey

I think that the answer placeholder :)

Sry if im wrong tho

Answer:

The answer is placeholder.

When emergency changes have to be made to systems, the system software may have to be modified before changes to the requirements have been approved. Suggest a model of a pro- cess for making these modifications that will ensure that the requirements document and the system implementation do not become inconsistent.

Answers

Answer:

The Agile model

Explanation:

We can point out that this is all about the software development lifecycle model. In the software developmental lifecycle, the agile model is the most suited model that can be used to bring changes as per the requirement.

It is the model that provides huge flexibility as the changes can be made to the software even if the application is running. Moreover, this model follows documentation regarding the process of bringing the changes to the software. And even the new changes should pass the quality assurance test in order to go to the production phase.

What this does is that it actually ensures that your application is fit and is consistent to handle and perform operations.

"Packet switches have multiple links attached to them. For each attached link the packet switch has a/an ____________, which stores packets that the router is about to send into that link."link buffer

access buffer

output buffer

transmission buffer

none of the above

Answers

Answer: Output buffer

Explanation:

Each packet switches contain multiple links which are attached to it and for individually attached link the output buffer basically store packets. Then, the router send these packets into multiple links.

In output buffer, if the packets are transmitted into the links but it finds that the link is busy with the another packet for transmission. Then, that particular packet needs to be wait in output buffer.

Therefore, the output buffer is the correct option.

Define the function isEven which returns True, if a given number is even and returns False, if the number is odd. Execute the statement isEven(43) and display the output.

Answers

Answer:

Program :

#include <stdio.h> //header file

char* isEven(int number) //function

{

   if(number%2==0)

    return "True";

  else

   return "False";

}

int main() //mainfunction

{

   printf("%s",isEven(43)); //calling and display output.

   return 0; //return statement.

}

Output:

  • The above program gives as 45 output.

Explanation:

  • The above program is in c-language, The above function is used to check the number is even or odd.
  • If the number is even it returns true and if the number is odd, it returns false.
  • The print statement called that function while passing the number on the argument and print the result of the function.
  • The char* is used in return type because the function returns the string value.

Feature of word processing​

Answers

Answer:

the word processing

Explanation:

the word is a good word

Nice word i like processing word feature too i think words are cool
Other Questions
Write a program to read a list of exam scores given as integer percentages in the range 0-100. Display the total number of grades in each letter grade defined as follows:90-100 is an A, 80-89 is a B, 70-79 is a C, 60-69 is a D, 0-59 is an F. Use a negative score as a sentinel to indicate the end of the input. (The negative value is used just to end the loop, do not use it in the calculations). Then output the highest and lowest score, and the average score.For example if the input is: 72 98 87 50 70 86 85 78 73 72 72 66 63 85 -1the output would be:Total number of grades = 14Number of As =1Number of Bs = 4Number of Cs = 6Number of Ds = 2Number of Fs = 1The highest score is 98The lowest score is 50The average is 75.5This is what I have so far and it is not working correctly:public static void main(String[] args) {// scannerScanner scnr =new Scanner (System.in);//ints grades and countint x;int A = 0;int B = 0;int C = 0;int D = 0;int F = 0;int count = 1;//int min max totalint min, max;int total = 0 ;//doubledouble average;//prompt user for inputSystem.out.print("Please enter the exam scores as integer ");System.out.print("percentages in the rage 0-100. ");System.out.println("Please end the list with a negative integer.");//scnrx = scnr.nextInt();min = x;max = x;//while loopwhile (x >= 0){x = scnr.nextInt();if (x >= 0){total = total + x;count++;if (x < min)min = x;if (x > min)max = x; }while (x >= 90 && x <= 100) {x = scnr.nextInt();A++;//Grade Bif (x >= 80 && x <= 89)B++;//Grade Cif (x >= 70 && x <= 79)C++;//Grade Dif (x >= 60 && x <= 69)D++;//Grade Fif (x >= 0 && x <= 59)F++;}}// averageaverage = total/count;//results/outputSystem.out.println("Total number of grades: " + count);System.out.println("Number of A's: " + A);System.out.println("Number of B's: " + B);System.out.println("Number of C's: " + C);System.out.println("Number of D's: " + D);System.out.println("Number of F's: " + F);System.out.println("Highest score: " + max);System.out.println("Lowest score: " + min);System.out.println("Average: " + average);}}