{"id":1056,"date":"2010-05-13T14:34:32","date_gmt":"2010-05-13T13:34:32","guid":{"rendered":"http:\/\/soci.hu\/blog\/?p=1056"},"modified":"2010-05-13T14:34:32","modified_gmt":"2010-05-13T13:34:32","slug":"szotoredek-kereses-sql-serveren-furcsanak-hato-hiba","status":"publish","type":"post","link":"https:\/\/soci.hu\/blog\/index.php\/2010\/05\/13\/szotoredek-kereses-sql-serveren-furcsanak-hato-hiba\/","title":{"rendered":"Sz\u00f3t\u00f6red\u00e9k keres\u00e9s SQL Serveren &#8211; furcs\u00e1nak hat\u00f3 hiba"},"content":{"rendered":"<p>Az al\u00e1bbi k\u00e9rdezt\u00e9k t\u0151lem p\u00e1r perce:<\/p>\n<pre class=\"brush: sql; title: ; notranslate\" title=\"\">\r\nSELECT &#x5B;text]  FROM &#x5B;table1] WHERE &#x5B;text] like &#039;%rekes%&#039;\r\n<\/pre>\n<p>A rekesz sz\u00f3t nem tal\u00e1lja meg, ha magyar a collation az oszlopon. Ez term\u00e9szetes, a kett\u0151s bet\u0171ket ezzel a logik\u00e1val kezeli a szerver, azaz egy bet\u0171nek tekinti \u0151ket. A where-be kell egy collation cast, mondjuk latin1-re, amiben nincsenek kett\u0151s bet\u0171k. Mondjuk ezut\u00e1n nem fog indexet haszn\u00e1lni a szerver, de a kezd\u0151 % miatt eleve nem haszn\u00e1lva.<br \/>\nAz al\u00e1bbi p\u00e9ld\u00e1ban az egyikkel collationnel megtal\u00e1lja, m\u00e1sikkal nem.<\/p>\n<pre class=\"brush: sql; title: ; notranslate\" title=\"\">\r\nSELECT &#x5B;text]  FROM &#x5B;table1] WHERE &#x5B;text] like &#039;%rekes%&#039;\r\n--  collate Hungarian_CI_AS\r\ncollate Latin1_General_CI_AS\r\n<\/pre>\n<p>Lehet csin\u00e1lni indexelt, sz\u00e1m\u00edtott oszlopot is m\u00e1s collationnel, \u00e9s arra sz\u0171rni, az gyorsabb lesz.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Az al\u00e1bbi k\u00e9rdezt\u00e9k t\u0151lem p\u00e1r perce: SELECT &#x5B;text] FROM &#x5B;table1] WHERE &#x5B;text] like &#039;%rekes%&#039; A rekesz sz\u00f3t nem tal\u00e1lja meg, ha magyar&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,4,30,21,58,77],"tags":[],"class_list":["post-1056","post","type-post","status-publish","format-standard","hentry","category-adatbazisok","category-szakmai-elet","category-sql-server","category-sql-server-2005","category-sql-server-2008","category-sql-server-2008-r2"],"_links":{"self":[{"href":"https:\/\/soci.hu\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1056","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/soci.hu\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/soci.hu\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/soci.hu\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/soci.hu\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=1056"}],"version-history":[{"count":1,"href":"https:\/\/soci.hu\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1056\/revisions"}],"predecessor-version":[{"id":1057,"href":"https:\/\/soci.hu\/blog\/index.php\/wp-json\/wp\/v2\/posts\/1056\/revisions\/1057"}],"wp:attachment":[{"href":"https:\/\/soci.hu\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=1056"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/soci.hu\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=1056"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/soci.hu\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=1056"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}