Search found 19 matches

by poonamgoyal
Wed Jun 28, 2006 4:41 am
Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
Topic: need sql help for select min
Replies: 23
Views: 30316

what is the need of creating these aliases as it ll add to performance overhead i think
by poonamgoyal
Wed Jun 28, 2006 2:46 am
Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
Topic: need sql help for select min
Replies: 23
Views: 30316

Since MIN can only be a single value, your WHERE clause can be made more efficient (depending on whether the query optimizer does this anyway). Relace "IN" with "=" as the comparison operation. [cod ... I never knew about this use of '=' thanks, i tried it works fine, if it impr...
by poonamgoyal
Wed Jun 28, 2006 2:44 am
Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
Topic: need sql help for select min
Replies: 23
Views: 30316

Re: need sql help for select min

well i have some simple query using subqueries if you want to try: SELECT PERIOD.CPY_0,PERIOD.FIYNUM_0,PERIOD.PERNUM_0, TO_CHAR(PERIOD.PERSTR_0, 'YYYY-MM-DD HH24:MI:SS'), FROM #LNomDos#.PERIOD WHERE PERIOD.PERSTR_0 IN (SELECT MIN(TO_CHAR(PERIOD.PERSTR_0, 'YYYY-MM-DD HH24:MI:SS')) FROM #LNomDos#.PER...
by poonamgoyal
Tue Jun 27, 2006 11:51 pm
Forum: IBM<sup>®</sup> Infosphere DataStage Server Edition
Topic: need sql help for select min
Replies: 23
Views: 30316

Re: need sql help for select min

well i have some simple query using subqueries if you want to try: SELECT PERIOD.CPY_0,PERIOD.FIYNUM_0,PERIOD.PERNUM_0, TO_CHAR(PERIOD.PERSTR_0, 'YYYY-MM-DD HH24:MI:SS'), FROM #LNomDos#.PERIOD WHERE PERIOD.PERSTR_0 IN (SELECT MIN(TO_CHAR(PERIOD.PERSTR_0, 'YYYY-MM-DD HH24:MI:SS')) FROM #LNomDos#.PERI...