If the variable already exists in your input box in the design, you can check its contents in the Settings menu, Variable Overview. If that's OK, then the SQL should look like the following:
WHERE ol_kapa = 'A' AND (date(ol_onaydt) BETWEEN '$(basTarih)' AND '2012-10-08')
So QlikView returns the value of the variable and so it's passed on to the ODBC driver and the database.
Hope that helps.