X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 82D9252810 for ; Mon, 16 May 2005 18:35:58 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 01705-07 for ; Mon, 16 May 2005 21:35:55 +0000 (GMT) Received: from mta10.nationwireless.net (mta10.nationwireless.net [63.163.128.10]) by svr1.postgresql.org (Postfix) with ESMTP id 80DB952805 for ; Mon, 16 May 2005 18:35:50 -0300 (ADT) Received: from jfradkin [63.162.100.127] by mta10.nationwireless.net with ESMTP (SMTPD-8.20) id A23803A0; Mon, 16 May 2005 17:35:52 -0400 From: "Joel Fradkin" To: Subject: getting duplicate number is there a Date: Mon, 16 May 2005 17:36:21 -0400 Message-ID: <000e01c55a5f$4d912d00$797ba8c0@jfradkin> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_000F_01C55A3D.C67F8D00" X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=1.934 tagged_above=0 required=5 tests=AWL, HTML_MESSAGE, MSGID_DOLLARS X-Spam-Level: * X-Archive-Number: 200505/118 X-Sequence-Number: 21431 This is a multi-part message in MIME format. ------=_NextPart_000_000F_01C55A3D.C67F8D00 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit I was using SET TRANSACTION ISOLATION LEVEL SERIALIZABLE in MSSQL. Is there something similar in postgres to ensure its not in the middle of being updated? sql = "SELECT COUNT(*) FROM tblcase WHERE LocationID = " & intLocationID & _ " and substr(casenum,length(casenum)-1,2) = '" & right(year(date),2) & "' AND clientnum = '" & _ chrClientNum & "'" I will add a select just before doing the insert to see if this helps, its not happening a bunch, but 5 6 times a day is still an issue for me. I use the count as a segment of my case number so each time a new case is entered the count goes up for that location for that year. Joel Fradkin Wazagua, Inc. 2520 Trailmate Dr Sarasota, Florida 34243 Tel. 941-753-7111 ext 305 jfradkin@wazagua.com www.wazagua.com Powered by Wazagua Providing you with the latest Web-based technology & advanced tools. C 2004. WAZAGUA, Inc. All rights reserved. WAZAGUA, Inc This email message is for the use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and delete and destroy all copies of the original message, including attachments. ------=_NextPart_000_000F_01C55A3D.C67F8D00 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

I was using SET = TRANSACTION ISOLATION LEVEL SERIALIZABLE in MSSQL.

 

Is there something = similar in postgres to ensure its not in the middle of being = updated?

 

            = sql =3D "SELECT COUNT(*) FROM tblcase WHERE LocationID =3D " & = intLocationID & _

           &= nbsp;      " and substr(casenum,length(casenum)-1,2) =3D '" & = right(year(date),2) & "' AND clientnum =3D '" & _

           &= nbsp;      chrClientNum & "'"

 

I will add a select just before doing the insert to = see if this helps, its not happening a bunch, but 5 6 times a day is still an = issue for me.

I use the count as a segment of my case number so = each time a new case is entered the count goes up for that location for that = year.

 

Joel Fradkin

 

Wazagua, Inc.
2520 Trailmate Dr
Sarasota, Florida = 34243
Tel.  941-753-7111 ext 305

 

jfradkin@wazagua.com
www.wazagua.com
Powered by Wazagua
Providing you with the latest Web-based technology & advanced = tools.
© 2004. WAZAGUA, Inc. All rights reserved. WAZAGUA, Inc
 This email message is for the use of the intended recipient(s) and = may contain confidential and privileged information.  Any unauthorized = review, use, disclosure or distribution is prohibited.  If you are not the intended recipient, please contact the sender by reply email and delete = and destroy all copies of the original message, including = attachments.

 


 

 

------=_NextPart_000_000F_01C55A3D.C67F8D00--