×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
Nothing that complicated. Here is the cursor:
exec sql
Declare CurAuto Cursor For
With TempTable As
(Select
WOS3LDEN
From
QAOKP03A
Where
WOS3DDEN = :DirEDs.DirE and
WOS3DDGN = 'DA400' and
WOS3LDGN = 'TASKLIST')
Select
*
From
TDTasks, TDActions
Where
TskStatus <> 'Completed' and
TskActID = ActID and
((TskCurUsr = :DirEDs.DirE) or (:DirEDs.DirE = 'QPGMR') or
(TskCurUsr in (Select WOS3LDEN From TempTable)) or
((TskCurUsr = ' ') and
((TskAssTyp = 'U' and TskAssUsr = :DirEDs.DirE) or
(TskAssTyp = 'G' and TskAssUsr in
(Select WOS3LDEN From TempTable)))))
Order By
TskDueDate, TskPrty, TskId;
TdTasks/TdActions are tables that keep the users To-Do Lists - which are
assigned by either Directory Entries or membership in Distribution Lists.
The way this is declared, it is my understanding (or at least expectation)
that the TempTable would be recreated/refreshed on each Open of the cursor.
--------------------------------------------------
From: "Jim Franz" <jfranz@xxxxxxxxxxxx>
Sent: Sunday, August 09, 2009 9:00 AM
To: "RPG programming on the IBM i / System i" <rpg400-l@xxxxxxxxxxxx>
Subject: Re: TempTable not found error - SQL0204
Is this what you are doing?
<clip from info center>
You can create a temporary table for use with your current session. To
create a temporary table, use the DECLARE GLOBAL TEMPORARY TABLE
statement.
This temporary table does not appear in the system catalog and cannot be
shared by other sessions. When you end your session, the rows of the table
are deleted and the table is dropped...
This table is created in QTEMP....</clip>
As an Amazon Associate we earn from qualifying purchases.