Stored procedure when executing from excel returns data with different figures

  • Hi all,

    I am using stored procedure to retrieve data from db. I am facing little strange situation. data is varying when i am executing stored procedure from ssms and excel. it varies in decimal points but its vital for me to match both data. Please help me in this regard.

  • If you use float data type then it's normal,.. and to have fixed decimal places you need to use another numeric type, e.g. decimal.

    Do you use some formatting in your SP?

    Igor Micev,
    My blog: www.igormicev.com

  • In stored procedure we are using numeric(38,2), will it make difference?

  • surya-434952 (9/28/2014)


    In stored procedure we are using numeric(38,2), will it make difference?

    No. Then it seems the issue is at the Excel side.

    Igor Micev,
    My blog: www.igormicev.com

  • I am just pulling the data from stored procedure, if i execute same from excel i am getting variation in data. is there some thing I need to do in excel?

  • Can you give an example of the outputs? Just trying to ascertain what the actual difference are?

    ----------------------------------------------------------------------------------
    Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?

  • Excel loves to mangle numbers, try selecting the columns you are importing to and changing the formating to Text.

  • its differences like stored procedure returns 12.9% excel places it as 13.1%

Viewing 8 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply