[OT] SQL question

Mark Schonewille m.schonewille at economy-x-talk.com
Mon Nov 11 09:13:20 EST 2013


Hi JBV,

Do you mean transactions? If not, how would you do this?

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553

Use Color Converter to convert CMYK, RGB, RAL, XYZ, H.Lab and other 
colour spaces. http://www.color-converter.com

Buy my new book "Programming LiveCode for the Real Beginner" 
http://qery.us/3fi

Fill out this survey please
http://livecodebeginner.economy-x-talk.com/survey/

On 11/11/2013 14:35, jbv at souslelogo.com wrote:
> Hi Malte,
>
> I'm not familiar with postGreSQL and therefore I was thinking : instead
> of trying to put everything in a single query because of concurring
> connections to the DB, why don't you store (temporarily) and process
> the requests one after another in some sort of FIFO buffer (or reject
> the incoming requests that are already in the buffer) ?
>
> jbv
>
>> Hi all,
>>
>> I am tearing my hair out on an SQL query. Before I lose my marbles I'd
>> better ask here:
>>
>> given are 2 tables
>>
>> table1
>>
>> ID,UUID,first_number
>>
>>
>> table 2
>>
>> ID,UUID,running_number
>> I need to do an INSERT into table 2.
>>
>> running_number should always be the last inserted running_number +1, if
>> datasets for UUID are already present in table 2, otherwise, if no data is
>> present for UUID,  it should be table1s first_number +1 for the given
>> UUID.
>>
>> Anybody can help me to put this into a single query? (reason I need it in
>> one query is, that there might be concurring connections to the DB and I
>> want to lock the table first on postGreSQL)
>>
>> All the best,
>>
>> Malte
>>
>>
>>
>>
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>




More information about the use-livecode mailing list