Click here to Skip to main content
15,119,637 members
Home / Discussions / Database
   

Database

 
AnswerRe: Basic Join Not Working (Copy From LAMP Forum) Pin
Chris Quinn19-Aug-16 3:34
MemberChris Quinn19-Aug-16 3:34 
Questionpostgresql or mysql? Pin
Member 907660914-Aug-16 21:21
MemberMember 907660914-Aug-16 21:21 
AnswerRe: postgresql or mysql? Pin
Richard MacCutchan14-Aug-16 22:29
mveRichard MacCutchan14-Aug-16 22:29 
AnswerRe: postgresql or mysql? Pin
Tim Carmichael15-Aug-16 11:22
MemberTim Carmichael15-Aug-16 11:22 
AnswerRe: postgresql or mysql? Pin
Eddy Vluggen15-Aug-16 15:22
professionalEddy Vluggen15-Aug-16 15:22 
AnswerRe: postgresql or mysql? Pin
Jörgen Andersson15-Aug-16 22:27
professionalJörgen Andersson15-Aug-16 22:27 
AnswerRe: postgresql or mysql? Pin
jonyj8-Sep-16 11:20
Memberjonyj8-Sep-16 11:20 
QuestionError when passing multiple values Pin
Jassim Rahma12-Aug-16 13:53
MemberJassim Rahma12-Aug-16 13: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:
SQL
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 15:21
professionalMycroft Holmes12-Aug-16 15:21 
GeneralRe: Error when passing multiple values Pin
Jassim Rahma13-Aug-16 6:32
MemberJassim Rahma13-Aug-16 6:32 
GeneralRe: Error when passing multiple values Pin
Richard MacCutchan13-Aug-16 7:03
mveRichard MacCutchan13-Aug-16 7:03 
GeneralRe: Error when passing multiple values Pin
Jassim Rahma13-Aug-16 8:08
MemberJassim Rahma13-Aug-16 8:08 
GeneralRe: Error when passing multiple values Pin
Richard MacCutchan13-Aug-16 9:29
mveRichard MacCutchan13-Aug-16 9:29 
GeneralRe: Error when passing multiple values Pin
Jassim Rahma13-Aug-16 12:12
MemberJassim Rahma13-Aug-16 12:12 
GeneralRe: Error when passing multiple values Pin
Victor Nijegorodov13-Aug-16 12:15
MemberVictor Nijegorodov13-Aug-16 12:15 
GeneralRe: Error when passing multiple values Pin
Jassim Rahma13-Aug-16 12:21
MemberJassim Rahma13-Aug-16 12:21 
GeneralRe: Error when passing multiple values Pin
Mycroft Holmes13-Aug-16 15:04
professionalMycroft Holmes13-Aug-16 15:04 
GeneralRe: Error when passing multiple values Pin
Jassim Rahma15-Aug-16 9:16
MemberJassim Rahma15-Aug-16 9:16 
GeneralRe: Error when passing multiple values Pin
Mycroft Holmes15-Aug-16 14:02
professionalMycroft Holmes15-Aug-16 14:02 
QuestionHow do Coders Get Database Experts? For a project Pin
TheOnlyRealTodd8-Aug-16 21:58
professionalTheOnlyRealTodd8-Aug-16 21:58 
AnswerRe: How do Coders Get Database Experts? For a project Pin
Mycroft Holmes9-Aug-16 14:04
professionalMycroft Holmes9-Aug-16 14:04 
AnswerRe: How do Coders Get Database Experts? For a project Pin
Nathan Minier10-Aug-16 2:21
professionalNathan Minier10-Aug-16 2:21 
AnswerRe: How do Coders Get Database Experts? For a project Pin
jschell12-Aug-16 12:15
Memberjschell12-Aug-16 12:15 
QuestionHow to pass varchar as WHERE field IN param Pin
Jassim Rahma5-Aug-16 6:14
MemberJassim Rahma5-Aug-16 6:14 
AnswerRe: How to pass varchar as WHERE field IN param Pin
Mycroft Holmes5-Aug-16 14:04
professionalMycroft Holmes5-Aug-16 14: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.