Skip to Content
author's profile photo Former Member
Former Member

Stock on hand at a point in time

Hi Experts

I am busy doing an inventory report in Crystal. I need to pull the stock on hand for all the items for each month (past 4 years, +-2500 items)

At the moment, i am taking inqty - outqty where date <= (beginning of each month)

My report is taking forever to process the info.

Is there any other way I can get the stock on hand at previous points in time? Or any tricks to help SQL process the data quicker?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Dec 06, 2011 at 05:56 PM

    Hi,

    You may try create an UDT to run each month to get history data to the table. So that you do not need to run it again and again.

    Thanks,

    Gordon

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 06, 2011 at 06:49 PM

    Hi Gordon

    Thanks, that's a very good idea. Otherwise I will create a view in SQL itself.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 06, 2011 at 06:50 PM

    Hi Bradley...........

    What and how many joins you have in your query report?

    This generally happens due to unwanted joins.....

    Regards,

    Rahul

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 10, 2011 at 12:15 PM

    Hi Bradely,

    I've a query pulling opening stock in qty from the system.

    Through unions on all the transaction tables i'm pulling the data warehousewise.

    It hardly takes any time.

    I'm trying to print stock value too. Which I'm unable to figure out.

    If you want I'll pass that query.

    Any idea about how to figure out stock value ?

    Thanks

    Malhaar

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 12, 2011 at 05:59 AM

    Hi Malhaar

    If you could send that query, I would really appreciate it.

    As far as the values go, you just need to sum up the Transvalue where do date <= (date in which you want to calculate for)

    You can use the oivl Table or the oinm view

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.