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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. dba2adm

    Please Help! How to get Case with aggreagte

    Thanks Dieter, I will try your SQL. I tried subscribing to teradataforum, but it didn't go thru. I will try again.
  2. dba2adm

    Please Help! How to get Case with aggreagte

    Thanks Dieter, I couln't come up with the correct SQL. Thats the reason the first join was incomplete. These is just only one case, The value from the case should be a, 1 if there an exact matching record where mst.dt1 = dat.dt and dat.ind = 1 b, if the above is not tru, then number of...
  3. dba2adm

    Please Help! How to get Case with aggreagte

    Thanks for the response. You are absolutely right, I am trying to get the working days based on certain conditions. This is my requirement. how do I extend your query to take care of all the three CASEs. select mst.*, case when mst.dt1 = dat.dt and dat.ind =1 then 1 case when dt1 < dt2...
  4. dba2adm

    Please Help! How to get Case with aggreagte

    I have another case where , when t1.col1 > t1.col2 then count( * ) from t2 else 0 it should be something like this Select t1.col1 , t1.col2, case when t1.col1 > t1.col2 then (select count(*) from t2 where t2.col1 between t1.col1 and t1.col2 and t2.col2 = 0) else 0 end (BYTEINT)...
  5. dba2adm

    Please Help! How to get Case with aggreagte

    Thanks Dieter, I am from the Oracle/DB2 bacground and thought of trying scalar sub queries before trying left outer join. Since, scalar doesn't work in this case, I should go with left outer join as you suggested. I even tried, select col1, col2, (select count*) ..) Again thanks for the...
  6. dba2adm

    Please Help! How to get Case with aggreagte

    Dear Group, Teradata Version: V2R5 I have been trying to solve this problem for more than a day and everytime I get differenty error. I want to update a certain table with count(*) of another table if certain condition is true, else update with 0. This is the portion I have problem with...

Part and Inventory Search

Back
Top