Click here to Skip to main content
14,639,270 members
Home » Discussions » Database
   

Database

 
AnswerRe: Basic Join Not Working (Copy From LAMP Forum) Pin
Chris Quinn19-Aug-16 2:34
MemberChris Quinn19-Aug-16 2:34 
Questionpostgresql or mysql? Pin
Member 907660914-Aug-16 20:21
MemberMember 907660914-Aug-16 20:21 
AnswerRe: postgresql or mysql? Pin
Richard MacCutchan14-Aug-16 21:29
mveRichard MacCutchan14-Aug-16 21:29 
AnswerRe: postgresql or mysql? Pin
Tim Carmichael15-Aug-16 10:22
MemberTim Carmichael15-Aug-16 10:22 
AnswerRe: postgresql or mysql? Pin
Eddy Vluggen15-Aug-16 14:22
professionalEddy Vluggen15-Aug-16 14:22 
AnswerRe: postgresql or mysql? Pin
Jörgen Andersson15-Aug-16 21:27
professionalJörgen Andersson15-Aug-16 21:27 
AnswerRe: postgresql or mysql? Pin
jonyj8-Sep-16 10:20
Memberjonyj8-Sep-16 10:20 
QuestionError when passing multiple values Pin
Jassim Rahma12-Aug-16 12:53
MemberJassim Rahma12-Aug-16 12:53 
Hi,

I have below stored procedure..

it only works when I pass single value like "US" but not when passing multiple values like "AE", "BH", "US", "FR"

when passing multiple values I get this error:
Procedure execution failed
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '")' at line 1

here is the stored procedure:
CREATE DEFINER=<code>root</code>@<code>127.0.0.1</code> PROCEDURE <code>sp_populate_memo_country_companies</code>(IN param_country varchar(255))
BEGIN
    SELECT locations.location_id, companies.company_name, locations.location_name, first_payroll, last_payroll
    FROM locations
    JOIN country ON country.country_code_alpha2 = locations.country_code
    JOIN companies ON companies.company_id = locations.company_id
    LEFT JOIN payroll ON payroll.location_id = locations.location_id
    WHERE locations.country_code IN (param_country) AND payroll_active = TRUE
    GROUP BY locations.location_id
    ORDER BY companies.company_name;
END

Kindly help...

Thanks,
Jassim[^]

Technology News @ www.JassimRahma.com

AnswerRe: Error when passing multiple values Pin
Mycroft Holmes12-Aug-16 14:21
professionalMycroft Holmes12-Aug-16 14:21 
GeneralRe: Error when passing multiple values Pin
Jassim Rahma13-Aug-16 5:32
MemberJassim Rahma13-Aug-16 5:32 
GeneralRe: Error when passing multiple values Pin
Richard MacCutchan13-Aug-16 6:03
mveRichard MacCutchan13-Aug-16 6:03 
GeneralRe: Error when passing multiple values Pin
Jassim Rahma13-Aug-16 7:08
MemberJassim Rahma13-Aug-16 7:08 
GeneralRe: Error when passing multiple values Pin
Richard MacCutchan13-Aug-16 8:29
mveRichard MacCutchan13-Aug-16 8:29 
GeneralRe: Error when passing multiple values Pin
Jassim Rahma13-Aug-16 11:12
MemberJassim Rahma13-Aug-16 11:12 
GeneralRe: Error when passing multiple values Pin
Victor Nijegorodov13-Aug-16 11:15
MemberVictor Nijegorodov13-Aug-16 11:15 
GeneralRe: Error when passing multiple values Pin
Jassim Rahma13-Aug-16 11:21
MemberJassim Rahma13-Aug-16 11:21 
GeneralRe: Error when passing multiple values Pin
Mycroft Holmes13-Aug-16 14:04
professionalMycroft Holmes13-Aug-16 14:04 
GeneralRe: Error when passing multiple values Pin
Jassim Rahma15-Aug-16 8:16
MemberJassim Rahma15-Aug-16 8:16 
GeneralRe: Error when passing multiple values Pin
Mycroft Holmes15-Aug-16 13:02
professionalMycroft Holmes15-Aug-16 13:02 
QuestionHow do Coders Get Database Experts? For a project Pin
TheOnlyRealTodd8-Aug-16 20:58
professionalTheOnlyRealTodd8-Aug-16 20:58 
AnswerRe: How do Coders Get Database Experts? For a project Pin
Mycroft Holmes9-Aug-16 13:04
professionalMycroft Holmes9-Aug-16 13:04 
AnswerRe: How do Coders Get Database Experts? For a project Pin
Nathan Minier10-Aug-16 1:21
professionalNathan Minier10-Aug-16 1:21 
AnswerRe: How do Coders Get Database Experts? For a project Pin
jschell12-Aug-16 11:15
Memberjschell12-Aug-16 11:15 
QuestionHow to pass varchar as WHERE field IN param Pin
Jassim Rahma5-Aug-16 5:14
MemberJassim Rahma5-Aug-16 5:14 
AnswerRe: How to pass varchar as WHERE field IN param Pin
Mycroft Holmes5-Aug-16 13:04
professionalMycroft Holmes5-Aug-16 13:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.