![]() |
with drvd_amts (acct_nbr, grp_br_ps_org_id, PSAmt) as (select d.acct_nbr, d.grp_br_ps_org_id, sum(d.pstd_ttl_amt) as PSAmt from psfs.ps_gl_acct_ldgr d where d.fiscal_yr_mth_nbr between 201500 and 201508 and d.acct_nbr between 130500 and 160500 group by d.grp_br_ps_org_id, d.acct_nbr) SELECT a.FA_ACCT, a.ERACBR, a.deptid,
13 May 2015
| 1 comment
,
|
![]() |
Hi everyone,
09 Oct 2014
| 3 comments
,
|
![]() |
Hello,
28 Mar 2013
,
|
![]() |
Hi Gurus, I am looking for some guidelines on when to use each of the following form of temporary tables: 1) Derived Table 2) Volatile Table 3) Global Temporary Table Any pointers will really help.
03 Jul 2012
| 3 comments
,
|
![]() |
We stumbled upon this by accident. We have a query that runs much faster when a group by is added to a derived table when one of the columns in the derived table is the result of a cast/concatenation operation. The first query/explain posted below has the group by in the derived table. It shows the cast/concatenation being resolved when the derived table is materialized in step 2 in the EXPLAIN. Result is 761 rows and I assume 761 resolutions of the cast/concatenation. The group by does not eliminate any dups.
03 May 2011
| 3 comments
,
|