Weird DQL grammar. Part II

Typically Documentum ignores DQL hints which are present in subqueries (though in most cases return_top hint is useless):

1> select count(*) from
2> (select user_name from dm_user enable(return_top 10))
3> go
count(*)              
----------------------
                    66
(1 row affected)

also Documentum fails to parse union keyword in subquery:

1> select count(*) from
2> (select user_name from dm_user union select group_name from dm_group)
3> go
[DM_QUERY_E_SYNTAX]error:  
  "A Parser Error (syntax error) has occurred in the vicinity of:  
   select count(*) from (select user_name from dm_user union"

but:

1> select count(*) from
2> (select user_name from dm_user enable(return_range 1 10 'user_name'))
3> go
count(*)              
----------------------
                    10
(1 row affected)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s