I want to return list of ItemNos (string), even if few characters match and even if characters match in different place. For eg: If I pass in “appl” or “apole” or “daple”. I want DB to list “apple”. Tried using levenshteinDistance: (Checking for strings with less than 2 edit). Calling Compute method for finding edit distance – using this link
Tag: c#
linq query to get possible combinations
I have table1 like funid reasonid 1 1 1 2 2 1 2 3 and users table(users will repeat) like below userid reasonid 10 1 10 2 11 1 12 3 13 1 13 3 how to write a query to get the users satisfying table 1 combination {1,2} and {1,3}, so as per the above data userid 10 and
Is it possible to populate a c# list box with a Row of data from sql server
So, I am new to C#, Visual studio etc, however I have a bit of experience with SQL Server. I Have a table, that contains Data (Obviously), and what I am trying to do is retrieve that data and display it in a drop down list so that a client can select which one they want. The problem I have
Make custom Restriction NHibernate for QueryOver
I’m stuck in a simple problem, I’d like to add a new custom restriction in NHibernate. I want to write a simple QueryOver with a fulltext index, an example with a Projections is here How to use Full Text Search for any property with QueryOver API But I need a more flexibility so I’d like something like Is it possible?
How to “hide” a row in Oracle SQL database but not delete it
Is there a way to “hide” a row in Oracle SQL database without deleting it, So that it is still in the database but does not show up on the webpage as a search result? For example, I want to hide a specific city in my database from being displayed in the results when searching for cities on the webpage.
Syntax error while doing C# SQL data insert
I am using the above code for data entry into SQLite database, but while getting some string values, I am getting this error: ‘SQL logic error near “da”: syntax error’ What is the reason ? Answer You will get SQL syntax error if one of rehberIsmi, jsonData contains single quote. In your case, composing SQL query by concatenating strings is
C# is adding 00:00:00 unnecessarily
My SQL Server is using the DATE datatype, but my C# app is reading this as ‘mm/dd/yyyy 00:00:00’, can anyone tell me how to get rid of the 0s? (everything else works)…? Answer If you don’t want the time portion of a DateTime as String you have several options: Read: Date and time format strings
How to Count from sql as a value in Npsql
I am using Npgsql to access postgresql database and I am running a query: The query will return value 4, but my a gets -1.what is the problem here and how can I solve it? Answer It looks like you are using Dapper. If so, you want QueryFirst not Execute, as Execute just returns the number of rows
How do I clear specific columns in DataGrid?
i am using WPF, connected to SQL DataBase via LinqToSql. I have filled DataGrid using ItemsSource. I would like to clear everything in my DataGrid, except first two rows(ID,first and second name), and Headers ofcourse, by pressing a button. All items i would like to(either set to null or 0) remove, are floats, but I can’t find the right logic
How to import values from csv to SqlServer using c#
I have come across this problem.I am trying to import data into a database from a csv file.Normally the insert part works,but now I keep getting an error: Arithmetic overflow error converting int to data type numeric . The statement has been terminated.It is probably because I have id as the first property,but if I “shift” the array by omitting