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
In Microsoft PowerPoint, a _____ gives viewers a visual image of data, such as a line graph or a three-
Vera_Pavlovna [14]

Answer:

graph

Explanation:

I don't know anything else that would be a visual representation of data.

5 0
2 years ago
Write a program that uses an STL List of integers. a. The program will insert two integers, 5 and 6, at the end of the list. Nex
poizon [28]

Answer:

answer:

#include <iostream>

#include<list>

using namespace std;

bool Greater(int x) { return x>3; } int main() { list<int>l; /*Declare the list of integers*/ l.push_back(5); l.push_back(6); /*Insert 5 and 6 at the end of list*/ l.push_front(1); l.push_front(2); /*Insert 1 and 2 in front of the list*/ list<int>::iterator it = l.begin(); advance(it, 2); l.insert(it, 4); /*Insert 4 at position 3*/ for(list<int>::iterator i = l.begin();i != l.end();i++) cout<< *i << " "; /*Display the list*/ cout<<endl; l.erase(it); /*Delete the element 4 inserted at position 3*/ for(list<int>::iterator i = l.begin();i != l.end();i++) cout<< *i << " "; /*Display the list*/ cout<<endl;

l.remove_if(Greater); for(list<int>::iterator i = l.begin();i != l.end();i++) cout<< *i << " ";

/*Display the list*/

cout<<endl; return 0;

}

5 0
3 years ago
Read 2 more answers
Jamal likes the theme he has chosen, but he wants to make his presentation more interesting before he saves it. Which command gr
icang [17]

Answer: Variants

Customize

Explanation:

4 0
3 years ago
Read 2 more answers
Java
shutvik [7]

Answer:

import java.util.Scanner;

//The Temperature Class Begins Here

public class Temperature {

   private double ftemp;

//The constructor

   public Temperature(double ftemp) {

       this.ftemp = ftemp;

   }

//Get farenheit Method

   public double getFtemp() {

       return ftemp;

   }

//Set farenheit method

   public void setFtemp(double ftemp) {

       this.ftemp = ftemp;

   }

// Get Celcius Method

   public double getCelcius(double ftemp){

       //double celcius =  (double) (5/9) * (ftemp - 32);

       double   celcius = (ftemp-32)* (double)5/9;

       return celcius;

   }

// Get Kelvin Method

   public double getKelving(double ftemp){

       double Kelvin;

       Kelvin = (ftemp-32)*(double)5/9 + 273.15;

       return Kelvin;

   }

}

//The Temperature Class Ends Here

//The Temperature Test Class with a main method begins Here

class TemperatureTest{

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

//Prompt User for value in fahrenheit

       System.out.println("Enter·a·Fahrenheit·temperature:");

       double ftem = in.nextDouble();

       //Making the instance of the Temperature class

       Temperature temp = new Temperature(ftem);

       //Outputing Results

       System.out.println("The·temperature·in·Fahrenheit·i: "+ftem);

       System.out.println("The·temperature·in·Celcius·is: "+ temp.getCelcius(ftem));

       System.out.println("The·temperature·in·Kelvin·is: " + temp.getKelving(ftem));

   }

}

Explanation:

This is implemented in Java programming Language

Explanations are provided as comments within the code

3 0
2 years ago
A genus is a group of organisms that is very closely related.<br><br> True<br><br> False
GREYUIT [131]
True if it is biology or biotech 3/4 but if it anotomy it is false
7 0
3 years ago
Other questions:
  • How many shared keys are required for a company of 70 employees who all need to communicate securely with each other?
    13·1 answer
  • Can you subnet the 172.16.128.0/17 network address to support this subnet?
    6·1 answer
  • Which button is used to open the Start menu in Windows Vista?
    14·1 answer
  • What aspect of web design is Gloria following when she uses the same color scheme throughout a web page?
    12·1 answer
  • Troubleshooting a printer that does not work includes a. connecting the printer to your computer b. checking to see if there is
    13·1 answer
  • Help me match these answers
    5·1 answer
  • Which party controlled the White House and politics in the late 1800s, except for Grover
    6·2 answers
  • What kind of word is the pronoun in bold letters?
    5·2 answers
  • Which game title went on to become the highest selling unbundled cartridge game?
    11·1 answer
  • Write a recursive, string-valued method, reverse, that accepts a string and returns a new string consisting of the original stri
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!