Record set problems.

Results 1 to 10 of 10

Thread: Record set problems.

  1. #1
    Al Bear Guest

    Default Record set problems.

    Is there a way to force the record set or SQL statment to show all records even when there are more than on occurance of the same record...

  2. #2
    kriek Guest

    Default RE: Record set problems.

    I&#039;m not sure what you mean , but a recordset will contain all the records that you have selected.<BR>If they are duplicate or not.

  3. #3
    Jason Guest

    Default RE: Record set problems.

    Not exactly sure what you mean. Cant you just do this:<BR>Select * from yourTable<BR><BR>That will extract every record even if duplicates are found. If thats not what you meant, be more specific and we can help.<BR>

  4. #4
    Join Date
    Dec 1969

    Default checkout DISTINCT

    Ensure that your SELECT statement does NOT have DISTINCT ...<BR><BR>SELECT name FROM PEOPLE;<BR> name<BR> tony<BR> fred<BR> tony<BR> john<BR><BR>To remove duplicates......<BR> SELECT DISTINCT names FROM people<BR><BR> name<BR> tony<BR> fred<BR> john<BR><BR><BR>Hope this helps....

  5. #5
    Al Bear Guest

    Default This is what I mean....

    I know that the db dose not have any duplicate records. <BR><BR>But when the SQL is run it should find that the search critra will match for the same record twice. <BR><BR>But when running the record set, it will only show the record once. I need it to be shown as meany times as it apperas as I want to add a count value to this so I can tell what % match it makes with the users request.

  6. #6
    Jason Guest

    Default RE: This is what I mean....

    Still a bit confused. You want to be able to count all records including duplicates, but not actually print the duplicates to screen? If so, the only way I know is to :<BR><BR>Select * from table<BR>&#039;Set your cursor position to count<BR>ors.CursorLocation = 3<BR> your connection<BR>vRecordCount=ors.RecordCount<BR>then ors.Filter by whatever criteria for display<BR><BR>Hope that helps

  7. #7
    Join Date
    Dec 1969

    Default GROUP By & COUNT

    How about...<BR><BR>SELECT, Count( AS CountOfname<BR>FROM people<BR>GROUP BY;<BR><BR>which returns...<BR><BR>name CountOfname<BR>fred 1<BR>john 1<BR>tony 2

  8. #8
    bit more help please... Guest

    Default Yep thats what I want.

    Got it in one a count value for how many time a record has been looked at by the system. How can I then sort the record set by that count value. when I try <BR><BR>objrec.CursorLocation = 3 <BR> SQL, DBcon<BR>varrecord = objrec.recordcount<BR>objrec.sort = varrecord<BR><BR>it bring back an error any ideas...

  9. #9
    Al Bear Guest

    Default almost there

    With this I can have my sql as.<BR><BR>SQL = "SELECT id, Count(id) AS CountOfID, question FROM qanda WHERE<BR><BR>where every I put the other rows that I want accesed it bring back an error. any ideas how to get round this...

  10. #10
    Al Bear Guest

    Default Not Quite Guys.....

    Thanks for the help guys.. but I think everyone has almost got it. what I need to do it have a way of telling how many time a record has been acceessed in the course of running the SLQ statment. where the one record has on match come back with the number one. were the record has got two matches to the SQL stament come back with the number 2 and so on...

Posting Permissions

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