View previous topic :: View next topic
|
Author |
Message |
Vijay Gowda
New User
Joined: 02 Jun 2006 Posts: 7
|
|
|
|
Dear sir,
I want to create a Global temporary table in a program after that I have to Insert records from input file. After insert the sql code is displaying as zero. If tyr to fetch records from the same table in the very next step it fetching very first record n number of times
please let me what need to done to insert the records in to temp table.
Please send the syntax |
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Hi there,
Would u please restate ur following stmt:
fetch records from the same table in the very next step it fetching very first record n number of times
would u mean that every times its fetching first row from the table if this is the case then how r u fetching record using select or cursor?
Actually when a query returns multiple row then it is mandatory to use cursor |
|
Back to top |
|
|
surya_pathaus
Active User
Joined: 28 Aug 2006 Posts: 110
|
|
|
|
Hi Vijay,
There can be 2 chances to get the result as you said.
1) While inserting - Read file, move all the fields to host variables every time after read and then insert into Global Temporay Table.
Here If you miss to move fields after first record then every time first record's values will be inserted into Temporary Table.
This may lead to get the result as you said.
2) Cursor steps: Cursor Open, Fetch, Close may be in loop.
Check your program once and let us know. |
|
Back to top |
|
|
satya123 Warnings : 1 New User
Joined: 18 Aug 2006 Posts: 57
|
|
|
|
Hi
Can u just let me know how to create a global temporary table???? |
|
Back to top |
|
|
|