Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Problem with stored procedure columns

Dear Qlik-members!

I have a problem with a stored procedure i run in my load script because my company has changed something.

One month ago the procedure gave me a normal table.

Since one week the same procedure has some extra columns.

Now is the problem that my colleague has made a &*#*&$!! mistake and the procedure gives me a table with two columns who has the same name......

How can is select those both individually?

I hope you can help me

Kind Regards,

Martijn

12 Replies
blaise
Contributor III

Problem with stored procedure columns

Im not sure how you use the stored procedure but have you tested with;

Load column1, column2; sql exec your_stored_procedure;

erich_shiino
Honored Contributor

Problem with stored procedure columns

QV will probably rename as blaise said. At least, that's what happen with excel files with columns with the same name.

Maybe it will be column and column 1

you could try:

Load *; sql exec your_stored_procedure;

or even without the load to see the names you can get

blaise
Contributor III

Re: Problem with stored procedure columns

Well the column1 and column2 was only used as an example where he can specify what columns to load

Sent from my Sony Ericsson Xperia arc

Not applicable

Re: Problem with stored procedure columns

Thanks blaise and erich!

I like the idea of use * to know the names who gives Qlikview them.

But when I use

Temp:

LOAD *;

SQL EXEC "$(vDatabase)".dbo.[name_procedure] 2,'$(vStartDate)','$(vEndDate)',$(i);

I get an error (something like "Reading OLEDB failed") and when I use the old method

Temp:

LOAD a,

b,

c,

d;

SQL EXEC "$(vDatabase)".dbo.[name_procedure] 2,'$(vStartDate)','$(vEndDate)',$(i);

not....

Please help

Kind regards,

Martijn

blaise
Contributor III

Re: Problem with stored procedure columns

1. only the sql exec part and reload the application

2. Find the column names in the table viewer (ctrl+t)

3. add the column names into a load ; statement

4. Reload the application

Not applicable

Re: Problem with stored procedure columns

Hi Blaise,

When I do this I still get the same error...

Now I run only

SQL EXEC "$(vDatabase)".dbo.[name_procedure] 2,'$(vStartDate)','$(vEndDate)',1;

I have add the "mode is write" part on the end of my connection string and checked the sentence about read en write on database.

Hope you or somebody can help me.

Kind Regards,

Martijn

Not applicable

Re: Problem with stored procedure columns

Hi Erich,

The part withou load wil also not work...

I get error reading OLEDB failed.

blaise
Contributor III

Re: Problem with stored procedure columns

How did you load the data before? Does the stored procedure works at all?

Best Regards

Not applicable

Problem with stored procedure columns

Yes normal it works.

See my first post

Community Browser