Jump to content
Sign in to follow this  
qwerty`

Counting records

Recommended Posts

i have 2 tables, tableA (aID, Name) and tableB (aID, bID, status). aID in tableB reference to the one in tableA. i have a layout based on tableA. On that layout, i want to diplay the total number of records that each ID has in tableB which has a status of "Approved".

If using SQL, it will be:

Select Count(bID) FROM tableA a, tableB b

WHERE a.aID = b.aID

AND b.status = "Approved"

AND a.aID = 1

but how do i go about doing this without using SQL?

Share this post


Link to post
Share on other sites

I'm not sure, if it is the most efficient way, but I would do the following:

1) Create in table A a new global field

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

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