cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
%3CLINGO-SUB%20id%3D%22lingo-sub-637595%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3EImport%20Data%20from%20Stored%20Procedure%20in%20SQL%20Server%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-637595%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20been%20trying%20to%20import%20data%20from%20a%20stored%20procedure%20but%20it%20returns%20nothing.%26nbsp%3B%20Anytime%20I%20try%20to%20use%20the%20%22Open%20Table%22%20window%2C%20it%20returns%20this%20error%20message.%26nbsp%3B%20I%20have%20used%20both%20JMP%2015%20and%20JMP%2017.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22mende001_0-1685570710539.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22mende001_0-1685570710539.png%22%20style%3D%22width%3A%20225px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22mende001_0-1685570710539.png%22%20style%3D%22width%3A%20225px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.jmp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F53309iD3E01D17C3822BB9%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22mende001_0-1685570710539.png%22%20alt%3D%22mende001_0-1685570710539.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhen%20attempting%20to%20use%20a%20script%20to%20pull%20the%20data%2C%20nothing%20is%20returned%20and%20no%20error%20message%20pops%20up.%26nbsp%3B%20Script%20is%20below%3A%3C%2FP%3E%3CP%3EConnection%20String%20%3D%26nbsp%3BCreate%20Database%20Connection(%3CBR%20%2F%3E%22DRIVER%3DSQL%20Server%3BServer%3DExample%20Server%3BTrusted_Connection%3DYes%3BAPP%3DJMP%3BDATABASE%3DExample%20DB%3B%22)%3B%3C%2FP%3E%3CP%3E%3CEXECUTE%20sql%3D%22%22%3E%3C%2FEXECUTE%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20guess%20my%20questions%20are%20what%20is%20the%20best%20way%20to%20import%20data%20from%20a%20stored%20procedure%20in%20a%20SQL%20Server%20and%20what%20is%20the%20best%20route%20for%20this%20scenario%20in%20particular%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-637595%22%20slang%3D%22en-US%22%20mode%3D%22NONE%22%3E%3CLINGO-LABEL%3EScripting%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Choose Language Hide Translation Bar
mende001
Level I

Import Data from Stored Procedure in SQL Server

Hello,

 

I have been trying to import data from a stored procedure but it returns nothing.  Anytime I try to use the "Open Table" window, it returns this error message.  I have used both JMP 15 and JMP 17.  

mende001_0-1685570710539.png

 

When attempting to use a script to pull the data, nothing is returned and no error message pops up.  Script is below:

Connection String = Create Database Connection(
"DRIVER=SQL Server;Server=Example Server;Trusted_Connection=Yes;APP=JMP;DATABASE=Example DB;");

<Execute SQL( Connection String, "EXECUTE StoredProcedure @ColumnName = 'example' ", "data table");>

 

I guess my questions are what is the best way to import data from a stored procedure in a SQL Server and what is the best route for this scenario in particular?

 

Thank you!

 

2 REPLIES 2
pmroz
Super User

Re: Import Data from Stored Procedure in SQL Server

You can't import data from a stored procedure in Oracle.  I expect the same to be true for SQL server but I defer to experts.

Perhaps could run your procedure to create a table, and then issue a SELECT * from that table with a separate execute SQL command?

If that doesn't work you could try JMP tech support.

Re: Import Data from Stored Procedure in SQL Server

Hello,

Maybe try to execute this : "EXEC storeprocedurename".

As described here: Execute a Stored Procedure - SQL Server | Microsoft Learn

 

Regards,

Guillaume

Guillaume