User Profile

Collapse

Profile Sidebar

Collapse
kizmar
kizmar
Last Activity: Feb 28 '08, 06:51 PM
Joined: May 24 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • kizmar
    replied to DATE being returned as math problem
    in DB2
    I figured this out by the way.

    Case closed.
    See more | Go to post

    Leave a comment:


  • kizmar
    started a topic DATE being returned as math problem
    in DB2

    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...
    See more | Go to post

  • kizmar
    started a topic Set Declared Variables...
    in DB2

    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 )...
    See more | Go to post
    Last edited by kizmar; Jun 4 '07, 07:12 PM. Reason: Masking of DB Name

  • kizmar
    started a topic Multiple Temp Tables
    in DB2

    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:
    ...
    See more | Go to post
    Last edited by kizmar; May 24 '07, 02:59 PM. Reason: Spacing
No activity results to display
Show More
Working...