Focal Point
[SOLVED] SQLMSS Stored Procedure Syntax

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

January 28, 2010, 12:20 PM
Dan Pinault
[SOLVED] SQLMSS Stored Procedure Syntax
Hi folks,

I have a SQLMSS Stored Procedure that works OK from the SQL Management Console but I am unable to create a Synonym for it nor can I call it in a procedure without errors.

The Synonym Editor gives me this...
(FOC1400) SQLCODE IS 156 (HEX: 0000009C) XOPEN: 42000 : Microsoft OLE DB Provider for SQL Server: [42000] Incorrect syntax near : the keyword 'AS'. [42000] Incorrect syntax near the keyword 'AS'. (FOC1405) SQL PREPARE ERROR.


Calling it from a fex gives me this...
(FOC1400) SQLCODE IS 208 (HEX: 000000D0) XOPEN: 42S02
 : Microsoft OLE DB Provider for SQL Server: [42S02] Invalid object name '#pivot_columns'.
 L    (FOC1405) SQL PREPARE ERROR.
 (FOC205) THE DESCRIPTION CANNOT BE FOUND FOR FILE NAMED: SQLOUT
 (FOC205) THE DESCRIPTION CANNOT BE FOUND FOR FILE NAMED: SQLOUT
 BYPASSING TO END OF COMMAND


I'm trying to figure out how to get more detail about these errors. The documentation makes a reference to using the RAISERROR method to capture the errors but beyond that there isn't any instruction on how to use it.
Can you point me in the right direction to learn more about the RAISERROR method or some other method if you have one?

Thanks!

Dan

This message has been edited. Last edited by: Dan Pinault,


7.7.05M/7.7.03 HF6 on Windows Server 2003 SP2 output to whatever is required.
January 28, 2010, 05:35 PM
Dan Pinault
I guess it's all in how you call the Stored Procedure.

This is the code that ended up working for me...
ENGINE SQLMSS SET DEFAULT_CONNECTION DATABASENAME
SQL SQLMSS SET NOCOUNT ON 
SQL SQLMSS SET ANSI_WARNINGS OFF
SQL SQLMSS EX [dbo].[storedProcedureName];
-RUN
TABLE FILE SQLOUT
PRINT *
END



7.7.05M/7.7.03 HF6 on Windows Server 2003 SP2 output to whatever is required.
July 07, 2010, 06:24 PM
Stefaans
Dan
Thanks a million for this posting.This helped me resolve my problem of accessing/ passing an MDX query via WebFOCUS.
I am a bit sad that you cannot do a direct PASSTHROUGH query (with MDX queries)
However..
I am now able to interrogate my SQL Server data mining models and display the results within WebFOCUS.
regards Steve Simon

This message has been edited. Last edited by: Stefaans,


WebFOCUS 7.7.01 Windows, TSO 7.0
July 08, 2010, 05:04 PM
Dan Pinault
Stefaans,

I'm glad to hear this information was useful to you!

Cheers!

Dan


7.7.05M/7.7.03 HF6 on Windows Server 2003 SP2 output to whatever is required.