Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
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
Partner - Specialist
Partner - Specialist

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

Load column1, column2; sql exec your_stored_procedure;

erichshiino
Partner - Master
Partner - Master

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
Partner - Specialist
Partner - Specialist

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
Author

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
Partner - Specialist
Partner - Specialist

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
Author

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
Author

Hi Erich,

The part withou load wil also not work...

I get error reading OLEDB failed.

blaise
Partner - Specialist
Partner - Specialist

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

Best Regards

Not applicable
Author

Yes normal it works.

See my first post