SQL Select with Binary Link

Ivan Smahin ivan_smahin at paradigmasoft.com
Wed May 21 04:36:20 CDT 2008


Hello Ivan,

Wednesday, May 21, 2008, 12:16:41 PM, you wrote:

> Hello Ruslan,

> Wednesday, May 21, 2008, 11:55:28 AM, you wrote:

>> On 5/21/08 10:19 AM, "Bart Pietercil" <bart.pietercil at cognosis.be> wrote:

>>> Hi,
>>> 
>>> I am surprised by this
>>> On 21 May 2008, at 09:09, Ruslan Zasukhin wrote:
>>> 
>>>> 
>>>>    insert into link link_name VALUES( lastreid(cust) , lastreid(ph) )
>>> 
>>> I thought lastrecid was a function on db level and as I understand it,
>>> you are using it as if it is stored (lastrecid) per table ?

>> Aha, then ops. 

>> I have write a dream...


> Still simple workaround exists.

> The fact we have to remember - any single call to the kernel/server
> can not be interrupted by another user/thread.

> So do something like this:

> SQLExecute( "insert into t1 VALUES (1); "
>             "SET @recID1 = select lastRecid(); "
>             "insert into t2 VALUES (1); "
>             "SET @recID2 = select lastRecid(); "
>             "insert into link link_name VALUES( @recID1 , @recID2 ); "
>             )


It could be much more faster if you prepare some stored procedure for
this task.


-- 
Best regards,
Ivan Smahin 
Senior Software Engineer
Paradigma Software, Inc
Valentina - The Ultra-Fast Database
http://www.valentina-db.com



More information about the Valentina mailing list