You can't do that, sorry.
The registered IP address isn't stored in the on-disc database (which is what is queried by the "run sql" command)
If you want to get the IP address of devices (and it's purely a "Get me the IP Address of device SEP112233445566" type of API) you need to use the RisPort API suite.
http://developer.cisco.com/web/sxml/home
GTG
Please rate all helpful posts.