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
Google Glass uses a projector that bounces a beam of light off a prism and projects the image directly on your ________. field o
ivolga24 [154]
In order to help the student expand his/her knowledge I will help answer the question. This in hope that the student will get a piece of knowledge that will help him/her through his/her homework or future tests.  
<span>
Google Glass uses a projector that bounces a beam of light off a prism and projects the image directly on your retina. This was shown and explained the day it was launched. </span>     <span> 

I hope it helps, Regards.</span>     <span> </span>
6 0
3 years ago
g If a class named Student has a data member named gpa , and one of its member functions has a parameter also named gpa , how ca
victus00 [196]

Answer:

By using the this keyword

Explanation:

The this keyword in java is used for pointing the current object or current variable .The this keyword is removing the ambiguity among the characteristics of the class as well as the variables with the similar name.

In the given question if the class student has member variable gpa also we have a method having the argument gpa with the help of this keyword we can refer the gpa variable inside the method .

Following are the implementation of the given question

public class Main // main class

{

 int gpa; // variable declaration

 public Main(int gpa) // constructor

 {

   this.gpa = gpa; // this keyword

 }

 public static void main(String[] args) // Main method

 {

   Main m= new Main(55); // creating object of class

   System.out.println("The Value of gpa is : " + m.gpa); // display value

 }

}

Output:

The Value of gpa is :55

5 0
3 years ago
The concept of ____ refers to the idea that the internet is designed for all content to be treated equally.
vitfil [10]
Net neutrality buddy boi
3 0
3 years ago
Which social media post indicates your home may be unattended?
victus00 [196]

Answer: A

Explanation:

It clearly shows your out

8 0
3 years ago
Which of the following is NOT AN EXAMPLE of personal identifying
alexgriva [62]

Answer:

Your Social security number .

Explanation:

  • Personal information is the information of. a person.
  • It includes The name,Address,number etc of the person .
  • the PAN,Debit and credit card number is also included .

6 0
3 years ago
Read 2 more answers
Other questions:
  • Although the battery on your smartphone is fully charged, it drains quickly. In some instances when the phone shows that the bat
    12·1 answer
  • In Paint, which of the following are ways to use a picture that you have saved on your computer? (Select all that apply.)
    8·1 answer
  • Which is the quickest way to change the font color in multiple, randomly located cells in a worksheet
    8·2 answers
  • What is the basic difference between a printer and a plotter?​
    12·1 answer
  • Suppose that a server sends four packets of audio data, in 15 seconds each. The first is sent by the server exactly at noon (12:
    14·1 answer
  • What is one pass of a coding sequence called?​
    13·2 answers
  • Yesterday you installed a new game on your computer. When you ran the computer, you noticed that the application was running ver
    10·1 answer
  • Can someone start me off with a short 2 or 3 paragraphs about the pros and cons of Microsoft Word, and if you can recommend a si
    12·1 answer
  • Question 1 (1 point)
    5·2 answers
  • Compared with other PC operating systems, the Linux-based operating systems:
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!