Agreeing with everyone who has already posted, this might not be the best
place to be doing this... But one more option to play with:

WHERE
<!--- Get paths with at least one slash. --->
        [field] LIKE '_%\_%' 

<!--- Exclude files with 2 char extension. --->
AND
        [field] NOT LIKE '%.__' 

<!--- Exclude files with 3 char extension. --->
AND
        [field] NOT LIKE '%.___' 

<!--- Exclude files with 4 char extension. --->
AND
        [field] NOT LIKE '%.____' 

.......................
Ben Nadel 
Web Developer
Nylon Technology
350 7th Avenue
Floor 10
New York, NY 10001
212.691.1134 x 14
212.691.3477 fax
www.nylontechnology.com
 
"Some people call me the space cowboy. Some people call me the gangster of
love."

-----Original Message-----
From: Brian Dumbledore [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 02, 2006 4:31 PM
To: CF-Talk
Subject: sql question.

I am using MS-SQL, I couldn't get this to work..

I tried, patindex,charindex, like combinations, none worked.

I have directory paths in a table, given a starting path of a directory, I
want to get its first level elements.

eg:

table has
warranty\a\1.jpg
warranty\a
warranty\a\2.jpg
warranty\a22
warranty\a-23

I want to get warranty\a,warranty\a22,warranty\a-23

I tried all combinations, it doesn't work (correctly). I actually get only
warranty\a, but don't get the other two (which makes me thing it is because
of the numbers in the string.. but doesn't make any sense). Please help

Thanks for your time.



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:248687
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to