Charlotte Foust
cfoust at infostatsystems.com
Tue Mar 3 10:21:48 CST 2009
I've used Ken's suggestion of a Case statement in this situation when I need to return either a boolean or even a conditional string or numeric value for use in sorting. It works nicely for this. Charlotte Foust -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Tuesday, March 03, 2009 7:49 AM To: Access Developers discussion and problem solving Subject: [AccessD] SQL Equivalent In Access you can create a query, even in the QBW, where you make a field [FieldA]=[FieldB] as AIsEqB and the result is a true / false in a separate AIsEqB field. I have been trying to do that in SQL Server and it just will not accept the additional field. More precisely, it tries to turn the [FieldA]=[FieldB] into a string '[FieldA]=[FieldB]'. If I manually edit the SQL to include a where clause looking like that it turns it into an inner join. Is there a way to create this construct (a new field that evaluates to a true / false) in SQL Server? -- John W. Colby www.ColbyConsulting.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com