Wednesday, November 11, 2009

Keyword Options for X++ select Statements Keyword

Description

firstfast
Fetches the first selected record faster than the remaining selected records.

firstonly
Returns only the first selected record.

forupdate
Selects records for updating.

nofetch
Specifies that the Dynamics AX runtime should not execute the statement immediately because the records are required only by some other operation.

forceplaceholders
Forces the Dynamics AX runtime to generate a query with placeholder field constraints. For example, the query generated for the preceding code example looks like this: select * from myTable where myField1=?. Database query plans are reused when this option is specified. This is the default option for select statements that do not join table records. This keyword cannot be used with the forceliterals keyword.

forceliterals
Forces the Dynamics AX runtime to generate a query with the specified field constraints. For example, the query generated for the preceding code example looks like this: select * from myTable where myField1='value'. Database query plans are not reused when this option is specified. This keyword cannot be used with the forceplaceholders keyword.

forceselectorder
Forces the Microsoft SQL Server query processor to access tables in the order in which they are specified in the query. (No effect on Oracle.)

forcenestedloop
Forces the SQL Server query processor to use a nested-loop algorithm for table join operations. Other join algorithms, such as hash-join and merge-join algorithms, are therefore not considered by the query processor.

reverse
Returns records in reverse of the select order.