Go Back   Access World Forums > Microsoft Access Discussion > Queries

Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
Old 09-17-2019, 02:59 AM   #1
Newly Registered User
Join Date: Aug 2017
Posts: 30
Thanks: 2
Thanked 3 Times in 3 Posts
Auntiejack56 is on a distinguished road
Calculated Fields in SQL

Hi all,
There was a time when this query would give an error, because you couldn't use a calculated field in a second calculation in the same query:
SELECT Len([EntrantName])*[EntrantID] AS EntrantCode, tblEntrants.EntrantName, IIf([EntrantCode]>50,[EntrantCode],[EntrantName]) AS EntrantDescription
FROM tblEntrants;
The SQL itself is just for illustration purposes (it works but has no real world application), but the point is that one calculated field, EntrantCode, is used in a second calculation for EntrantDescription.
My question is that I now have some quite complex calculations that I would like to use in a single query, but I'm hesitant to do so in case the results are subject to limitations that I may not be aware of. Can anyone advise?

Auntiejack56 is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculated Fields Pauldohert General 8 06-22-2004 05:42 AM
help with calculated fields! angelfish Forms 0 06-15-2004 10:49 PM
calculated fields Webmaster@worksnotfun.com Forms 2 03-21-2002 08:46 AM
calculated fields WILSON Forms 2 04-26-2000 03:13 PM
Calculated Fields lnoles Reports 1 12-22-1999 11:22 PM

All times are GMT -8. The time now is 12:11 PM.

Microsoft Access Help
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post

Sponsored Links

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World