Tag Info

New answers tagged

1

You can pass one paramter for one Checkbox and set the default value of the paramter as NULL in Stored procedure. So for 5 checkbox you can go for 5 optional parameter, while executing stored procedure pass only those parameter for which checkbox is checked. Pass 2 parameter incase two checkbox is checked and so on. Now in stored procedure, you can handle ...


0

I think you might be looking for the USING clause: EXECUTE format('SELECT COALESCE(%I,col,$1) FROM public.TableMix WHERE name = $2', ruleName) USING (username, whateverTheSecondParameterIs); You use $1, $2, etc for placement-parameters, passed by USING. You use %I for itentifiers expanded by format. Update: If you want to ...


3

From the comments it sounds like you already have this fixed but I thought I would put in my 2 cents anyway. You have a handful of problems based on the code you have listed. @DimCount is declared as an int where you are trying to use it as a string. You are putting quotes around @dimtablename. I understand what you are trying to do there but you ...



Top 50 recent answers are included