RBAM for SQL modifcation

Minor Changes Removed variable index