Odd query behavior
| От | Dan McFadyen |
|---|---|
| Тема | Odd query behavior |
| Дата | |
| Msg-id | BA48DC793F18724D862C27C8F2C131CC62060B@exchange03.cryptocard.internal обсуждение исходный текст |
| Список | pgsql-sql |
Hello,
I've come across an odd situation. I've had access to a database where a the following happens:
" SELECT * FROM table WHERE name LIKE 'abc%' " returns 2 rows...
but...
" SELECT * FROM table WHERE name IN (SELECT name FROM table WHERE name LIKE 'abc%') " returns 0 rows...
I've also tried doing a join on the column to another table that has what appears to be the same data, and the join comes out with zero rows. Weirder yet, I took the hash of both of the values and it came out identical.
Now, I know the first thing you'll ask is if you can get a copy of the data to re-produce it, and the problem is, I got a copy of the data in question, and loaded into another server and it works fine. Both queries return 2 rows.
I do know that server it was running on was not an english server, but don't know the exact language. The database uses a UTF8 encoding though, so I don't know what that would make any difference.
Any ideas about things I should be looking at?
Thanks
Dan
В списке pgsql-sql по дате отправления: