SlideShare a Scribd company logo
1 of 1
How do I alter this stored procedure to show all people in the stored procedure, even if they don't
have a role?
ALTER PROCEDURE [dbo].[personSelectAll]
-- Add the parameters for the stored procedure here
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra result sets from
-- interfering with SELECT statements.
SET NOCOUNT ON;
-- Insert statements for procedure here
SELECT Person.personID, Person.firstName, Person.lastName, Person.email, Person.phone,
ValidRole.roleDesc
FROM Person INNER JOIN
PersonRole ON Person.personID =PersonRole.personID INNER JOIN
ValidRole ON PersonRole.roleID = ValidRole.roleID
order by lastname, firstname
END

More Related Content

More from PaulntmMilleri

I- Explain this abstract and use some key points to use review some co.docx
I- Explain this abstract and use some key points to use review some co.docxI- Explain this abstract and use some key points to use review some co.docx
I- Explain this abstract and use some key points to use review some co.docx
PaulntmMilleri
 
I've also gathered a list of the primary selling features that Lavish.docx
I've also gathered a list of the primary selling features that Lavish.docxI've also gathered a list of the primary selling features that Lavish.docx
I've also gathered a list of the primary selling features that Lavish.docx
PaulntmMilleri
 
I- CASE STUDY- Trip Management System- Previously people wishing to vi.docx
I- CASE STUDY- Trip Management System- Previously people wishing to vi.docxI- CASE STUDY- Trip Management System- Previously people wishing to vi.docx
I- CASE STUDY- Trip Management System- Previously people wishing to vi.docx
PaulntmMilleri
 

More from PaulntmMilleri (20)

If France and Korea engage in substantial trade but little financial f.docx
If France and Korea engage in substantial trade but little financial f.docxIf France and Korea engage in substantial trade but little financial f.docx
If France and Korea engage in substantial trade but little financial f.docx
 
If a method overloads another method- can the two methods have differe.docx
If a method overloads another method- can the two methods have differe.docxIf a method overloads another method- can the two methods have differe.docx
If a method overloads another method- can the two methods have differe.docx
 
If Assets equal $150 and Liabilities equal $30- what does Owner's Equi.docx
If Assets equal $150 and Liabilities equal $30- what does Owner's Equi.docxIf Assets equal $150 and Liabilities equal $30- what does Owner's Equi.docx
If Assets equal $150 and Liabilities equal $30- what does Owner's Equi.docx
 
If a random variable X is uniformly distributed between 0 and 5 - what.docx
If a random variable X is uniformly distributed between 0 and 5 - what.docxIf a random variable X is uniformly distributed between 0 and 5 - what.docx
If a random variable X is uniformly distributed between 0 and 5 - what.docx
 
If a corpus contains 10-000 documents- and a search query retrieves 10.docx
If a corpus contains 10-000 documents- and a search query retrieves 10.docxIf a corpus contains 10-000 documents- and a search query retrieves 10.docx
If a corpus contains 10-000 documents- and a search query retrieves 10.docx
 
I- Explain this abstract and use some key points to use review some co.docx
I- Explain this abstract and use some key points to use review some co.docxI- Explain this abstract and use some key points to use review some co.docx
I- Explain this abstract and use some key points to use review some co.docx
 
Identify the structure located at the point marked H- Do not give the.docx
Identify the structure located at the point marked H- Do not give the.docxIdentify the structure located at the point marked H- Do not give the.docx
Identify the structure located at the point marked H- Do not give the.docx
 
Identify different aspects of organisational culture in some contempor.docx
Identify different aspects of organisational culture in some contempor.docxIdentify different aspects of organisational culture in some contempor.docx
Identify different aspects of organisational culture in some contempor.docx
 
Identify and describe two ways that non-imaging providers- such as phy.docx
Identify and describe two ways that non-imaging providers- such as phy.docxIdentify and describe two ways that non-imaging providers- such as phy.docx
Identify and describe two ways that non-imaging providers- such as phy.docx
 
Ibrahim is able to lend money to Naif (direct finance) with higher int.docx
Ibrahim is able to lend money to Naif (direct finance) with higher int.docxIbrahim is able to lend money to Naif (direct finance) with higher int.docx
Ibrahim is able to lend money to Naif (direct finance) with higher int.docx
 
ib - ifpenata-1Journal Entries for Purchase- Return- and Remittance-Pe.docx
ib - ifpenata-1Journal Entries for Purchase- Return- and Remittance-Pe.docxib - ifpenata-1Journal Entries for Purchase- Return- and Remittance-Pe.docx
ib - ifpenata-1Journal Entries for Purchase- Return- and Remittance-Pe.docx
 
I've also gathered a list of the primary selling features that Lavish.docx
I've also gathered a list of the primary selling features that Lavish.docxI've also gathered a list of the primary selling features that Lavish.docx
I've also gathered a list of the primary selling features that Lavish.docx
 
I wanted to test the serum of patients to see if they have antibodies.docx
I wanted to test the serum of patients to see if they have antibodies.docxI wanted to test the serum of patients to see if they have antibodies.docx
I wanted to test the serum of patients to see if they have antibodies.docx
 
I- CASE STUDY- Trip Management System- Previously people wishing to vi.docx
I- CASE STUDY- Trip Management System- Previously people wishing to vi.docxI- CASE STUDY- Trip Management System- Previously people wishing to vi.docx
I- CASE STUDY- Trip Management System- Previously people wishing to vi.docx
 
I thought if the Liquidity Effect is fast but small and other effects.docx
I thought if the Liquidity Effect is fast but small and other effects.docxI thought if the Liquidity Effect is fast but small and other effects.docx
I thought if the Liquidity Effect is fast but small and other effects.docx
 
I need to create a table by hand here is what I have so far- ID in.docx
I need to create a table by hand here is what I have so far-     ID in.docxI need to create a table by hand here is what I have so far-     ID in.docx
I need to create a table by hand here is what I have so far- ID in.docx
 
How to split a string before a period using regex- Hi I have a String.docx
How to split a string before a period using regex- Hi I have a String.docxHow to split a string before a period using regex- Hi I have a String.docx
How to split a string before a period using regex- Hi I have a String.docx
 
How The Factor (Technology) Influence The Demand For Maritime Transpor.docx
How The Factor (Technology) Influence The Demand For Maritime Transpor.docxHow The Factor (Technology) Influence The Demand For Maritime Transpor.docx
How The Factor (Technology) Influence The Demand For Maritime Transpor.docx
 
How many years do scientists believe it took Earth to grow to its pres.docx
How many years do scientists believe it took Earth to grow to its pres.docxHow many years do scientists believe it took Earth to grow to its pres.docx
How many years do scientists believe it took Earth to grow to its pres.docx
 
How is JDBC used in MVC applications- a- To generate Data Access Objec.docx
How is JDBC used in MVC applications- a- To generate Data Access Objec.docxHow is JDBC used in MVC applications- a- To generate Data Access Objec.docx
How is JDBC used in MVC applications- a- To generate Data Access Objec.docx
 

Recently uploaded

Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
Chris Hunter
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.
MateoGardella
 
An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdf
SanaAli374401
 

Recently uploaded (20)

psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.
 
An Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdfAn Overview of Mutual Funds Bcom Project.pdf
An Overview of Mutual Funds Bcom Project.pdf
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 

How do I alter this stored procedure to show all people in the stored.docx

  • 1. How do I alter this stored procedure to show all people in the stored procedure, even if they don't have a role? ALTER PROCEDURE [dbo].[personSelectAll] -- Add the parameters for the stored procedure here AS BEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET NOCOUNT ON; -- Insert statements for procedure here SELECT Person.personID, Person.firstName, Person.lastName, Person.email, Person.phone, ValidRole.roleDesc FROM Person INNER JOIN PersonRole ON Person.personID =PersonRole.personID INNER JOIN ValidRole ON PersonRole.roleID = ValidRole.roleID order by lastname, firstname END