Results 1 to 2 of 2

Thread: Select Statements

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    May 2000
    Posts
    148

    Cool

    Howdy!

    Is it possible to put RIGHT$ Functions inside Select statements. If so, how?

    I tried this and received no errors, but I also received no records.

    Set adoSearchRS = New Recordset

    strClass = "00"
    SQL = "Select Distinct ClassNum from Table1 where
    right(ClassNum = '" & strClass & "'" & ",2)"

    adoSearchRS.Open SQL, db, adOpenStatic, adLockOptimistic

    I want to pull all fields that end in 00


    Thanx

  2. #2
    Fanatic Member
    Join Date
    Oct 2000
    Location
    London
    Posts
    1,008
    You can use Right$ but if you just want ending in '00', you would use "SELECT ... WHERE Classnum LIKE '*00';"

    I suggest you look at your SQL variable in a MsgBox - you seem to have mangled it somewhat.

    Cheers,

    Paul.
    Not nearly so tired now...

    Haven't been around much so be gentle...

Posting Permissions

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



Click Here to Expand Forum to Full Width