1

I try to do a migration from MYSQL to SQL Server 2008 but i have a small problem.

I have this query:

SELECT SUM(duree) AS 'TotDuree'
FROM `mp3s`
WHERE `dirname` REGEXP CONVERT(_utf8 '$container_dir' USING latin1)

When i try to change it, i always have a problem with REGEXP. I made some search about it and someone said that we can't use REGEXP in SQL Server 2008.

I tried to find another way to do it but i didn't success.

Thanks for your help.

mellamokb
  • 56,094
  • 12
  • 110
  • 136
Champi Ardon
  • 79
  • 1
  • 2
  • 10

1 Answers1

0

You might take a look at PATINDEX. See also these related questions.

Community
  • 1
  • 1
mellamokb
  • 56,094
  • 12
  • 110
  • 136