Adapter Online Help > TDV Salesforce with SSO Adapter > SQL Compliance > GETDELETED Statements
 
GETDELETED Statements
You can issue the GETDELETED query to retrieve all records deleted from the live data for the time range specified. This query accepts a datetime value as a filter.
GETDELETED FROM <table_name> WHERE <search_condition>
 
<search_condition> ::=
{
<expression> { = | < | <= | > | >= } [ <expression> ]
} [ { AND | OR } ... ]
 
<expression> ::=
| @ <parameter>
| ?
| <literal>
 
String cmd = "GETDELETED FROM Account WHERE TimeModified >='2013-01-01' AND TimeModified <='2013-02-01'";
PreparedStatement pstmt = connection.prepareStatement(cmd);
ResultSet rs = pstmt.getResultSet();
while(rs.next()){
System.out.println(rs.getString("Id"));
}
connection.close();