Passing A Parameter In Raw Sql Ormlite
I have this SQL. select sum(distance) AS distance FROM RoadTravelTableFile where checkBoxBusiness ='1' and plate_Number = 'AAA567'' I have seen this simple query for raw sql in th
Solution 1:
Replace current values with ?
and add arguments to the queryRawValue method.
Integer checkBoxBusiness = 1;
String plateNumber = "AAA567";
distance = (int) getHelper()
.getRoadTravelTableFileIntegerDao()
.queryRawValue("SELECT SUM(distance) FROM RoadTravelTableFile where checkBoxBusiness = ? and plate_Number = ?", checkBoxBusiness, plateNumber);
Post a Comment for "Passing A Parameter In Raw Sql Ormlite"