Skip to content

Column name like 'Qty as Litre' is treated alias name #427

@jaiganeshs

Description

@jaiganeshs

We have a table where the column name is "Qty as Litre". When using this column in insert,update queries it is interpreted as alias name, thus breaking the query as [Qty] as [Litre]. This is breaking the query. Is there a way to solve this?

var insertQuery = new Query("Table01").AsInsert(new Dictionary<string, object> { { "Int as Field01", 1 }, { "Long as Field01", 1 } });
sqlResult = compiler.Compile(insertQuery);
Console.WriteLine($"Insert Query: {Environment.NewLine}{sqlResult.Sql}");

Generated Output:
INSERT INTO [Table01] ([Int] AS [Field01], [Long] AS [Field01]) VALUES (@p0, @p1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions