Example 1 for the function curunreservedpgs includes the following erroneous select syntax:
select db_name(dbid), d.name, curunreservedpgs(dbid, lstart, unreservedpgs) from sysusages u, sysdevices d where d.low <= u.size + vstart and d.high >= u.size + vstart -1 and d.status &2 = 2
Replace Example 1 in its entirety with the following text:
Example 1 Returns the database name, device name, and the number of unreserved pages for each device fragment
If a database is open, curunreservedpgs takes the value from memory. If it is not in use, the value is taken from the third parameter you specify in curunreservedpgs. In this example, the value comes from the unreservedpgs column in the sysusages table.
select db_name(dbid), d.name, curunreservedpgs(dbid, lstart, unreservedpgs) from sysusages u, sysdevices d where u.vdevno=d.vdevno and d.status &2 = 2
name ------------------------------ -------------------------- ----------- master master 1634 tempdb master 423 model master 423 pubs2 master 72 sybsystemdb master 399 sybsystemprocs master 6577 sybsyntax master 359 (7 rows affected)