December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.
Which works fine but I'm migrating it to DB2. I have the following:
DECLARE @TotAcct VARCHAR(20) SET @TotAcct = ( SELECT COUNT(*) FROM ACCOUNT a ) PRINT 'Total Account: ' + @TotAcct
CREATE VARIABLE TotAcct INTEGER; SET TotAcct = ( SELECT COUNT(*) FROM ACCOUNT a); DISPLAY 'Total Account: ' + TotAcct; DROP VARIABLE TotAcct;
Join the community of 500,000 technology professionals and ask your questions.