Hi,
I want to add a specific SQL to 1 query which will work only on MSSQL. How
to do that:
*Criteria:*
Session
.CreateCriteria<User>()
.Add(Expression.Sql("TABLESAMPLE (100 PERCENT)"))
.SetMaxResults(count)
.List<User>();
*Generated SQL:*
SELECT
TOP (6)
this_.user_id
FROM users this_
WHERE TABLESAMPLE (100 PERCENT)
*EXPECTED SQL:*
*
SELECT
TOP (6)
this_.user_id
FROM users this_
TABLESAMPLE (100 PERCENT)
The WHERE keyword should no exist. How to do that without using raw sql for
the whole query?
10x
*
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/nhusers/-/3mgopPn-x0MJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/nhusers?hl=en.