Analytics-Plus Help

DeleteData.java

The following sample code is for deleting data from a table. In this example data matching the criteria

("Region" = 'West') and ("Product Category" = 'Stationary')

are deleted from the "Sales" table.

Before trying it out

public class DeleteData
{

publicstatic void deleteData()
throws Exception
{
ReportClient rc = Config.getReportClient();

rc.login(Config.LOGINNAME,Config.PASSWORD);
String uri = rc.getURI(Config.LOGINNAME,Config.DATABASENAME,"Sales");

rc.deleteData(uri,getCriteria(),null);

rc.logout();
}

privatestatic String getCriteria()
{
return "(\"Region\" = 'West') and (\"Product Category\" = 'Stationary')";
}

publicstatic void main(String[] args)
throws Exception
{
deleteData();
}
}

Share this post : FacebookTwitter