Hi, I have inherited some legacy dbase .dbf files and the associated sql for them, I have been tasked with converting the .dbf's to sql server (done) but what I'm stuck on is how to convert or rewrite the sql to work with sql server.
The current sql uses several dbase expression functions that, of course, does not work with sql server. I would really appreciate it if someone could help me rewrite the sql.
Here is the sql I need to rewrite -
1. - "SELECT DISTINCT * FROM webbldg having val(risk_id) = val(right('::risk_id::',5))"
2. - "SELECT * FROM webcont having val(risk_id) = val(right('::risk_id::',5)) and not left(risk_id,1)='X'"
TIA,
Phillip
The current sql uses several dbase expression functions that, of course, does not work with sql server. I would really appreciate it if someone could help me rewrite the sql.
Here is the sql I need to rewrite -
1. - "SELECT DISTINCT * FROM webbldg having val(risk_id) = val(right('::risk_id::',5))"
2. - "SELECT * FROM webcont having val(risk_id) = val(right('::risk_id::',5)) and not left(risk_id,1)='X'"
TIA,
Phillip