If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > local variable to be used for from in select statment

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-24-09, 04:49
vnitinv vnitinv is offline
Registered User
 
Join Date: Dec 2009
Posts: 1
local variable to be used for from in select statment

Hi all,

I have declared one variable in my procedure
DEFINE trans_table varchar(32);

then storing different table name in this variable using

FOREACH WITH HOLD SELECT tabname INTO trans_table FROM systables
WHERE tabname like 'trans_cache_s01_%'

Now I am trying to do

SELECT min(trans_t),max(trans_t) INTO min_trans_t, max_trans_t FROM $trans_table;

but getting error

An illegal character has been found in the statement.

tried different combination like '$trans_table' or "$trans_table" but none worked out.
Reply With Quote
  #2 (permalink)  
Old 01-06-10, 05:43
maskanh maskanh is offline
Registered User
 
Join Date: Jan 2010
Posts: 2
An illegal character has been found in the statement.

tried different combination like '$trans_table' or "$trans_table" but none worked out.
Reply With Quote

Watch Free Film Online |
Watch Avatar movie online free
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On