New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EFcore 8 UpdateFromQuery generates invalid sql #579
Comments
I have realised I was trying to run the update from query against a view. |
Hello @lee-baker , Thank you for reporting, my developer will try your scenario. Best Regards, Jon |
Hello @lee-baker , I just wanted to let you know that a fix has been made and should be available in 2-3 weeks. I will let you know when the new version will be deployed. Best Regards, Jon |
Thank you for that.
Appreciate it
Lee
…--------
If we have data, let’s look at data. If all we have are opinions, let’s go
with mine.
* - *Jim Barksdale, former CEO of Netscape
On Fri, 10 May 2024 at 03:13, Jonathan Magnan ***@***.***> wrote:
Hello @lee-baker <https://github.com/lee-baker> ,
I just wanted to let you know that a fix has been made and should be
available in 2-3 weeks.
I will let you know when the new version will be deployed.
Best Regards,
Jon
—
Reply to this email directly, view it on GitHub
<#579 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAXFX2R6B4MJE3A4NXHQ3CLZBPDFTAVCNFSM6AAAAABG7K6RPWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBTGI3DGMJZHE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hello @lee-baker , The v8.102.2.5 has been released. Could you let us know if my developer has fixed the issue correctly? Best Regards, Jon |
Description
We have recently updated to EFCore 8 and finding an error with UpdateFromQuery where the SQL generated is not valid
The generated SQL looks like this
exec sp_executesql N' UPDATE A SET A.[Status] = @zzz_BatchUpdate_0 FROM [] AS A INNER JOIN ( SELECT [p].[PaymentItemNumber], [p].[Amount], [p].[CardId], [p].[DestinationAccountName], [p].[DestinationAccountNumber], [p].[DestinationBsb], [p].[LodgementReference], [p].[PaymentId], [p].[PaymentRunId], [p].[PaymentType], [p].[SourceAccountName], [p].[SourceAccountNumber], [p].[SourceBsb], [p].[Status] FROM [PaymentServiceMemberPaymentData] AS [p] WHERE [p].[PaymentRunId] = @__paymentRunId_0 ) AS B ON A.[PaymentItemNumber] = B.[PaymentItemNumber] ',N'@__paymentRunId_0 int,@zzz_BatchUpdate_0 nvarchar(9)',@__paymentRunId_0=15139,@zzz_BatchUpdate_0=N'Requested'
Exception
Microsoft.Data.SqlClient.SqlException (0x80131904): An object or column name is missing or empty. For SELECT INTO statements, verify each column has a name. For other statements, look for empty alias names. Aliases defined as "" or [] are not allowed. Change the alias to a valid name.
Further technical details
The text was updated successfully, but these errors were encountered: