Heenan, Lambert
Lambert.Heenan at AIG.com
Tue May 8 12:22:41 CDT 2007
Message got bounced the first time. Let's try again. Message got bounced the first time. Let's try again. <guess mode> Well [SomeField] <=10 is a Boolean expression, and Access does the conversion for you automatically. So I suspect the SQL server is not so cooperative and that you will need to explicitly cast the expression to a Boolean value. What's SQL server's equivalent of Cbool() ? </guess mode> Lambert -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of JWColby Sent: Tuesday, May 08, 2007 11:21 AM To: 'Access Developers discussion and problem solving'; dba-sqlserver at databaseadvisors.com Subject: [AccessD] SQL Server - Turning comparisons into Booleans In Access you can do something like: MyAlias: [SomeField] <=10 Which translates into SQL that looks like: [SomeField]<=10 as MyAlias When I try move that (cut and paste) from Access into SQL Server I get a the infamous "syntax error somewhere near <" Question 1: What is wrong with that in SQL Server Question 2: How do I accomplish this directly in the query builder in SQL Server? John W. Colby Colby Consulting www.ColbyConsulting.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com