msnraju / inline-query

Inline Query | SQL like Queries in Business Central

Home Page:https://www.msnjournals.com/post/inline-query-sql-like-queries-in-business-central

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Inline Query | SQL like Queries in Business Central

Inline Query is a library that can execute SQL like Queries in Business Central AL Language. This is a small compiler in AL that compiles and executes SQL like queries in text constants or text variables.

Example

Count of released Sales Orders

Query

SELECT COUNT(1) FROM [Sales Header] WHERE Status = 'Released'

AL Code

procedure GetOrderCount(): Integer
var
	InlineQuery: Codeunit "Inline Query";
	OrderCount: Integer;
	QueryTxt: Label 'SELECT COUNT(1) FROM [Sales Header] WHERE Status = ''Released''', Locked = true;
begin
	OrderCount := InlineQuery.AsInteger(QueryTxt);
	exit(OrderCount);
end;

See msnJournals.com for more information.

About

Inline Query | SQL like Queries in Business Central

https://www.msnjournals.com/post/inline-query-sql-like-queries-in-business-central

License:MIT License


Languages

Language:AL 96.0%Language:JavaScript 2.9%Language:CSS 1.2%