Focal Point
[CLOSED] Calling SQLMSS stored procedure to load files

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/7027006966

March 13, 2014, 12:48 PM
Greg
[CLOSED] Calling SQLMSS stored procedure to load files
I have a report that requires no variables. You just run it and it delivers all the correct rows to the browser. All the column names match the field names in the MSSQL DB I want to send these rows to.

Here is the sql set up information:
ENGINE SQLMSS SET DEFAULT_CONNECTION wfdata_dev
SET SQLENGINE = SQLMSS
SQL SQLMSS EXEC WFData_dev.dbo.Load_Labor_Records ‘&Job_Title’, &Pay_Grade, ‘&FT_Job_Nbr’, ‘&PT_Job_Nbr’, &Company, &Emp_Status, ‘&Company_Name’, &Business_Unit, ‘&Period_DT’, &Emp_Count;
-RUN
TABLE FILE SQLOUT
PRINT *
WHERE RECORDLIMIT EQ 2000;
END


My report is underneath:

[CODE]
JOIN
.
.
WHERE
.
.
BY
BY
..
ON TABLE HOLD SQLOUT
END
-RUN
[CODE]

When I run it the browser prompts me for all 10 of the column names listed after the stored procedure name as if they were amper variables.

I want it to grab this 1400 or so rows and add them to the database.

This message has been edited. Last edited by: <Kathryn Henning>,


prod: WF 7.7.03 platform IIS on Windows 2007, databases: Oracle, , MSSQL

March 19, 2014, 04:35 PM
<Kathryn Henning>
Hi Greg,

Please remove the ampersand character from the beginning of each name and ensure that all of them are enclosed in single tick marks.

Thanks and regards,

Kathryn
March 22, 2014, 08:08 PM
Jim Morrow
quote:
‘&Job_Title’

Alternate approach is you need to send the "&" to SQL server you can escape them with the vertical bar e. g. ‘&|Job_Title’


Jim Morrow
Web Focus 7.6.10 under Windows 2003
MVS 7.3.3



March 26, 2014, 02:02 AM
Ramkumar - Webfous
quote:
‘&|Job_Title

It think this does the trick, if the SQL Server Stored procedure expects a String input "&Job_Title"

Else where Modify your Stored Proc to accept strings without & and just pass "Job_Title".

Thanks..


Thanks,

Ramkumar.
WebFOCUS/Tableau
Webfocus 8 / 7.7.02
Unix, Windows
HTML/PDF/EXCEL/AHTML/XML/HTML5