SQLite Forum

how to collate in a union and noaccent
Login
As is the life of an ETL programmer I'm constantly matching things that do not really match and while I can de-dupe the number of "collate" expressions  when creating the schema it's not always known in advance. and so on...

I started with this example:

```
select * from (
select 'a'
union
select 'A'
)x
```

then I added the COLLATE

```
select * from (
select 'a'
union
select 'A'
collate nocase
)x
```

It's interesting to note that the results depend on the order of the 'A' and 'a'... I'm not sure it's meaningful or not.

I'm not a language expert but in the example I think the "collate nocase" is being assigned to the column so if I added a FROM the COLLATE would need to be attributed to the column and not the from... (no examples in the doc that I could see)

```
select * from (
select 'a' from test
union
select 'A' collate nocase from test
)x
```

And so here are my questions...

- can there be multiple collate attributes(can they be stacked)?
- I read someplace that NOACCENT was left to the programmer? The reason given was that it was too big to implement. SHRUG. Given the use-cases for SQLite one might think it should be baked in.(see below)

example from SQL Server(??)

```
SELECT * FROM Venue WHERE Name COLLATE Latin1_general_CI_AI Like '%cafe%' COLLATE Latin1_general_CI_AI
```

THANKS!