queryUsingSQL()
Use the queryUsingSQL() function to query the database using SQL statements.
Syntax
Concept[] queryUsingSQL(String conceptURI, String sql, boolean queryChildren)
Where, conceptURI is the URI of the result concept type, and sql is the SQL statement to be executed. If queryChildren boolean is set to true, concept properties are recursively queried. The function returns an array of result concepts.
Example
Database.setCurrentConnection("/SharedResources/Mainframe"); Database.beginTransaction(); Concepts.BEUSER.CAR_TABLE []ct = Database.queryUsingSQL("/Concepts/BEUSER/CAR_TABLE","select * from BEUSER.CAR_TABLE",true); for(int i=0;i<ct@length;i=i+1) { System.debugOut(""+ct[i].CAR_ID+ct[i].TIRE_TABLE[0].CAR_ID+ct[i].TIRE_TABLE[0].TIRE_ID); } Database.unsetConnection();
Copyright © Cloud Software Group, Inc. All rights reserved.