 |
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
Krayol
Joined: 28 Nov 2007 Posts: 4 Country: United Kingdom |
|
Keyword Quoting on Table Names |
|
The quoting is useful, but our coding guidelines require [] style quoting to be used only where essential. This is effectively keywords only and so generates sql like...
SELECT * FROM [Group] INNER JOIN GroupType ON ...
Is this possible? (I appreciate that we should probably avoid Keywords for table names, but in practice it doesn't happen! :))
Many thanks...Karl.
|
|
Wed Nov 28, 2007 7:29 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
There is an option available for controlling the "quoting" feature. On the DB Options page you can change "Always Add Delimiters" option from None to […]. This will do what you want.
|
|
Wed Nov 28, 2007 10:29 am |
|
 |
judahr
Joined: 09 Mar 2007 Posts: 319 Country: United States |
|
|
|
Actually, [...] always adds delimiters. I think he is asking for an option that will use delimiters when the name matches on a keyword, but don't use them otherwise. I would like that feature too.
|
|
Thu Nov 29, 2007 9:27 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
Ok, I will add this as an enhancement request for addition in the following maintenance releases.
My 2 cents: I personally think this is a bad idea. In the first place keywords should not be used as object/column names. If a naming mistake has been made, it should be corrected at the root, instead of arm twisting using and coding various workarounds, using ANSI incompatible proprietary extensions like [ ] brackets to deal with this mistake, making non-portable applications with potential upgrade problems, data backup and conversions issues, etc.., you get my point.
|
|
Thu Nov 29, 2007 9:58 am |
|
 |
judahr
Joined: 09 Mar 2007 Posts: 319 Country: United States |
|
|
|
Yes, legacy (or inherited) apps are a pain. Please help us to deal with them. Also new keywords can be useful and annoying at the same time.
|
|
Thu Nov 29, 2007 11:08 am |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
Gentlemen, I've got good news for you. This appears to be very easy, we made a tweak in the code that will wrap in delimiters any keyword matching name. Moreover, since you control the keyword list you can add additional keywords as required. This tweak will be available in beta build 3.0.26 planned for next week.
|
|
Thu Nov 29, 2007 9:22 pm |
|
 |
Krayol
Joined: 28 Nov 2007 Posts: 4 Country: United Kingdom |
|
|
|
Wonderful! Thankyou!
I agree that it isn't desirable to use keywords, but there are a couple of cases where it seems to happen:
1. Legacy apps that I seem to inherit! Changing table names late in development can be time consuming since SPs, object models, etc are already written.
2. Apps ported from other systems where keywords vary (Group was a bad example, sorry).
I can assure you that I don't create schemas like this, but I do have to cope with them. Thanks again. :)
|
|
Fri Nov 30, 2007 8:46 am |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|