| Author |
Topic |
|
AdamWest
Constraint Violating Yak Guru
360 Posts |
Posted - 2011-12-21 : 15:24:43
|
| Is there any benefit to using brackets when naming stored procedures, if to take them out, you can just remove them? of there is some effect in having them.[OTC].[THS_GET_DECLINES_second_value]I am using the sp in c# code. |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
GilaMonster
Master Smack Fu Yak Hacker
4507 Posts |
Posted - 2011-12-21 : 15:50:58
|
| Or tables (or columns) named things like Transaction, Table, Procedure, etc...--Gail ShawSQL Server MVP |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
AdamWest
Constraint Violating Yak Guru
360 Posts |
Posted - 2011-12-21 : 15:57:06
|
| I found out why, we also have Oracle customers and the stored procedures have to try to have them work in both. so they program as much as possible to just use each one without having to change anything. Silly situation.Apparently Oracle doesn't accept brackets. |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
GilaMonster
Master Smack Fu Yak Hacker
4507 Posts |
Posted - 2011-12-21 : 16:22:50
|
| It's possible. There's a common area of the ANSI standards that both implement. It's a very minimal set but it is possible to use (that's what Celko's often harping on about)--Gail ShawSQL Server MVP |
 |
|
|
Lamprey
Master Smack Fu Yak Hacker
4614 Posts |
Posted - 2011-12-21 : 16:29:19
|
| Just for those that may not know, it's called a Quoted Identifier. [url]http://msdn.microsoft.com/en-us/library/aa259228(v=sql.80).aspx[/url]EDIT: Humm, doesn't seem to like my link.. |
 |
|
|
Lamprey
Master Smack Fu Yak Hacker
4614 Posts |
Posted - 2011-12-21 : 16:33:10
|
quote: Originally posted by X002548 However...I would think it is IMPOSSIBLE To have a procedure that would be the same on both platformsDifferent Animals
If you write ANSI SQL, you'd probably be surprised how easy you can set up a database that'll work on almost any RBDMS out there (with minimal tweaks of course). |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
Lamprey
Master Smack Fu Yak Hacker
4614 Posts |
Posted - 2011-12-21 : 16:48:39
|
| Not extensively. I worked at a place a few years back and we had made it a point to do things in an ANSI way as much as possible. When we were investigating other platforms we decided to try some migrations for fun. It literally took a day (each) to convert over to other platforms: Oracle, DB2, Postgrse, can't remember if we did MySql or not. Granted we didn't get into tuning the DB, but making it work on other platforms was not very hard. |
 |
|
|
GilaMonster
Master Smack Fu Yak Hacker
4507 Posts |
Posted - 2011-12-22 : 06:12:55
|
| Yes, and MySQL. Also had the pleasure of porting code between them. Far from fun.There are apps (and I've worked with them) that can work on Oracle and SQL Server with just changes in how the DB is called, the queries are identical (typically no procedures used). It's ugly as hell and tends to work very slowly, but it works.--Gail ShawSQL Server MVP |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
GilaMonster
Master Smack Fu Yak Hacker
4507 Posts |
Posted - 2011-12-22 : 10:43:01
|
| Err, no.--Gail ShawSQL Server MVP |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
|