INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

COUNTING RECORDS

COUNTING RECORDS

(OP)
THIS SHOULD BE EASY, BUT I CAN'T REMEMBER HOW TO DO IT.  I WANT TO DO A SELECT STATEMENT AND CREATE A FIELD THAT INCREMENTS WITH EACH RECORD SO IF THERE ARE FOUR RECORDS THE NEW FIELD LETS CALL IT COUNT1 WILL BE POPULATED WITH 1-4.

ANY HELP WILL BE GREATLY APPRECIATED.

THANK YOU.

RE: COUNTING RECORDS

Hello,

are you want to do the select within an application or direct on the sqlbase database ??

RE: COUNTING RECORDS

Hello... from a gupta application you can use the function SqlGetResultSetCount( ) to get the number of rows in the result-set of your SQL-Statement. But if you use this function you must acivate the result-set of this specified connection-handle with SqlSetResultSet( TRUE ).
Don´t forget to disable the result set after the execution with SqlSetResultSet( FALSE ). If you don´t do this this handle will be use more memory as needed in the following opperations.

RE: COUNTING RECORDS

(OP)
thanks for your response, but I just want an sql statement that will due this.  This is not part of an application just a query.

Thanks

jscorpion

RE: COUNTING RECORDS

hmmm... I only know the function "rowcount" but you only can use it to get total number of rows in a table and not on a specified sql statement...

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close