title: teradata betq assigning variable from query
body: <p>I have a BTEQ script that has a parametrized date value. The date value is set based on another select query. How can I execute the select query to read the date and use in the BTEQ script
  Example</p>
  <h1>Read the max(order_date) from table1</h1>
  <p>select max(order_date) as max_order_date
  from table1</p>
  <h1>Use the max_order_date in the BTEQ</h1>
  <p>select max_order_date as report_run_dt, ....
  from table2
  ...</p>
  <p>How can I read the max_order_paramter and store it as date paamter to be passed to BTEQ</p>