×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Must prepare requests that return result in temporary tables

Must prepare requests that return result in temporary tables

Must prepare requests that return result in temporary tables

(OP)
Hi,
I 've a code that work in a machine (UnixWare, informix 7.), but when i use the same code in a second machine with the same caracteristics, all requests that return result in temporary tables must be prepared otherwise they don't work.
Any Idea?
Thanks to ALL.

RE: Must prepare requests that return result in temporary tables

I have no idea what you asking. you'll have to provide more information.  How about some code?

RE: Must prepare requests that return result in temporary tables

(OP)
Ok,
In the first machine(A) i've requests like:
select * from table into temp tmp_table
select count(*) into counter from tmp_table
-->counter is 10 for example.

When i use this same code in the seconde machine(B)
-->counter is 0

I 've to change my code like:
req="select * from table into temp tmp_table"
prepare req_ex from req
execute req_ex
select count(*) into counter from tmp_table
-->counter is 10.

Any Idea about the reason?
Thanks!

RE: Must prepare requests that return result in temporary tables

Interesting problem.  You've definitely found a bug in the 4GL.  That's a nice work around.

In my past experience with Informix 4GL, I've seen a problem where if you were reusing a TEMP table that the 4GL would act just the way you've described.

For example, if you've used tmp_table and dropped it and then, again, used it as in 'select * from table into temp tmp_table', the table wouldn't populate.  It's like the drop command is ignored.

What happens if you create the temp table separately and the do something like this:

insert into tmp_table
   select * from table

Regards,


Ed
  

RE: Must prepare requests that return result in temporary tables

(OP)
when using the request in a single module it works, but in the global module it does'nt.(the tow formule work in a simple test code)
thanks FOR ALL Ed.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close