Oracle, Oracle...
-
Good 'ol Oracle... :sigh: So I got this table with this column, VARCHAR2 NOT NULL, has been that way for years and it's used in applications, procedures and services. Now a recent change in the software and functionality allows this value to be empty. No problem, I'll just make it an empty string as to not break existing functionality (don't look at me like that, you've all done it!). Unfortunately in Oracle
NULL == ''
:omg: :wtf: :confused::~ X| :doh: :sigh: So now I have to change the table definition (and the software, services and procedures) to allow for NULL... :sigh: The more I work with Oracle the less I like it... :(Visit my blog at Sander's bits - Writing the code you need. Or read my articles at my CodeProject profile.
Simplicity is prerequisite for reliability. — Edsger W. Dijkstra
Regards, Sander
-
Good 'ol Oracle... :sigh: So I got this table with this column, VARCHAR2 NOT NULL, has been that way for years and it's used in applications, procedures and services. Now a recent change in the software and functionality allows this value to be empty. No problem, I'll just make it an empty string as to not break existing functionality (don't look at me like that, you've all done it!). Unfortunately in Oracle
NULL == ''
:omg: :wtf: :confused::~ X| :doh: :sigh: So now I have to change the table definition (and the software, services and procedures) to allow for NULL... :sigh: The more I work with Oracle the less I like it... :(Visit my blog at Sander's bits - Writing the code you need. Or read my articles at my CodeProject profile.
Simplicity is prerequisite for reliability. — Edsger W. Dijkstra
Regards, Sander
According to SO: > Back in the olden days before there was a SQL standard, Oracle made the design decision that empty strings in VARCHAR/VARCHAR2 columns were NULL and that there was only one sense of NULL (there are relational theorists that would differentiate between data that has never been prompted for, data where the answer exists but is not known by the user, data where there is no answer, etc. all of which constitute some sense of NULL). > By the time that the SQL standard came around and agreed that NULL and the empty string were distinct entities, there were already Oracle users that had code that assumed the two were equivalent. So Oracle was basically left with the options of breaking existing code, violating the SQL standard, or introducing some sort of initialization parameter that would change the functionality of potentially large number of queries. Violating the SQL standard (IMHO) was the least disruptive of these three options. But even worse: > Oracle has left open the possibility that the VARCHAR data type would change in a future release to adhere to the SQL standard (which is why everyone uses VARCHAR2 in Oracle since that data type's behavior is guaranteed to remain the same going forward). So you're dealing with a legacy to support ancient implementations, a possible future where this will be changed, and no way to set a global configuration to change the behavior now for compliant implementations. Yeah, that is a real suck. Marc
Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project!
-
According to SO: > Back in the olden days before there was a SQL standard, Oracle made the design decision that empty strings in VARCHAR/VARCHAR2 columns were NULL and that there was only one sense of NULL (there are relational theorists that would differentiate between data that has never been prompted for, data where the answer exists but is not known by the user, data where there is no answer, etc. all of which constitute some sense of NULL). > By the time that the SQL standard came around and agreed that NULL and the empty string were distinct entities, there were already Oracle users that had code that assumed the two were equivalent. So Oracle was basically left with the options of breaking existing code, violating the SQL standard, or introducing some sort of initialization parameter that would change the functionality of potentially large number of queries. Violating the SQL standard (IMHO) was the least disruptive of these three options. But even worse: > Oracle has left open the possibility that the VARCHAR data type would change in a future release to adhere to the SQL standard (which is why everyone uses VARCHAR2 in Oracle since that data type's behavior is guaranteed to remain the same going forward). So you're dealing with a legacy to support ancient implementations, a possible future where this will be changed, and no way to set a global configuration to change the behavior now for compliant implementations. Yeah, that is a real suck. Marc
Imperative to Functional Programming Succinctly Contributors Wanted for Higher Order Programming Project!
Marc Clifton wrote:
So you're dealing with a legacy to support ancient implementations, a possible future where this will be changed, and no way to set a global configuration to change the behavior now for compliant implementations. Yeah, that is a real suck.
It really is :sigh:
Visit my blog at Sander's bits - Writing the code you need. Or read my articles at my CodeProject profile.
Simplicity is prerequisite for reliability. — Edsger W. Dijkstra
Regards, Sander
-
Good 'ol Oracle... :sigh: So I got this table with this column, VARCHAR2 NOT NULL, has been that way for years and it's used in applications, procedures and services. Now a recent change in the software and functionality allows this value to be empty. No problem, I'll just make it an empty string as to not break existing functionality (don't look at me like that, you've all done it!). Unfortunately in Oracle
NULL == ''
:omg: :wtf: :confused::~ X| :doh: :sigh: So now I have to change the table definition (and the software, services and procedures) to allow for NULL... :sigh: The more I work with Oracle the less I like it... :(Visit my blog at Sander's bits - Writing the code you need. Or read my articles at my CodeProject profile.
Simplicity is prerequisite for reliability. — Edsger W. Dijkstra
Regards, Sander
I like Oracle, probably more than SQL Server. Just took some getting used to, for me, at least. My current projects use SQL Server. It's what we do. It's what I do. Oracle, SQL Server, Visual Studio, it's all good. :)
-
Good 'ol Oracle... :sigh: So I got this table with this column, VARCHAR2 NOT NULL, has been that way for years and it's used in applications, procedures and services. Now a recent change in the software and functionality allows this value to be empty. No problem, I'll just make it an empty string as to not break existing functionality (don't look at me like that, you've all done it!). Unfortunately in Oracle
NULL == ''
:omg: :wtf: :confused::~ X| :doh: :sigh: So now I have to change the table definition (and the software, services and procedures) to allow for NULL... :sigh: The more I work with Oracle the less I like it... :(Visit my blog at Sander's bits - Writing the code you need. Or read my articles at my CodeProject profile.
Simplicity is prerequisite for reliability. — Edsger W. Dijkstra
Regards, Sander
If you had consulted an oracle you'd have foreseen the problems.
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein
"As far as we know, our computer has never had an undetected error." - Weisert
"If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010
-
Good 'ol Oracle... :sigh: So I got this table with this column, VARCHAR2 NOT NULL, has been that way for years and it's used in applications, procedures and services. Now a recent change in the software and functionality allows this value to be empty. No problem, I'll just make it an empty string as to not break existing functionality (don't look at me like that, you've all done it!). Unfortunately in Oracle
NULL == ''
:omg: :wtf: :confused::~ X| :doh: :sigh: So now I have to change the table definition (and the software, services and procedures) to allow for NULL... :sigh: The more I work with Oracle the less I like it... :(Visit my blog at Sander's bits - Writing the code you need. Or read my articles at my CodeProject profile.
Simplicity is prerequisite for reliability. — Edsger W. Dijkstra
Regards, Sander
-
Good 'ol Oracle... :sigh: So I got this table with this column, VARCHAR2 NOT NULL, has been that way for years and it's used in applications, procedures and services. Now a recent change in the software and functionality allows this value to be empty. No problem, I'll just make it an empty string as to not break existing functionality (don't look at me like that, you've all done it!). Unfortunately in Oracle
NULL == ''
:omg: :wtf: :confused::~ X| :doh: :sigh: So now I have to change the table definition (and the software, services and procedures) to allow for NULL... :sigh: The more I work with Oracle the less I like it... :(Visit my blog at Sander's bits - Writing the code you need. Or read my articles at my CodeProject profile.
Simplicity is prerequisite for reliability. — Edsger W. Dijkstra
Regards, Sander
-
If you had consulted an oracle you'd have foreseen the problems.
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein
"As far as we know, our computer has never had an undetected error." - Weisert
"If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010
I did, but I had trouble making an ad-hoc query and then she wanted a package... X|
Visit my blog at Sander's bits - Writing the code you need. Or read my articles at my CodeProject profile.
Simplicity is prerequisite for reliability. — Edsger W. Dijkstra
Regards, Sander
-
It's one of joys of development...the challenge! What should be simple almost never is! Good luck! :)
"Go forth into the source" - Neal Morse
kmoorevs wrote:
What should be simple almost never is!
That pretty much sums up our profession! :thumbsup: :laugh:
Visit my blog at Sander's bits - Writing the code you need. Or read my articles at my CodeProject profile.
Simplicity is prerequisite for reliability. — Edsger W. Dijkstra
Regards, Sander
-
I did, but I had trouble making an ad-hoc query and then she wanted a package... X|
Visit my blog at Sander's bits - Writing the code you need. Or read my articles at my CodeProject profile.
Simplicity is prerequisite for reliability. — Edsger W. Dijkstra
Regards, Sander
Sander Rossel wrote:
she wanted a package
That's generally true of women . . .
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein
"As far as we know, our computer has never had an undetected error." - Weisert
"If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010
-
Good 'ol Oracle... :sigh: So I got this table with this column, VARCHAR2 NOT NULL, has been that way for years and it's used in applications, procedures and services. Now a recent change in the software and functionality allows this value to be empty. No problem, I'll just make it an empty string as to not break existing functionality (don't look at me like that, you've all done it!). Unfortunately in Oracle
NULL == ''
:omg: :wtf: :confused::~ X| :doh: :sigh: So now I have to change the table definition (and the software, services and procedures) to allow for NULL... :sigh: The more I work with Oracle the less I like it... :(Visit my blog at Sander's bits - Writing the code you need. Or read my articles at my CodeProject profile.
Simplicity is prerequisite for reliability. — Edsger W. Dijkstra
Regards, Sander
If it's of any consolation, it's even worse the other direction. If you're used to Oracle and have to work on SQL Server, it's like working with the cousin from the country side
Wrong is evil and must be defeated. - Jeff Ello
-
Marc Clifton wrote:
So you're dealing with a legacy to support ancient implementations, a possible future where this will be changed, and no way to set a global configuration to change the behavior now for compliant implementations. Yeah, that is a real suck.
It really is :sigh:
Visit my blog at Sander's bits - Writing the code you need. Or read my articles at my CodeProject profile.
Simplicity is prerequisite for reliability. — Edsger W. Dijkstra
Regards, Sander
Well wipe your chin when you're done!
Decrease the belief in God, and you increase the numbers of those who wish to play at being God by being “society’s supervisors,” who deny the existence of divine standards, but are very serious about imposing their own standards on society.-Neal A. Maxwell You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun
-
If it's of any consolation, it's even worse the other direction. If you're used to Oracle and have to work on SQL Server, it's like working with the cousin from the country side
Wrong is evil and must be defeated. - Jeff Ello
Now don't you go talkin' ill 'bout dat there SQL Server! And wot's wrong with ma cousin Betty Jo? We two gettin' married next summer! ;p
Visit my blog at Sander's bits - Writing the code you need. Or read my articles at my CodeProject profile.
Simplicity is prerequisite for reliability. — Edsger W. Dijkstra
Regards, Sander
-
If you had consulted an oracle you'd have foreseen the problems.
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein
"As far as we know, our computer has never had an undetected error." - Weisert
"If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010
-
Well, the only way to know for sure is to ask the oracle.*
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein
"As far as we know, our computer has never had an undetected error." - Weisert
"If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010