It's not really meant to be used by developers, just internally by the Mendix application.
If you do need to read it, you can use the Community Commons module from the Marketplace. In there you can find an action called GetGUID that will return the ID value as an Integer/Long.
I hope this helps.
As Robert already mentioned, its better to let the platform handle it. If you must either use existing logic / modules like the Community Commons module.
Should there still be a need to execute this query and you know what you are doing, in that case you probably need to check the syntax for the database, sometimes reserved words need to be placed between double quotes. Also the table name cm2_project looks like an association (join) table between cm2 and project, these tables have no id column