merge statement gives error

2018-02-26 Thread Abhra Kar
Hi, Trying to execute the following statement merge into ABC as n using dual on (n.id=123) when matched update set aaa=222, bbb=333 when not matched insert (id, aaa) values (NEXTVAL(id),555); but gives syntax error.What should be the proper syntax[ Parameter values are properly

Re: stored procedure call is not working with "select procedure()" option

2018-02-20 Thread Abhra Kar
On Tue, Feb 20, 2018 at 9:52 PM, Adrian Klaver <adrian.kla...@aklaver.com> wrote: > On 02/20/2018 08:17 AM, Abhra Kar wrote: > >> >> >> On Tue, Feb 20, 2018 at 9:21 PM, Adrian Klaver <adrian.kla...@aklaver.com >> <mailto:adrian.kla...@aklaver.com>>

stored procedure call is not working with "select procedure()" option

2018-02-19 Thread Abhra Kar
Hi , I have a stored procedure name "procedure()". Which I am calling by -- Session sess = (Session)entityManager.getDelegate(); //entityManager is javax.persistent.EntityManager[ Properly Initialise] sess.createSQLQuery("select procedure()"); procedure is containing some

Re: postgres connection with port option in shell script

2018-02-17 Thread Abhra Kar
On Wed, Feb 14, 2018 at 9:03 PM, David G. Johnston < david.g.johns...@gmail.com> wrote: > On Wed, Feb 14, 2018 at 8:21 AM, Abhra Kar <abhra@gmail.com> wrote: > >> Hi, >> >> I want to get postgres connection in script file. I am executing >&

postgres connection with port option in shell script

2018-02-14 Thread Abhra Kar
Hi, I want to get postgres connection in script file. I am executing below command and successfully getting connected --- psql postgresql://$USER:$PASSWORD@$HOST/$DATABASE <

Found non-empty schema without metadata table error while migrating

2018-02-05 Thread Abhra Kar
Hi, Getting below error— exec] Flyway (Command-line Tool) v.1.1 [exec] [exec] Metadata table created: schema_version [exec] Schema initialized with version: 0 [exec] Flyway (Command-line Tool) v.1.1 [exec] [exec] ValidationException: Found non-empty

Re: Create schema with in a specific database from a script file

2018-02-01 Thread Abhra Kar
I executed the above script but schema created with in postgres db not with in ABC db. And in terminal didn't show the message connected to ABC database. What is wrong I am doing here? Regards, Abhra On Fri, Feb 2, 2018 at 7:48 AM, Melvin Davidson <melvin6...@gmail.com> wrote: >

Create schema with in a specific database from a script file

2018-02-01 Thread Abhra Kar
Hi, I have to write script for psql in a xyz.sh file which should create a schema in a specific data.In psql prompt I achieve it like -- postgres=# \c ABC ABC=# create schema authorization myschema In xyz.sh I executed the following script --- *su -c "psql -c \"\c ABC \""

Re: CannotAcquireResourceException in Junit

2018-01-24 Thread Abhra Kar
, Rob Sargent <robjsarg...@gmail.com> wrote: > > > On Jan 24, 2018, at 9:57 AM, Abhra Kar <abhra@gmail.com> wrote: > > > > > > Hi, > > I am getting the following error while running bunch of Junit > test cases through “ant

missing FROM-clause entry for table bbbb

2018-01-16 Thread Abhra Kar
Hi I tried to modify below sql command in postgres syntax--- insert into (id, groupid, ele_id, ro_element_id) ") select .nextval, :groupid, gosp.neteleid, gosp.hodev from net_ele gos, net_gos_prop gosp " where gos.eid in ( :eids ) and gos.id =