Jump to content

Recommended Posts

Posted

Help me with it, can't think of anything else other than cricket tomorrow :hic: i have something like this, 01/2006, 01/05, 1/05, 1/2005 need to have one query that'll select all of them and extract only those values, tried with [0-9][0-9] but it selected only ones with 01/****, not 1/****, also how do you extract them when index will be different for each type. any help is appreciated :hic: :wtg:

Posted

Re: SQL help what about [0-9]+ (instead of [0-9][0-9]) which stands for "one or more digits"? btw this is regexp, so it depends on whether your db support regexp.

Posted

Re: SQL help that's what i'm trying to figure out too, tried with [0-9]+, compiles but doesn't work, tried few other regexp too, but not working :wall:

Posted

Re: SQL help you could also do (coldate = '[0-9]xxx' or coldate = '[0-9][0-9]xxx') yyy where xxx is rest of your matching for the coldate and yyy is the rest of your where clause.

Posted

Re: SQL help yep, that's what i did, but i can't extract the values in one shot then, unless there is some other way, the index for 01/2006 is different to 01/06 for substring method

Posted

Re: SQL help Thanks BB, I'll look into this and I'll send an email or pm to you. Took friday off, so hopefully others will fix it by monday :hic:

×
×
  • Create New...