Charlotte Foust
cfoust at infostatsystems.com
Tue Mar 3 13:33:50 CST 2009
I haven't run into that, but I'm sure you're right if you're trying to work between two tables in the process. Charlotte Foust -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Hewson, Jim Sent: Tuesday, March 03, 2009 11:21 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] SQL Equivalent And sometimes it doesn't work. What I found was that the field needs the table identified first. dbo.table1.fieldA = dbo.table2.fieldB Especially if there is any join involved. Jim -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust Sent: Tuesday, March 03, 2009 10:22 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] SQL Equivalent 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 -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com ######################################################################## ######## If you have received this message in error, please contact the sender immediately and be aware that the use, copying, or dissemination of this information is prohibited. This email transmission contains information from NCI Information Systems, Inc. that may be considered privileged or confidential and is intended solely for the named recipient. ######################################################################## ######## -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com