I figured this out by the way.
Case closed.
User Profile
Collapse
-
DATE being returned as math problem
I'm having an issue with a stored procedure I'm working on. One of the parameters is a DATE field. I'm attaching to this stored procedure with Crystal Reports, which is passing something like "2007-12-20" to the stored procedure.
When I try to use this variable (parameter) in a dynamic SQL statement, it keeps converting it to "2007 minus 12 minus 20" or "1975".
I haven't been able to find... -
Set Declared Variables...
I'm a SQL Server (T-SQL) developer. I'm used to being able to declare a variable in a stored procedure, and set it using either SET or SELECT.
T-SQL:
DECLARE @variable INT
SET @variable = 10
How do I do the equivalent in DB2 SQL? I've tried about every combination I can think of.
My stored procedure stub:
CREATE PROCEDURE DB.PINVENTORY_T OTALS (
IN VAR_DATE DATE )... -
Multiple Temp Tables
You'll have to excuse me as I'm familiar with T-SQL (SQL Server), not so much DB2 when creating stored procedures...
I'm trying to create a procedure where I build multiple temp tables (DECLARE GLOBAL TEMPORARY TABLE), insert data into each, then use those tables to insert data into a main temp table to be returned to a Crystal report.
I can create the procedure when I declare the table and insert some records:
...
No activity results to display
Show More
Leave a comment: