Often the direct SQL isn't going to validate in NS7. However, you should be able to export it to .xml and import it as .xml in NS7. Alternatively, if there are no parameters, just edit the SQL, paste it into SQL Studio, run it against your NS7 database, fix any table names/column names that changed, then copy it into a new Raw SQL Query once the SQL validates in SQL Studio.