Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 239F2475BC3 for ; Thu, 5 Dec 2002 04:11:20 -0500 (EST) Received: from web14512.mail.yahoo.com (web14512.mail.yahoo.com [216.136.227.51]) by postgresql.org (Postfix) with SMTP id 4DE95476241 for ; Thu, 5 Dec 2002 04:11:09 -0500 (EST) Message-ID: <20021205091110.58690.qmail@web14512.mail.yahoo.com> Received: from [129.13.135.89] by web14512.mail.yahoo.com via HTTP; Thu, 05 Dec 2002 01:11:10 PST Date: Thu, 5 Dec 2002 01:11:10 -0800 (PST) From: kanika singh Subject: Regarding boolean datatype To: pgsql-sql@postgresql.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200212/63 X-Sequence-Number: 10651 Hello all, this is my first interaction with this list. I have a problem. I was using MSSQL Server as db, now i m changing to Postgres. I know that the bit type in MSSQLserver is boolean in Postgres. So, i have the following query and getting the following error:Why??? strSql = " Update parts Set name = ? , description = ? world_market = ?, part = ? , unit_of_measure = ? Where depot= ?; prepStmt = conn.prepareStatement(strSql); prepStmt.setString( 1, Pname) ; prepStmt.setString( 2, Pdesc) ; prepStmt.setBoolean(3, BoolWM) ; prepStmt.setString( 4, strPart); prepStmt.setString( 5, strUoM); prepStmt.setString( 6, strDepot); This is how i m assigning value to BoolWM, boolean BoolWM ; if ( WM.equals("False")) { BoolWM = false ; } else { BoolWM = true; } Error is::: SQLError ERROR: Unable to identify an operator '~~' for types 'boolean' and 'unknown' You will have to retype this query using an explicit cast I know, somewhere i m making mistake, but where?? Moreover, if i m updating the database with the above query, the db is giving the error and deleting the data from the db. As per my understanding it should automatically rollback. What is the problem??? What are the other coding rules for Postgres?? Please guide. Thanks and regards __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com