Skip to content

Like query for an int column #1095

Open
@Trobeloo

Description

@Trobeloo

I have an SQL Server table with an int identity column and I wish to use Query to find all invoice (Facture) starting with a particular number sequence "1406" for example.
In TSQL I use:
SELECT TOP (1000) [Id_Facture]
FROM [Factures]
where Id_Facture like '1406%'

If I use Query with the following QueryField I get an error "Inputs string was not in a correct format"
var field = new QueryField("Id_Facture", Operation.Like, "1406%");

if I remove the percent sign it works but it doesn't return what I need:
var field = new QueryField("Id_Facture", Operation.Like, "1406");

Metadata

Metadata

Assignees

Labels

questionFurther information is requested

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions