Jump to content


Photo
- - - - -

Table name as a Variable in a SQL statement


2 replies to this topic

#1 Vlodik Zmyslony

Vlodik Zmyslony

    Member

  • Members
  • PipPip
  • 28 posts
  • Gender:Male

Posted 06 April 2001 - 02:39 PM

Within an SQL statement from ProIV it is not possible to send the table name as a variable in the select statement.
i.e.
select * from :$NAME
This won't work. Has anyone been able to somehow dyamically pass the table name to build up the SQL statement in ProIV?

#2 Guest_chris mariano_*

Guest_chris mariano_*
  • Guests

Posted 11 March 2006 - 07:09 AM

dnt know if this would work ...

$sql_str = 'Select * from '
$sql_str = $sql_str + $table_name

sql
execute immediate :$sql_str

endsql

...or something like that..

#3 deepghosh

deepghosh

    Member

  • Members
  • PipPip
  • 37 posts
  • Gender:Male

Posted 13 March 2006 - 03:44 AM

Look for SQL DYNAMIC



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users