Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by leo6

  1. leo6

    DB2 SQL query

    Hi everybody, I have a DB2 query as follows . Basically it goes for a tablescan for TAB4 which is the table in the subquery under NOT EXISTS. Can the whole query be replaced using INNER JOIN between TAB1,TAB2,TAB3 and a LEFT OUTER JOIN for TAB4 ? Could anyone help me in this ? Thank you...
  2. leo6

    Executing JCL steps

    Hi , I have three copy steps in a JCL each of them passing a set of parameter inputs. Each copy step calls the same PROCLIB member that executes the COPY program. Now I need to run the second step after the first one.How can this be done? Because currently when I give more than one call to the...
  3. leo6

    Accessing GDGs

    Hi , I have a GDG having the current version as NS10.RAD.CFILE.G0070V00 . Can I access the 25th version of this GDG by writing as NS10.RAD.CFILE(25) ? Or NS10.RAD.CFILE(-45) ..(70-45 = 25) Because for current version, hope we can write something like NS10.RAD.CFILE(0) .Also...
  4. leo6

    Function-based indexes in DB2

    Hi , But, Oracle has got a concept of function-based indexes where the index will be used when you use that particular function over the column specified in the WHERE clause of the query.So they create index on "func(col1) " instead of col1. Does DB2 has something of this sort ? Thank you.
  5. leo6

    Function-based indexes in DB2

    Hi , Thanks for the response.Actually this query has got additional columns of tab2 in the WHERE clause.Basically. I would like to know how to create indexes over functions applied on columns of the table. In this case, can i create one, on the function, "LOWER(a.col2) " ? And I am just...
  6. leo6

    Function-based indexes in DB2

    Hi , I have a DB2 SQL query like : select a.col1,b.col1 from tab1 a, tab2 b where a.col1=b.col1 and lower(a.col2) = <value> how can i create an index on the function, lower(a.col2) so that the query uses the index. currently index for a is on (col1,col2) but the query for a goes for a TBSCAN...
  7. leo6

    Function-based indexes in DB2

    Hi , I have a DB2 SQL query like : select a.col1,b.col1 from tab1 a, tab2 b where a.col1=b.col1 and lower(a.col2) = <value> how can i create an index on the function, lower(a.col2) so that the query uses the index. currently index for a is on (col1,col2) but the query for a goes for a TBSCAN .
  8. leo6

    Shrink a dataset to smaller column length

    Hi , Can a dataset file be shrinked by removing data between specific column locations using REXX in Mainframes? For eg.,consider a dataset having 4 records as , abc defghijklmnopqrs abc defghijklmnopqrs abc defghijklmnopqrs abc defghijklmnopqrs I would like to have the output file as ...
  9. leo6

    Shrink a dataset file to smaller column length

    Hi , Can a dataset file be shrinked by removing data between specific column locations using REXX in Mainframes? For eg.,consider a dataset having 4 records as , abc defghijklmnopqrs abc defghijklmnopqrs abc defghijklmnopqrs abc defghijklmnopqrs I want the output file to be ...
  10. leo6

    For execution performance

    I was looking for performance improvement on this... Is it possible ??? select a.col1 , a.col2 from tab1 a, tab2 b where a.col3=b.col3 and a.col4 = <constant>
  11. leo6

    Query for optimization

    I was looking for performance improvement on this... Is it possible ??? select a.col1 , a.col2 from tab1 a, tab2 b where a.col3=b.col3 and a.col4 = <constant>
  12. leo6

    Query for optimization

    Could this query run better ? select a.col1 , a.col2 from tab1 a, tab2 b where a.col3=b.col3 and a.col4 = <constant> a.col3=b.col3 is required because we need the output when a.col3 has a matching value for b.col3
  13. leo6

    SQL Query

    can the below DB2 query be optimised ? select dense_rank() over(order by emp_no) from employee_role a where grade = 1 and ( emp_status like '%3%' or emp_status like '%6%' or emp_status like '%4%' ) and entryid > (select COALESCE(max(entryid),a.entryid-1) from employee_role where...
  14. leo6

    Can JOIN be used to select MAX instead of subselect?

    From the given table , COLA COLB COLC COLD ---- ---- ---- ---- 1 4 a 1 2 6 s 2 4 9 d 3 3 17 e 1 5 11 f 2 6 15 r 3 I would like to retreive, COLA COLB COLC ---- ---- ---- 3 17 e ie., values for COLA,COLB...
  15. leo6

    Select specific Columns for MAX value of a column

    No,,both = and IN are the same.I was wondering if join could be used??

Part and Inventory Search

Back
Top