Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.databases.ms-sqlserver    |    Notorious Rube Goldberg contraption    |    19,505 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 18,175 of 19,505    |
|    Gene Wirchenko to All    |
|    Getting a Batch Number    |
|    31 Mar 11 14:19:53    |
      XPost: microsoft.public.sqlserver.programming       From: genew@ocis.net              Dear SQLers:               I now want to put together a simple database. I thought that I       would try something that modelled the way I do banking. I can have       multiple set-asides in one bank account. I might write a cheque off       one account that is to put money in more than one set-aside. (Or I       might transfer; it amounts to the same.) For example:               cheque for $500 from Income account to Savings Account       split:        Reserves $200, Income Tax Set-Aside $300.               This gives me a transaction batch of:               insert into Batches 'Sample Batch'        (with an id column value automatically generated)               insert into Transactions '20110331','Income',-500        insert into Transactions '20110331','Reserves',200        insert into Transactions '20110331','Income Tax S/A',200               How do I get the batch number from Batches to use in the       Transactions inserts?              Sincerely,              Gene Wirchenko              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca