November 12, 2017 at 11:13 am
Jeff Moden - Sunday, November 5, 2017 7:25 PMjcelko212 32090 - Friday, November 3, 2017 4:57 PM>> The proprietary version of code works just fine especially since it's being used in a Microsoft product. And, no... it doesn't mean that it can behave any way it wants to. <<Really, you only program in Microsoft products today? No major corporation uses Oracle, DB2, Postgres or any other form of SQL? At an early point in my career. I decided I'd be the guy that taught very generic, very portable SQL and could get you past any of the FIPS requirements, if you were a federal contractor; I grew up during the Cold War. It stood me pretty well for about four decades now.
Actually, proprietary code can pretty much behave anyway which it wants to. I had an article on the outer join syntax various companies had before the Standards. The extended equality had an Oracle version, and Microsoft version, and then there was the Informix version which went into the from clause rather than the where clause, they all behave slightly differently. Then of course within Microsoft. We had the definition of the BIT data type. Originally, it was what a computer science major with think of is a bit, namely having only the values {0, 1} as bit flags. Then suddenly it switched over to a numeric data type. But all numeric datatypes in SQL have to be nullable so now those columns became{0,1,NULL} I made a bundle on this one!
Heh... Lots of major corporations use Oracle, DB2, Postgress, etc... I've worked for a couple of them, didn't like it (especially hated all 3 years working with Oracle even though I was good at it) and, unlike you, decided to get good at something instead of going generic.
I am going to have to learn MondoDB and PostgreSQL where I work. I will still be active with SQL Server there are well as SQL Server is used for corporate systems. The MongoDB and PostgreSQL are for the products we develop. Guess what, I still won't be writing generic SQL. I will write SQL to the database engine where it will be run. Guess that means where needed there will be two parallel code bases.
November 12, 2017 at 11:31 am
Lynn Pettis - Sunday, November 12, 2017 11:13 AMI am going to have to learn MondoDB and PostgreSQL where I work. I will still be active with SQL Server there are well as SQL Server is used for corporate systems. The MongoDB and PostgreSQL are for the products we develop. Guess what, I still won't be writing generic SQL. I will write SQL to the database engine where it will be run. Guess that means where needed there will be two parallel code bases.
That's actually one of the smartest plans I've heard someone talk about in a couple of years.
We did the same thing for an Oracle conversion to SQL Server and made some improvements to the Oracle code base in the process. Both turned out nasty fast and the conversions just weren't that difficult.
--Jeff Moden
Change is inevitable... Change for the better is not.
November 12, 2017 at 1:15 pm
Jeff Moden - Sunday, November 12, 2017 11:31 AMLynn Pettis - Sunday, November 12, 2017 11:13 AMI am going to have to learn MondoDB and PostgreSQL where I work. I will still be active with SQL Server there are well as SQL Server is used for corporate systems. The MongoDB and PostgreSQL are for the products we develop. Guess what, I still won't be writing generic SQL. I will write SQL to the database engine where it will be run. Guess that means where needed there will be two parallel code bases.That's actually one of the smartest plans I've heard someone talk about in a couple of years.
We did the same thing for an Oracle conversion to SQL Server and made some improvements to the Oracle code base in the process. Both turned out nasty fast and the conversions just weren't that difficult.
It's the only thing to do because it's the best approach to the problem. Different code is required to get the best performance from the engine where it's being executed. So what if generic code can run on SQL Server, Oracle and whatever other database system someone pulls out? If the generic code gets poor performance, then it sucks equally as bad across multiple database platforms. If you can make it fly on the different systems, then there's no reason to use the generic garbage.
November 13, 2017 at 1:34 am
Hmm... looks like the OP has been scared away by all this talk of ISO standards, generic code, etc. 🙂
The forum does have 'SQL Server' in the title after all. So offering an SQL Server only solution is not unreasonable (is it?).
November 13, 2017 at 9:17 am
nigel. - Monday, November 13, 2017 1:34 AMHmm... looks like the OP has been scared away by all this talk of ISO standards, generic code, etc. 🙂
The forum does have 'SQL Server' in the title after all. So offering an SQL Server only solution is not unreasonable (is it?).
It's totally unreasonable if your name is Joe Celko. For the rest of us that actually work with SQL Server on a daily basis, we can be sure that a database will hardly ever be migrated to a different platform, and even then, portability is impossible. The most basic syntax such as creating a table or a stored procedure is different on every system.
November 13, 2017 at 2:33 pm
Why do you need such a long SP code?
This code will be functionally identical:
CREATE PROCEDURE [PrepareStageTables]
(
@TruncateStage bit
)
AS
IF ( @TruncateStage = 1)
DELETE [MPNM]
FROM [NolMatch] AS [MPNM]
JOIN [Devices] AS [lastload]
ON [MPNM].[TableID] = [lastload].[TableID]
WHERE [lastload].[ODSLoadStatus] IS NULL
OR [ODSLoadStatus] = 'Excluded Model'
GO
_____________
Code for TallyGenerator
November 14, 2017 at 9:12 am
Luis Cazares - Monday, November 13, 2017 9:17 AMnigel. - Monday, November 13, 2017 1:34 AMHmm... looks like the OP has been scared away by all this talk of ISO standards, generic code, etc. 🙂
The forum does have 'SQL Server' in the title after all. So offering an SQL Server only solution is not unreasonable (is it?).It's totally unreasonable if your name is Joe Celko. For the rest of us that actually work with SQL Server on a daily basis, we can be sure that a database will hardly ever be migrated to a different platform, and even then, portability is impossible. The most basic syntax such as creating a table or a stored procedure is different on every system.
So I am NOT the only one who feels that Joe Celko's ivory tower existence is completely out of touch! Whew!
November 14, 2017 at 9:20 am
John N Hick - Tuesday, November 14, 2017 9:12 AMLuis Cazares - Monday, November 13, 2017 9:17 AMnigel. - Monday, November 13, 2017 1:34 AMHmm... looks like the OP has been scared away by all this talk of ISO standards, generic code, etc. 🙂
The forum does have 'SQL Server' in the title after all. So offering an SQL Server only solution is not unreasonable (is it?).It's totally unreasonable if your name is Joe Celko. For the rest of us that actually work with SQL Server on a daily basis, we can be sure that a database will hardly ever be migrated to a different platform, and even then, portability is impossible. The most basic syntax such as creating a table or a stored procedure is different on every system.
So I am NOT the only one who feels that Joe Celko's ivory tower existence is completely out of touch! Whew!
Frankly, I have difficulty understanding why he's allowed to continue to post here. I try to ignore him as often as possible.
Steve (aka sgmunson) 🙂 🙂 🙂
Rent Servers for Income (picks and shovels strategy)
November 14, 2017 at 10:19 am
sgmunson - Tuesday, November 14, 2017 9:20 AMJohn N Hick - Tuesday, November 14, 2017 9:12 AMLuis Cazares - Monday, November 13, 2017 9:17 AMnigel. - Monday, November 13, 2017 1:34 AMHmm... looks like the OP has been scared away by all this talk of ISO standards, generic code, etc. 🙂
The forum does have 'SQL Server' in the title after all. So offering an SQL Server only solution is not unreasonable (is it?).It's totally unreasonable if your name is Joe Celko. For the rest of us that actually work with SQL Server on a daily basis, we can be sure that a database will hardly ever be migrated to a different platform, and even then, portability is impossible. The most basic syntax such as creating a table or a stored procedure is different on every system.
So I am NOT the only one who feels that Joe Celko's ivory tower existence is completely out of touch! Whew!
Frankly, I have difficulty understanding why he's allowed to continue to post here. I try to ignore him as often as possible.
He writes some valid points inside his rants from time to time. The problem is that those points go over the head of newbies and are disregarded by people that grew tired of his rants. We could actually adapt a joke to his persona.
A man in a hot air balloon realized he was lost. He reduced altitudeand spotted a man below. He descended a bit more and shouted,
"Excuse me, can you help me? I promised a friend I would meet him an hour ago, but I don't know where I am."
The man below replied, "You are in a hot air balloon hovering approximately 30 feet above the ground. You are between 40 and 41 degrees north latitude and between 59 and 60 degrees west longitude."
"You must be Joe Celko," said the balloonist.
"I am," replied the man, "How did you know?"
"Well," answered the balloonist, "everything you told me is technically correct, but I have no idea what to make of your information, and the fact is I am still lost. Frankly, you've not been much help so far."
November 14, 2017 at 10:22 am
Luis Cazares - Tuesday, November 14, 2017 10:19 AMsgmunson - Tuesday, November 14, 2017 9:20 AMJohn N Hick - Tuesday, November 14, 2017 9:12 AMLuis Cazares - Monday, November 13, 2017 9:17 AMnigel. - Monday, November 13, 2017 1:34 AMHmm... looks like the OP has been scared away by all this talk of ISO standards, generic code, etc. 🙂
The forum does have 'SQL Server' in the title after all. So offering an SQL Server only solution is not unreasonable (is it?).It's totally unreasonable if your name is Joe Celko. For the rest of us that actually work with SQL Server on a daily basis, we can be sure that a database will hardly ever be migrated to a different platform, and even then, portability is impossible. The most basic syntax such as creating a table or a stored procedure is different on every system.
So I am NOT the only one who feels that Joe Celko's ivory tower existence is completely out of touch! Whew!
Frankly, I have difficulty understanding why he's allowed to continue to post here. I try to ignore him as often as possible.
He writes some valid points inside his rants from time to time. The problem is that those points go over the head of newbies and are disregarded by people that grew tired of his rants. We could actually adapt a joke to his persona.
A man in a hot air balloon realized he was lost. He reduced altitudeand spotted a man below. He descended a bit more and shouted,
"Excuse me, can you help me? I promised a friend I would meet him an hour ago, but I don't know where I am."
The man below replied, "You are in a hot air balloon hovering approximately 30 feet above the ground. You are between 40 and 41 degrees north latitude and between 59 and 60 degrees west longitude."
"You must be Joe Celko," said the balloonist.
"I am," replied the man, "How did you know?"
"Well," answered the balloonist, "everything you told me is technically correct, but I have no idea what to make of your information, and the fact is I am still lost. Frankly, you've not been much help so far."
Then perhaps he can simply serve as a "bad example"... :hehe:
Steve (aka sgmunson) 🙂 🙂 🙂
Rent Servers for Income (picks and shovels strategy)
November 14, 2017 at 12:46 pm
sgmunson - Tuesday, November 14, 2017 10:22 AMLuis Cazares - Tuesday, November 14, 2017 10:19 AMsgmunson - Tuesday, November 14, 2017 9:20 AMJohn N Hick - Tuesday, November 14, 2017 9:12 AMLuis Cazares - Monday, November 13, 2017 9:17 AMnigel. - Monday, November 13, 2017 1:34 AMHmm... looks like the OP has been scared away by all this talk of ISO standards, generic code, etc. 🙂
The forum does have 'SQL Server' in the title after all. So offering an SQL Server only solution is not unreasonable (is it?).It's totally unreasonable if your name is Joe Celko. For the rest of us that actually work with SQL Server on a daily basis, we can be sure that a database will hardly ever be migrated to a different platform, and even then, portability is impossible. The most basic syntax such as creating a table or a stored procedure is different on every system.
So I am NOT the only one who feels that Joe Celko's ivory tower existence is completely out of touch! Whew!
Frankly, I have difficulty understanding why he's allowed to continue to post here. I try to ignore him as often as possible.
He writes some valid points inside his rants from time to time. The problem is that those points go over the head of newbies and are disregarded by people that grew tired of his rants. We could actually adapt a joke to his persona.
A man in a hot air balloon realized he was lost. He reduced altitudeand spotted a man below. He descended a bit more and shouted,
"Excuse me, can you help me? I promised a friend I would meet him an hour ago, but I don't know where I am."
The man below replied, "You are in a hot air balloon hovering approximately 30 feet above the ground. You are between 40 and 41 degrees north latitude and between 59 and 60 degrees west longitude."
"You must be Joe Celko," said the balloonist.
"I am," replied the man, "How did you know?"
"Well," answered the balloonist, "everything you told me is technically correct, but I have no idea what to make of your information, and the fact is I am still lost. Frankly, you've not been much help so far."
Then perhaps he can simply serve as a "bad example"... :hehe:
Heh... everyone is useful, one way or another. 😉
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 11 posts - 16 through 25 (of 25 total)
You must be logged in to reply to this topic. Login to reply