Named queries with QueryString in SELECT TOP x

Can I use a QueryString parameter within the TOP x line of a named query?

E.g.
SELECT TOP :Samples * FROM table

With :Samples in there, I get a non-descript error:
image

Without it, it works… Is this a bug?

EDIT: nevermind, should have read the help first!
QueryString params need to use {} instead of :
E.g.
SELECT TOP {Samples} * FROM table

2 Likes