SQL Count function

Results 1 to 2 of 2

Thread: SQL Count function

  1. #1
    Matt Brighton Guest

    Default SQL Count function

    I have an Access database with fields "column_one", "column_two"..."column_four".<BR><BR>How would I display the total number of records by printing it out on my web page. What&#039s the command line?<BR><BR>I have "my_query = "SELECT COUNT(*) FROM testing" (testing is my table name). This doesn&#039t work, but I need some help!<BR><BR>Email is best at mbrigh@acxiom.com<BR><BR>Thanks in advance,<BR>Matt<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: SQL Count function

    You can use recordset.recordcount . this should return the number of records you have in your table, and it will return -1 if it couldn&#039t determine how many record you have.<BR><BR>another way of doing it is to run a loop through your table until you reach the end. like<BR>i =0<BR>do while not recordset.eof<BR>i++<BR>recordset.movenext<BR>loop <BR><BR>hope this will help

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts