What about using a view?
(Not entirely sure if Oracle supports them, but I don't see why not)

Ryan

-----Original Message-----
From: Tom Wallace [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, August 29, 2001 5:13 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Tablename issue..


 Tried this - same errors --  Also tried the following permutations
(courtesy of Trevor Lanyon) --

You can try to encapsulate the table name with hard bracket
[Table - Name]

You can escape the character with a slash (I don't think this will work):

Table\ \- Name

You can escape the characters with the hexidecimal url encoding (I know this

only to work with one try of database, and I think the client is actually

stripping it off)

Table%20%2D%20Name

****

The ODBC source I'm trying to connect to is a Remedy (Action Request System)
4.5 system running on top of a Oracle 8 database.

Thanks - Tom

"Ryan Marrs" <[EMAIL PROTECTED]> wrote in message
EA9290E62E6CD311859200805F85164902FB13DE@EXCHANGE">news:EA9290E62E6CD311859200805F85164902FB13DE@EXCHANGE...
> Try putting Brackets [] around the spaces.  This will typically fix the
> problem, ie:
>
> $sql2 = odbc_exec($conn,"SELECT [Character Field] FROM [ABC - Table]");
>
> Let me know if it works!
>
> Ryan
>
> -----Original Message-----
> From: Tom Wallace [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, August 29, 2001 3:06 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] Tablename issue..
>
> Hola,
>
>   I'm having a difficult time figuring out the syntax here -- my table
name
> has spaces & dashes in it..Unfortunately I can't permanently change the
> tablename.. I've tried a half dozen different ways to access the table,
each
> return an error similar to this:
>
> Warning: SQL error: [ISAM]No data found, SQL state S00 in SQLExecDirect in
> c:\inetpub\wwwroot\test8.php on line 14
>
> but removing the spaces from the tablename and updating the php fixes it..
>
>  any ideas?
>
> $sql2 = odbc_exec($conn,"SELECT Character_Field FROM ABC - Table");
>
> Thanks,
> -Tom
>
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to