Database Resource

Post any questions you have about using the Verj.io Studio, including client and server-side programming with Javascript or FPL, and integration with databases, web services etc.

Moderators: Jon, Steve, Ian, Dave

Matt

Database Resource

#1

Postby Matt » Fri Jan 22, 2010 1:58 pm

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

Simon
Ebase User
Posts: 25
Joined: Thu Aug 27, 2009 9:43 am
Location: Hampshire County Council
Contact:

Re: Database Resource

#2

Postby Simon » Fri Jan 22, 2010 2:56 pm

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:

Code: Select all

count(*) as MY_INT
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
0 x

Matt

#3

Postby Matt » Mon Jan 25, 2010 8:39 am

That works great thank you
0 x


Who is online

Users browsing this forum: No registered users and 111 guests