FUNCTION r214input THESQLDB = "TBL_BL" THESQLTABLE = "TBL_BOL" THESERVER = goWCServer.oConfig.oTask.cSQLServer usr = pas = ConnStr = [driver=SQL Server; server=]+THESERVER+[; database=]+THESQLDB+[; uid=]+usr+[;pwd=]+pas+[; Trusted_Connection=No;] curHandle = SQLstringCONNECT( connStr ) cmd = [exec InTransit ?']+ALLTRIM(user.cclientcd)+['] lr = SQLEXEC( curHandle, cmd, "sq") && sq is the cursor the data is loaded into SELECT; client_zip,; bol_number,; ref_num,; weight,; pro_number,; customer_name,; customer_state,; customer_zip,; carrier_name,; ship_date,; est_delivery,; appt_date,; latest_status_description,; latest_reason_description,; date_last_updated; FROM sq; INTO CURSOR TQuery SELECT TQuery SET CENTURY ON recs=RECCOUNT()Would I just replace what is already in CMD with the select statement?