Re: can you name a column in sybase with underscore?



bret@xxxxxxxxxx schrieb:
On May 18, 10:41 am, "Carl Kayser" <kayse...@xxxxxxx> wrote:
"sybaselady" <dcsoi...@xxxxxxxxx> wrote in message

news:1179504409.864699.212770@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Quick question about naming conventions in sybase.
Can you name a column starting with _
say for example Could you name a column
_CREATED
Thanks
Yes, but be careful of what you wish for.

set quoted_identifer on
go
create table "F U B A R"
("_C R ATED" tinyint ....
..... )
go

But then you basically have to refer to these with double quotes (not single
quotes).

Also note that underscores in names can cause some possibly
unanticipated
effects if you query the names using the LIKE clause, as the
underscore is also
a wildcard character.

For instance if you had tables "foo_7" and "foobar"

select name from sysobjects where name like "foo_%" will return both
foo_7 and foobar.

Hi Bret and all the rest
To your post I suggest to some tiny addendum:
when using underscores e.g. in like operation they need
an >escape "_" < masquerade to get the proper output.

But anyway all postings in this thread direct to the same conclusion:
names containing underscores are permitted - but far from being practical.

/Klaus
Klaus Riemer, DE
klausATroehlergenriemer!REMOVE.SPAM.PROTECTOR!.de

.



Relevant Pages

  • Re: A silly question (Re: Vijf: Two Weeks to MESSENGER)
    ... underscores rather than double quotes, ... You can't underline or italicize anything ... Thanks Dorothy. ...
    (rec.arts.sf.written)
  • Re: Damn you, FEDEX! or Nikon D40 lost in Springfield, MO blackhole.
    ... the 2 mp Mavica he had been using with a Nikon D40. ... After shopping around, he got me to order one for him. ... The shipper had it insured, but from what I have read it could take weeks to sort this crap out. ... You may get your insurance from FedEx and a couple weeks later they find it and deliver it. ...
    (alt.photography)
  • Re: Handling apostrophes and other characters
    ... quotes than a ' is), I wasn't reccomending using any specific character. ... then you now have to find someway to escape real underscores. ... > the data you display, then what if the original input string looked like ... > So if you tried to replace the underscores with single quotes for display, ...
    (microsoft.public.inetserver.asp.general)
  • Re: A silly question (Re: Vijf: Two Weeks to MESSENGER)
    ... underscores rather than double quotes, ... You can't underline or italicize anything ... which is almost impossible for most newsreaders to misinterpret. ...
    (rec.arts.sf.written)
  • Re: A silly question (Re: Vijf: Two Weeks to MESSENGER)
    ... underscores rather than double quotes, ... You can't underline or italicize anything ... which is almost impossible for most newsreaders to misinterpret. ...
    (rec.arts.sf.written)