Re: Help : Update and insert record based on several value in the parameter

2019-01-29 Thread Tony Shelver
I don't know what you are using as a front end to call this update, but I have been finding json/jsonb parameters passed into a function / procedure and then using postgres json functions to process the data as a good solution. If your data fits postgres array datatype, as others have mentioned, t

Re: Help : Update and insert record based on several value in the parameter

2019-01-29 Thread Pavel Stehule
Ășt 29. 1. 2019 v 13:50 odesĂ­latel Hengky Lie napsal: > Hi, > > I want to create a function to update my table (flag='9') and insert new > record (flag='0') with the rfidnumber specified in a parameter. > > This parameter may have several value seperated by space (ie. 11 22 33 44) > For this kind

Re: Help : Update and insert record based on several value in the parameter

2019-01-29 Thread Andrew Gierth
> "Hengky" == Hengky Lie writes: Hengky> Hi, Hengky> I want to create a function to update my table (flag='9') and Hengky> insert new record (flag='0') with the rfidnumber specified in a Hengky> parameter. rfidnumber is stored as text/varchar? if it's something else, change the suggesti

Help : Update and insert record based on several value in the parameter

2019-01-29 Thread Hengky Lie
Hi, I want to create a function to update my table (flag='9') and insert new record (flag='0') with the rfidnumber specified in a parameter. This parameter may have several value seperated by space (ie. 11 22 33 44) CREATE OR REPLACE FUNCTION public.fcreate_rfid ( znumber varchar ) RETURNS boo

Help : Update and insert record based on several value in the parameter

2019-01-29 Thread Hengky Lie
Hi, I want to create a function to update my table (flag='9') and insert new record (flag='0') with the rfidnumber specified in a parameter. This parameter may have several value seperated by space (ie. 11 22 33 44) CREATE OR REPLACE FUNCTION public.fcreate_rfid ( znumber varchar ) RETURNS boo