3,449 reputation
512
bio website
location Vancouver, Canada
age
visits member for 3 years
seen 19 hours ago

Jul
9
comment Building a Trending query
@Mr.Concolato : do date '2013-12-30' - interval .... : ` .... SELECT n-interval '1 day' FROM t WHERE n >=(date '2013-12-30'-interval '365 day') ....`
Jul
9
comment Building a Trending query
check updated version. In case I misunderstood the question (I thought you need a running total), just change current_date to whatever end date you want.
Jul
9
revised Building a Trending query
added 659 characters in body
Jul
9
answered Building a Trending query
Jul
2
awarded  Curious
Jun
28
awarded  Yearling
Jun
22
answered Msg 2627 Violation of PRIMARY KEY constraint
Jun
18
answered selecting rows that have n foreign key conditions satisfied
Jun
4
awarded  Popular Question
Jun
2
comment Stored procedure performs worse than straight query
It sounds to me like parameter sniffing. Check blogs.msdn.com/b/turgays/archive/2013/09/10/… , there are some workarounds.
May
17
comment My stored procedures often get invalidated
DDL on any object that referred in the procedure causes its invalidation. you can check dependencies in dba_dependencies
May
3
asked Refreshing Materialized view creates many child cursors
Apr
28
comment How to generate current Oracle timestamp in perl?
You can use TO_TIMESTAMP or to_timestamp_tz Oracle functions that convert string to timestamp . INSERT ... VALUES(TO_TIMESTAMP('string', 'format'), ....
Apr
26
answered How to prepare executon plan for given sql query on a server with 4 processors (Oracle database)
Apr
17
answered SQl comand works in Workbench but not from Java Program
Apr
17
comment SQl comand works in Workbench but not from Java Program
How do you call it from java? You cannot just pass these lines to 'Statement.executeUpdate` . Each insert statement should be executed as a separate call to Statement.executeUpdate (and as far as I remember it should be no semicolon ). So you are getting connection object, set autoCommit to false, create a prepared statement object, execute inserts, and then commit (connection.commit)
Apr
12
comment Row_Number() not working with OVER PARTITION BY
@RateControl : Can you add D.CType to final resultset (I suspect it is TYPE1, not expected TYPE4 )? It appears to me that either B.I >= @Var1 in WHERE or joining C filters out fourth record from D .
Apr
6
comment Oracle 10g: same query, different plans on copies of the same DB
If you are using bind variables and histograms (enabled by default), I'd first of all blame bind peeking. Try disabling automatic histogram collection for the tables/columns involved.
Mar
28
awarded  Popular Question
Mar
27
revised SELECT first value from 3 tables that is not null
added 102 characters in body