June 24, 2019 at 8:41 am
So my end result, I want to use the dataset in Tableau.
Right now, I have a stored procedure.
DECLARE @name TABLE
(
VALUE1
VALUE2
VALUE3
)
SELECT
DIFFERENT VALUES AS
VALUE1
VALUE2
VALUE3
INTO #A
FROM DB1
WHERE
( MYPARAMETERS = -1)
SELECT
DIFFERENT VALUES AS
VALUE1
VALUE2
VALUE3
INTO #B
FROM DBO2
WHERE
(PARAMETERS= -1)
I have more than 1 stored procedure that I am trying to bring into Tableau and am only able to drag one table out. I cant bring a second out. So what I am trying to do is create 3 views (but will have no parameters) and create a mapping table etc.
Unless .. u think I have the wrong logic to do this?
Any ideas people?
June 25, 2019 at 7:54 am
any ideas on the logic?
Have I explained myself correctly?
June 25, 2019 at 8:33 am
I'm sorry. I don't understand what you are trying to accomplish. Can you provide some sample data (DDL and DML), the sample code of your stored procedure(s) and a display of the final result you need?
If you need the results of different stored procedures into a single table you can use the basic INSERT INTO [SingleTable] SELECT...FROM... statement inside each stored procedure.
If you create multiple (temp-)tables inside a single stored procedure and need the results combined, you can use a SELECT...FROM [FirstTable] UNION ALL SELECT...FROM [SecondTable] command at the end of the stored procedure. Keep in mind the number of columns and the datatype of both SELECT statements must match when using the UNION statement.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply