Link to home
Start Free TrialLog in
Avatar of dnsvh
dnsvhFlag for United States of America

asked on

Declaring variables

I normally use MSSQL and am not as familiar with DB2.  In MSSQL, I can declare and set variables like this:

DECLARE @begdate DECIMAL(8,0)
DECLARE @enddate DECIMAL(8,0)

SET @begdate = '20060101'
SET @enddate = '20060626'

How would I do the same thing in DB2?

I am trying to run an SQL statement against an i5 database using iSeries Navigator.

Thanks.

Derrick
ASKER CERTIFIED SOLUTION
Avatar of Kent Olsen
Kent Olsen
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dnsvh

ASKER

Thanks, Kent.