Database Resource
Moderators: Jon, Steve, Ian, Dave
Database Resource
I am new to ebase, I have created a database Resource and want to know if I could use write a SQL statement with Sum or count in it and display that total from the SQL statement in box on a form.
0 x
-
- Ebase User
- Posts: 25
- Joined: Thu Aug 27, 2009 9:43 am
- Location: Hampshire County Council
- Contact:
Re: Database Resource
Hi Matt, welcome to the Ebase community!
You can indeed write an SQL statement that does exactly that. From the Assisted SQL in the DB Resource screen, enter the following code:
Fill in the FROM and WHERE boxes as necessary.
Then click the "Add a Resource Field" icon. Call the new field MY_INT, set it to Type NUMBER. Save it, map it to your form field.
You can apply the same logic to Sum, I reckon.
Hope this helps
Simon
You can indeed write an SQL statement that does exactly that. From the Assisted SQL in the DB Resource screen, enter the following code:
Code: Select all
count(*) as MY_INT
Then click the "Add a Resource Field" icon. Call the new field MY_INT, set it to Type NUMBER. Save it, map it to your form field.
You can apply the same logic to Sum, I reckon.
Hope this helps
Simon
0 x
Who is online
Users browsing this forum: No registered users and 52 guests