I need to merge two queries with condition I have the following query: 

SELECT
URYRR_FORWARDS_REC_H.CB_LINE as "CB_LINE",
URYRR_FORWARDS_REC_H.CB_LINE_DESCRIPTION as "DESCRIPCION",
URYRR_FORWARDS_REC_H.UYU_BALANCE_FW as "MONEDA LOCAL",
URYRR_FORWARDS_REC_H.USD_BALANCE_FW as "MONEDA EXTRANJERA",
URYRR_FORWARDS_REC_H.UYU_BALANCE_COA as "MONEDA LOCAL",
URYRR_FORWARDS_REC_H.USD_BALANCE_COA as "MONEDA EXTRANJERA",
URYRR_FORWARDS_REC_H.DIFFERENCE_MN as "MONEDA LOCAL",
URYRR_FORWARDS_REC_H.DIFFERENCE_ME as " MONEDA EXTRANJERA"
FROM
  TNLRUY.URYRR_FORWARDS_REC_H

WHERE
1=1
&lt;#if BOOK_DATE??&amp;&amp; BOOK_DATE?trim !=''&gt; 
AND BOOK_DATE=to_date(:BOOK_DATE,'yyyy-mm-dd')
&lt;/#if&gt;


and another query:

SELECT
URYRR_FORWARDS_REC_H.CB_LINE as "CB_LINE",
URYRR_FORWARDS_REC_H.CB_LINE_DESCRIPTION as "DESCRIPCION",
URYRR_FORWARDS_REC_H.UYU_BALANCE_FW as "MONEDA LOCAL",
URYRR_FORWARDS_REC_H.USD_BALANCE_FW as "MONEDA EXTRANJERA",
URYRR_FORWARDS_REC_H.UYU_BALANCE_COA as "MONEDA LOCAL",
URYRR_FORWARDS_REC_H.USD_BALANCE_COA as "MONEDA EXTRANJERA",
URYRR_FORWARDS_REC_H.DIFFERENCE_MN as "MONEDA LOCAL",
URYRR_FORWARDS_REC_H.DIFFERENCE_ME as " MONEDA EXTRANJERA"
FROM
  TNLRUY.URYRR_FORWARDS_REC_H


My requirment is that if I enter the BOOK_DATE then it should execute the first query, and If I leave BOOK_DATE blank then the second query will execute.
Make your where clause operate conditionally based on your input value like this:

SELECT
URYRR_FORWARDS_REC_H.CB_LINE as "CB_LINE",
URYRR_FORWARDS_REC_H.CB_LINE_DESCRIPTION as "DESCRIPCION",
URYRR_FORWARDS_REC_H.UYU_BALANCE_FW as "MONEDA LOCAL",
URYRR_FORWARDS_REC_H.USD_BALANCE_FW as "MONEDA EXTRANJERA",
URYRR_FORWARDS_REC_H.UYU_BALANCE_COA as "MONEDA LOCAL",
URYRR_FORWARDS_REC_H.USD_BALANCE_COA as "MONEDA EXTRANJERA",
URYRR_FORWARDS_REC_H.DIFFERENCE_MN as "MONEDA LOCAL",
URYRR_FORWARDS_REC_H.DIFFERENCE_ME as " MONEDA EXTRANJERA"
FROM TNLRUY.URYRR_FORWARDS_REC_H
WHERE (:BOOK_DATE IS NULL OR
    (:BOOK_DATE IS NOT NULL AND BOOK_DATE=to_date(:BOOK_DATE,'yyyy-mm-dd'));