Jump to content

Henry Olive

Members
  • Content Count

    32
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Henry Olive

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Henry Olive

    Recursive S.Proc

    Interbase AAA Part's BOM (AAA uses 2 pieces AAA-1) ITEMNO................CHILDITEMNO....Qty AAA.........................AAA-1.....................2 AAA-1 Part's BOM ITEMNO................CHILDITEMNO....Qty AAA.........................AAB..........................2 AAA.........................AAC..........................3 I was expecting below result ITEMNO....CHILDITEMNO...QTY AAA.............AAA-1......................2 AAA1...........AAB..........................4 AAA1..........AAC...........................6 but i get below result ITEMNO....CHILDITEMNO...QTY AAA.............AAA-1......................2 AAA1...........AAB..........................2 AAA1..........AAC...........................3 My Recursive S.Proc like below FOR SELECT B.ITEMNO, B.CHILDITEMNO, SUM(B.QTY) QTY FROM BOM B WHERE B.ITEMNO= :"ITMNO" GROUP BY B.ITEMNO,B.CHILDITEMNO INTO :"ITEMNO",:"CHILDITEMNO", :"QTY" DO BEGIN SUSPEND; FOR SELECT B1.ITEMNO, B1.CHILDITEMNO, SUM(B1.QTY) QTY FROM BOMRECURSIVE(:"CHILDITEMNO") B1 GROUP BY B1.ITEMNO,B1.CHILDITEMNO INTO :"ITEMNO",:"CHILDITEMNO", :"QTY" DO BEGIN SUSPEND; END END Could some please correct my s.proc ? Thank You
  2. Henry Olive

    Sql Update

    Thank you SO MUCH Jeff it is Perfect Thank you Serge
  3. Henry Olive

    Sql Update

  4. Henry Olive

    Sql Update

    Interbase UPDATE INVDETAIL ID SET ID.UPRICELOCAL=(ID.UPRICE-(ID.UPRICE * ID.DISCPERC /100)) * I.CURRRATE WHERE EXISTS (SELECT 1 FROM INVOICE I where I.RNO = ID.RNO) I'm getting Column unknown I.CURRRATE err.msg. Thank You
  5. Henry Olive

    From Interbase To Firebird

    I have an Interbase 2007 database and i'd like to move to Firebird 3,0 Is there any to Database Management Tool that can transfer ALL metadata & datas from IB to Firebird w/o any headache ? Thank You
  6. Henry Olive

    Comm.Table Exp. In S.Proc

    Thank you SO SO SO MUCH Dany I just added FOR , DO , SUSPEND and now it works perfectly I wish you a healthy, happy new year with your loved ones
  7. Henry Olive

    Comm.Table Exp. In S.Proc

    Thank you so much EMailX45 I think i couldnt express my problem well i'm very sorry. You made JUST common table exprression SQL, NOT Stored Procedure JUST common table expression works w/o any problem in my side also I need to use this CTE in a Stored Proc to get expenses according to months Expect result should be like below ( for 12 months) with a stored procedure Month......Total (It is Expenses Total) 1................10,000 2................16,000 ... 12.............14,000
  8. Henry Olive

    Comm.Table Exp. In S.Proc

    I wish everyone a Healthy day Interbase 2020 I try to use a comman table expression in below stored procedure I created the s.proc w/o any problem but when i try to call the s.proc I get Multiple Rows in a Singletone Select err.msg What is wrong ? Thank You CREATE PROCEDURE EXPMONTHLY RETURNS ( TMONTH SMALLINT, MONTHNAME VARCHAR(8), TOTAL NUMERIC(18, 2) ) AS BEGIN WITH CTE (TMONTH,TOTAL) AS( SELECT TMONTH,SUM(SUBTOTAL) TOTAL FROM INVEXP WHERE TNAME='ExpInv' GROUP BY TMONTH UNION ALL SELECT TMONTH,SUM(TOTAL) TOTAL FROM SALARY WHERE TNAME = 'Sal.Pay' GROUP BY TMONTH ) SELECT CTE.TMONTH,M.MONTHNAME,SUM(CTE.TOTAL) TOTAL FROM CTE JOIN MONTHS M ON CTE.TMONTH=M.SMONTH GROUP BY CTE.TMONTH,M.MONTHNAME INTO :TMONTH,:MONTHNAME,:TOTAL; SUSPEND; END;
  9. Henry Olive

    Attempted Update During Read Only Transaction

    I saw the settings it was in InteractiveSQL section
  10. Henry Olive

    Attempted Update During Read Only Transaction

    Thank you Stano Where is the Transaction Settings ?
  11. I made backup an old database then i restored it in new Interbase-2020 when i try to test the new Truncate function i got "Attempted Update During Read Only Transaction" error msg. I checked my database's properties in IbConsole they are like below ReadOnly=False, WriteMode=Synchronous What could be the problem ? Thank You
  12. Henry Olive

    Interbase 2007 ->2020

    Thank you so much Jeff
  13. Henry Olive

    Interbase 2007 ->2020

    Thank you so much everybody answered my question. I made old version backup w/o any problem C:\MyData.GBK but i cant see any Restore choice in New version IbConsole I tried to add BackUp alias in IBConsole on the left side IbConsole but you cant show adress of OLD database Thank You
  14. Henry Olive

    Interbase 2007 ->2020

    Thank you so much Dany, Markus
  15. Henry Olive

    Interbase 2007 ->2020

    I wish everyone a healthy day. I upgraded my IB2007 to IB2020 After Install IB2020 i opened IBConsole and tried to connect my old database(IB2007) for BackUp & Restore but i got Unsupported on-disk structure for file ...... found 12, support 18 What is wrong ? Thank You
×