Skip to content
Discussion options

You must be logged in to vote

@aminmohammadi05 there are few limitations in current grammar/parser as a workaround please use sth like this:

SELECT newid() as randomId, cii.ContentType FROM ContentItemIndex cii
WHERE (ContentType = 'Product') AND (Published = 1) 
ORDER BY randomId limit 3
  • TOP clause is SQL Server specific please use limit instead,
  • you can't use function in order by clause,
  • you can't combine * with specified column list, you need to list them all.

Replies: 2 comments 12 replies

Comment options

You must be logged in to vote
3 replies
@aminmohammadi05
Comment options

@hishamco
Comment options

@aminmohammadi05
Comment options

Comment options

You must be logged in to vote
9 replies
@aminmohammadi05
Comment options

@lampersky
Comment options

@aminmohammadi05
Comment options

@aminmohammadi05
Comment options

@aminmohammadi05
Comment options

Answer selected by aminmohammadi05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants