Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

I'm working on a cross-tab report using ExecuteSQL. I'd like to try to do it as a single eSQL statement but I'm not sure if its possible or not. I'm still a bit of an eSQL newbie.

Background, the database manages work done in a condominium building. Each apartment in the building is identified by a floor and a location in the building; 1-9 for the floors and N, NE, SE, W for the location. For the report, the floor is on the vertical axis and location is the horizontal axis. Each cell in the report is a sum of apartments where the work has been completed.

I have the first part of the statement working, I can grab a total number of apartments completed on each floor. What I need is the total for each location, on each floor. 

So far the SELECT statement looks like this. I didn't include the eSQL and the delimiter bits. It returns the floor # and the total number of apartments completed correctly. 

"SELECT 
    a.\"apt_loc_floor\",
    COUNT (a.\"zz_ID\")
    
FROM \"rep_Apartments\" a
INNER JOIN \"accounts\" b ON a.\"zz_ID\" = b.\"zz_fk_apartment\"
WHERE b.\"ac_conversion_date\" is not null
GROUP BY a.\"apt_loc_floor\"
ORDER BY a.\"apt_loc_floor\"

I know it could be done via several eSQL statements but I'd like to try to do it with as few as possible. Any suggestions?

Also, the second field for the location is "apt_loc_location"

Dave Zakary

 

hey David! just off the bat, I wonder if UNION would help (several SQL queries linked). Can you post a screen shot (of Excel) as this might look?

once you get the values (perhaps pipe delimited), you could use Virtual List/Table to get the values in the report. contact me off list if needed.

beverly

 

 

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.