12,154 reputation
11947
bio website
location Munich
age
visits member for 3 years, 5 months
seen 14 mins ago

Oct
10
comment Need Query for th problem in oracle
@miracle173: the manual: docs.oracle.com/cd/E11882_01/server.112/e41084/… "Oracle recommends that you use the FROM clause OUTER JOIN syntax rather than the Oracle join operator"
Oct
10
comment Need Query for th problem in oracle
Just a side node: Oracle recommends to stop using the proprietary (+) operator and use the standard left join operator
Oct
9
comment Change existing column in PG to auto-incremental primary key
@zetah: Quote from the manual (the link I added): "the sequence is marked as "owned by" the column, so that it will be dropped if the column or table is dropped"
Oct
8
comment Detecting the locked table or row in SQL Server
Works for me too. Thanks a lot
Oct
8
comment Detecting the locked table or row in SQL Server
@MaxVernon: thanks for confirming that. But then I'm even more confused. Why does it not return anything although I know there is a lock and a blocked session?
Oct
8
comment Oracle 11g user created with Create session but able to update the table?
Please show us the complete script you used to create the user. And the update statement you are using.
Oct
8
comment Getting rid of partitioning in Postgresql 9
create table new_table as select * from parent_table. Then drop the old ones.
Oct
8
comment Use if exists in postgresql
And what is the expected output? I don't really understand the "then I want to check for flag_id=2 and value='Yes'" part.
Oct
8
comment Use if exists in postgresql
You need to provide a lot more details than that. Show us the table definition (as create table) show us some sample data (as insert into ...) and show us the expected output based on that sample data. Ideally create a sqlfiddle.com example
Oct
7
comment How to Search a Database of Package Deals for Specific Items with the Fewest Unwanted Extra Items
Which DBMS are you using? Postgres? Oracle?
Oct
6
comment PostgreSQL: How can I identify the connections which is blocking ALTER TABLE?
wiki.postgresql.org/wiki/Lock_Monitoring
Oct
6
comment CTE returns an empty set even though anchor is non-empty
See here for the Postgres example: sqlfiddle.com/#!15/04fab/3 When I try your statement with 1.4.181 (which is still beta btw), the statement never finishes (I killed it after 2 minutes) which smells like an infinite recursion.
Oct
6
comment CTE returns an empty set even though anchor is non-empty
When I run your statement (with the invalid join) in Postgres, it seems the recursion never finishes - my statement only stops because I have set a limit on the number of rows. So I would assume H2 silently stops the infinite recursion somehow. Btw: when I run your statement with H2 1.3.174 I get an General error: "java.lang.IndexOutOfBoundsException: Index: 0, Size: 0"
Oct
6
comment CTE returns an empty set even though anchor is non-empty
You have your join condition wrong. I guess WHERE recursive.child_id = cte.child_id should be WHERE recursive.parent_id = cte.child_id Unrelated, but: the parentheses around the individual selects are useless.
Oct
3
comment Oracle program “lsnrctl” is missing after the installation of 32bit Oracle client
@kubanczyk: but the lsnrctl only makes sense on the server where the listener is running.
Oct
2
comment Slow querys on billions-rows-table // index used
Postgres doesn't have clustered indexes (although it can cluster a table along an index - but that needs to be done manually and won't "stay")
Sep
28
comment How to combine a default value with a new value?
If really all values should have that prefix, I wouldn't even store that. Create a view that returns the concatenated value. There is no sense in storing data that is always the same thing.
Sep
28
comment How to combine a default value with a new value?
Which DBMS are you using? Postgres? Oracle?
Sep
28
comment Prevent gaps while using Identity/sequence object in sql server
"I want to prevent gaps in the primary key column" - why? The value of a primary key - especially an auto generated one - is meaningless. It's only purpose is to uniquely identify a row. And to do that job the value itself is totally meaningless. And gaps are equally meaningless.
Sep
28
comment DIRECT and SORTED in H2 and How to insert data with SORTED technique in H2
In the link you provided (right below the values clause)