Basically I have a query built that includes four sub queries.I use a timestamp in each one of the sub queries WHERE clause, and is becoming tedious to update this everytime I run the query. Is it possible to DECLARE a variable as a time stamp and then add the variable to each WHERE clause? If so can someone provide example? I would like to have a variable for the "begin" and "end' timestamps. Not sure if this is possible with Netezza.
My Example:
SELECT
Blah
From
BlahTable
WHERE
timestamp between '6/28/2011 00:00:00' and '6/28/2011 23:59:59'

