Skip to content
Advertisement

Tag: c#

How can i use sum ? with more then 2 key

This is my table structure. I want to use SUM for Ingredients.Recipe_Ingredient_Gr and Ingredients.Recipe_Ingredient_Piece for each Recipe in selected order. My english is not enough to tell u exactly what i mean but i’ll try to tell u with example. in my program user will create stock data and after that they’ll create recipes for food and then they create

c# ef core RemoveRange contraint violation

Hi I have a complex db with many tables and relations what we want to do is to copy all tables from a database to another but only taking rows starting from one table (salesorder) and going down following relations. So I avoided the .Include, and use IQueryable queries (one for each table) there is no problem with the insert

Finding Similar People’s Names from Database

I have a table in MySql with names in it. I am trying to, given an input name, find all similar names in the table. I’ve heard a lot about Levenshtien/Damerau–Levenshtein distance, but it doesn’t seem like it would work well for this, I’ll explain my reasoning later. To elaborate: User inputs a name that could have, say, five words

Update SQL table using C#

I’m trying to update EpisodeId no:117 in the Episode table and it executes successfully but when I check the table it is not updated. int episode Id = 117; Answer There are some issues with your SQL update statement.Look at following for reference to Update Statement in SQL LINK There is also an easier way to add the parameters using

Execute query and populate the same in datagrid Box

I have a winform app connected to access database as data source , but in access i was using this below SQL to generate a query table called trend: But i do not know how execute this & populate the same in datagrid box on form load event(dataset:CSCdataset) , please help me. Answer I guess you can find more information

SQL GroupBy for Stored Procedure caused Error

I have a quick question that why my SQL Stored Procedure did not work properly. Can someone explain what is wrong with my Stored Procedure Query? Error: “Each GROUP BY expression must contain at least one column that is not an outer reference.” Answer It can never work the way you are trying it, because by definition, all column names

Why there is no GroupBy clause in internal SQL of Entity Framework linq query?

In documentation of Entity Framework: https://www.entityframeworktutorial.net/querying-entity-graph-in-entity-framework.aspx in section regarding GroupBy we can read that following code: executes internally following SQL: Why there is no GroupBy clause in SQL? If there is no GroupBy clause needed, can’t we just use simple Select with OrderBy and without Joins? Can anyone explain the above query? Answer The bottom line is: because SQL can’t

Advertisement