Results 1 to 3 of 3
  1. #1
    Join Date
    May 2002
    Location
    Australia
    Posts
    26

    Talking Unanswered: this is new to me

    Hello!

    This is new to me so please excuse my ignorance.

    I have a field of comma delimited digits and i want to find out if a digit exists in the string.

    eg
    1,5,10,20,38

    how can i query this so it will make a recordset if i search for "1" but wont for feilds containing "10" or "21".

    I hope this makes sense.

    Thanks!

  2. #2
    Join Date
    Jul 2001
    Location
    Germany
    Posts
    189
    Hello,

    which database do you use ? This would be very helpful

    If you only want to find a comma in a string use

    for ORACLE => SELECT INSTR('10,20,30,40', ',')

    if the comma is found it returns the position otherwise it return 0

    Hope that helps ?

    Regards
    Manfred Peter
    (Alligator Company)
    http://www.alligatorsql.com

  3. #3
    Join Date
    May 2002
    Location
    Australia
    Posts
    26
    this is microsoft access. soon i will be developing in MySQL.

    I know VBscript well enough. but i'm testing for the number not the comma. and Instr() would return a value greater than zero for too many results.

    perhaps i just filter them out.

    thanks for your 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
  •