-
Couldn't load subscription status.
- Fork 331
Open
Description
First of all, thanks for the effort. I'm using xo/dbtpl package specifically for generating Go code from raw SQL queries targeting a MSSQL database. However, I faced the following limitation/issue when wanted to generate code for the following simple query:
SELECT TOP (%%size int%%) * FROM Orders;I try to generate code using the following command:
go run github.com/xo/dbtpl@latest \
query \
'ms://sa:pass@127.0.0.1:1433/db' < .query.sql \
-M \
-B \
-U \
-2 \
-T RecentOrdersResult \
-F RecentOrdersIt returns the following error:
error: mssql: The number of rows provided for a TOP or FETCH clauses row count parameter must be an integer.
exit status 1I circumvented this using OFFSET 0 ROWS FETCH NEXT %%size int%% ROWS ONLY, but there are performance improvements when TOP (N) syntax is used.
Metadata
Metadata
Assignees
Labels
No labels