Here's a messy hack that would let you use your column names like
'a35#70' to select and insert.

Set up a table like this:

col1    a35#70
col2    a35#71
col3    a35#72
...

Then make a routine in your middleware that select * from this
table and returns the results in a named array or hash array
(i.e. in perl: $col{'a35#70'} returns 'col1').

Now you can reference the legal column names using your funny
column names in any sql statement using this hash:

        select $col{'a35#70'} from data_table
and/or
        insert into data_table ( $col{'a35#70'} ) values (  )


Brian



-----Original Message-----
From: Roger Karnouk [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 28, 2001 11:53 AM
To: Dirk Ostertag; [EMAIL PROTECTED]
Subject: RE: Must use '#' in fieldnames


if you just need to call your field a35#70
for retrieval purposes

why don't you call it something else and alias it in your select
statements.

select col1 as 'a35#70' from test;

if this doesn't help perhaps explain why you absolutely need your
field
named a35#70.

it will make it easier to find you a work around.

Roger

-----Original Message-----
From: Dirk Ostertag [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 28, 2001 10:09 AM
To: [EMAIL PROTECTED]
Subject: Must use '#' in fieldnames


Hello everybody,

I have to create a table on a MySQL-Server with fieldnames like
a35#70.
if I ty it that way

create table test (
    a35#70 char (70));

on the mysql - prompt, the creation fails. Even brackets like in
MsSQL
or '`' doesn't help.
Can anybody tell me what to do?

thank
Dirk



-----------------------------------------------------------------
----
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail
<[EMAIL PROTECTED]>
To unsubscribe, e-mail
<[EMAIL PROTECTED]>
Trouble unsubscribing? Try:
http://lists.mysql.com/php/unsubscribe.php

-----------------------------------------------------------------
----
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail
<[EMAIL PROTECTED]>
To unsubscribe, e-mail
<[EMAIL PROTECTED]>
Trouble unsubscribing? Try:
http://lists.mysql.com/php/unsubscribe.php


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to