@JackDouglas I thought it was a SQL Standard thing that eliminating nulls during aggregation should produce some sort of warning or message (which may be disabled). I'm not about to search through to find it though. Perhaps I imagined it !
@JackDouglas On the same question, second link in the answer dbfiddle.uk/… gives an error about an odd number of hex digits, FYI.
@MoinuddinQuadri and since the order for SELECT / HAVING matters only when there are window functions, I expect MySQL to switch that, too, when they implement them. MariaDB has.
See the error you get when you try to access (in HAVING) a computed value from SELECT): dbfiddle.uk/…
> Window function is allowed only in SELECT list and ORDER BY clause
> Perhaps this is what makes Redis and MongoDB endure. I don’t know, but I am sure it’s part of what makes them a joy to use.
oh, the joy
also, having SQL amidst ... code is bad from a purist POV, but there are ways to solve this. And there is a reason why even some the NoSQL products use a SQL(-like) language.
And just throwing it out there since this is Dynamics, have you raised a support ticket with them to address performance concerns around the query hint they wrote in? — sp_BlitzErik19 mins ago
I have a postgresql db (v9.4) and its default year is 2026.
Is there any way I can modify it?
I have read about modifying the postgresql.conf file, but I have just found the timezone property.
If select verion(); returned anything but an error, I would be impressed too. That would likely mean that @ypercubeᵀᴹ would be involved in the development of PostgreSQL ;)
I am getting an error on an Update statement that worked at one time. I don't know what broke. I am joining three tables for an Update in one of them.
But SQL Server 2012 returns:
System.Data.SqlClient.SqlException: The select list for the INSERT statement contains more items than the i...
I think @Lamak should answer it and that answer should be marked as a chosen.
But, then again I'm not sure anyone is going to be able to find that question with such a poor title and error message. So maybe the reply value of it isn't there.
I'm not sure how PostgreSQL handles that for comparison, but I would hope that an error in a trigger at least indicates the statement that triggered the trigger so to speak.
There were certainly other details of the error sent by the server along with the message, which the OP either couldn't see or didn't notice, such as the name of the module where the error occurred (which in this case would be the trigger name). But I'm not sure if the statement that invoked the trigger in that instance would be referenced in the details.
The message is prefaced with System.Data.SqlClient.SqlException, so he's probably getting it in an .NET application (possibly his application), but without retrieving details, only showing the message. When I see an error of this kind in SSMS, I also always see where it has occurred. So this may additionally be a matter of (lack of) communication (between the app and the server).
Yea. So the idea situation here is the name of the trigger, and the context it was called in. Neither database shows the context, PostgreSQL though shows the name of the trigger.
I suppose the reason for not showing "context" is that context could be a trigger, from another trigger, from another trigger, form a cascade action, from another trigger from a statement. What should be shown?
@EvanCarroll I don't really know postgreSQL, so I'm really asking. But, in @JackDouglas's example, the trigger calls a function that inserts data, right?
So in PostgreSQL, a trigger is implemented as a special function that returns a trigger. That special function is set to fire using the CREATE TRIGGER DDL.
Totally awesome would be if the author wasn't such an ideologue and published plv8u.
Then it'd be totally awesome.
Instead we have trusted plv8 which brings the power of v8/crankshaft and obscenely optimized javascript to the database but denies us the ability to use NPM.
Quote from a follow up article: ""I get the impression that the NPM ecosystem participants have created a fetish for micro-packages," Haney noted. "Rather than write any functions or code, it seems that they prefer to depend on something that someone else has written ... In my opinion, if you cannot write a left-pad, is-positive-integer, or isArray function in five minutes flat (including the time you spend Googling), then you don’t actually know how to code."