PATINDEX in Compact Edition

Discussion in 'microsoft.public.sqlserver.ce' started by Dave Clarke, Aug 25, 2009.

  1. Dave Clarke

    Dave Clarke Guest

    I've been trying to use PATINDEX in SQL Server CE and it isn't
    behaving the way I would like it to. I'm trying to strip leading
    characters from a street address to return a meaningful street name.

    e.g. DISTINCT PATINDEX('%[^0-9, ]%', Address1)

    For addresses like '123 Some Street' this works in SQL Server but not
    in CE. I'm currently doing this processing using C# to get a list of
    distinct streets and I was hoping to gain some speedup by getting the
    database to do the heavy lifting. Any suggestions re alternative
    approaches would be much appreciated.
    Dave Clarke, Aug 25, 2009
    1. Advertisements

  2. Dave Clarke

    ErikEJ Guest

    Sadly, SQL Compact T-SQL does not support regular expressions. Maybe you
    should redesign the way data is stored?
    ErikEJ, Aug 31, 2009
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.