Skip to content

Tag: c#

Row Value Comparison Alternatives?

I’m working in a C# SQLite library (SQLite-net) that doesn’t seem to support row value comparisons like this: I get an error message at the first comma. Is there a long form way of doing the same comparison that could be compatible with older SQLite implementations? I’m no expert in SQL but …

C# BulkCopy.WriteToServer Changing Values

I have a datatable that is created from and excel sheet. I am trying to SqlBulkCopy.WriteToServer. When I do so it converts my “Percent” value to 0 when my tables schema has type Decimal(38,0) for the “Percent” column. However, it inserts correctly when I have the Data Type as Float. I…

Linq tolist() count returns different value from translated sql

I have a situation where the translated sql direct form Visual Studio is returning a different number of records from the Linq. I am expecting 4 items but in the count() of the resulting list I only have 1. This is the case despite creating more records – it always returns 1. Strange thing is I have the…

T-SQL Equivalent of regular expression ‘b’

I’m in the process of converting a CLR function that utilizes regex to a SQL function. I know that SQL Server does not fully support regex, but i just need one case to work which is a word search. Search Field Value: {“Id”:1234, “Title”: “The quick brown”} Regex Patte…