Forum Replies Created

Viewing 12 posts - 1 through 13 (of 13 total)

  • RE: SQL Monthly report

    Hi

    Had a look at Report Builder and was exactly what was needed, after about 5 attempts got the exact layout I needed. Thanks

    James

  • RE: SQL Monthly report

    Hi

    It is a report that will be generated each month by one of the stores clerks.

    I will look into reporting.

    James

  • RE: SQL Monthly report

    I have adapted the code to select only items from this month

    DECLARE @mydate DATETIME

    SELECT @mydate = GETDATE()

    SELECT Product, qty, CostCenter, Customer, TotalCost

    FROM IssueStock

    Where IssueDate between CONVERT(VARCHAR(25),DATEADD(dd,-(DAY(@mydate)-1),@mydate),101)

    AND CONVERT(VARCHAR(25),DATEADD(dd,-(DAY(DATEADD(mm,1,@mydate))),DATEADD(mm,1,@mydate)),101)

    UNION ALL

    SELECT...

  • RE: Help with trigger

    The original statement was fine

    UPDATE U SET Quantity = U.Quantity + Inserted.q1 FROM Consumables as U INNER JOIN Inserted ON U.Product = Inserted.Product

    James

  • RE: Help with trigger

    Hi

    Sorted. I am using the table in an ASP.NET dynamic data site and there was a naming issue, so the original did work, just the asp.net code was wrong.

    Thanks all.

  • RE: Help with trigger

    No, it is some code I found, which did work at one point???

  • RE: Help with trigger

    I thought this was the inserted table

  • RE: Help with trigger

    Hi, here is the structure of the two tables, they seem ok

  • RE: Help with trigger

    Yes the trigger looks like that.

  • RE: Help with trigger

    No errors.

    The trigger is on the table ReceiveOrder that has q1 on it.

    James

  • RE: Help with trigger

    Hi,Thanks

    Tried it but it didn't work.

    James

  • RE: Trigger update

    Well I'm new to SQL. I'll check out inserted tables.

    James

Viewing 12 posts - 1 through 13 (of 13 total)