{"id":16015,"date":"2021-03-24T09:20:28","date_gmt":"2021-03-24T08:20:28","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/ora-32635-not-a-single-cell-reference-predicate\/"},"modified":"2021-03-24T09:20:28","modified_gmt":"2021-03-24T08:20:28","slug":"ora-32635-not-a-single-cell-reference-predicate","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/ora-32635-not-a-single-cell-reference-predicate\/","title":{"rendered":"ORA-32635: not a single cell reference predicate"},"content":{"rendered":"<h2>By Franck Pachot<\/h2>\n<p>.<br \/>\nI spent 30 minutes to try to understand this error with a query that I&#8217;ve run in many environments for years. So if you google it you may arrive here and the solution may be checking whether you have NLS_COMP=LINGUISTIC<\/p>\n<pre><code>\nSQL&gt; alter session set nls_comp=linguistic;\n\nSession altered.\n\nSQL&gt; alter session set nls_language=french;\n\nSession modifiee.\n\nSQL&gt; select * from (\n  2  select 42 snap_id,'TM' type,'DB time' name,0 microseconds from dual\n  3  ) model return updated rows\n  4    partition by (snap_id)\n  5    dimension by (type,name)\n  6    measures (microseconds) ( microseconds['','']=microseconds['TM','DB time'])\n  7  \/\n  measures (microseconds) ( microseconds['','']=microseconds['TM','DB time'])\n                                                             *\nERREUR a la ligne 6 :\nORA-32635: ce n'est pas un predicat de reference de cellule unique\n\nSQL&gt; host oerr ora 32635\n\n32635, 00000, \"not a single cell reference predicate\"\n\/\/ *Cause: A predicate that is not a single cell reference predicate was specified\n\/\/         where a single cell reference predicate was expected.\n\/\/         A single cell reference predicate is either a constant expression\n\/\/         or a predicate of the form \n\/\/ *Action: Make sure that the predicate is a proper single cell\n\/\/          reference. In some cases, you might have to put explicit\n\/\/          type conversion operators (or casts) on the constant expression.\n<\/code><\/pre>\n<p>This error message was not very clear to me. Of course the NLS parameters were set at instance level, so not immediately visible.<br \/>\nI had to reduce my long query to one similar to the one above (because initially I suspected duplicate values in the dimensions but I was wrong) and with one line. Given the misleading clue <em>&#8220;you might have to put explicit type conversion operators (or casts) on the constant expression&#8221;<\/em> (I tried to cast to CHAR first) I finally checked at NLS parameters.<\/p>\n<p>So now you have the solution:<\/p>\n<pre><code>\nSQL&gt; alter session set nls_comp=BINARY;\n\nSession modifiee.\n\nSQL&gt;\nSQL&gt; select * from (\n  2  select 42 snap_id,'TM' type,'DB time' name,0 microseconds from dual\n  3  ) model return updated rows\n  4    partition by (snap_id)\n  5    dimension by (type,name)\n  6    measures (microseconds) ( microseconds['','']=microseconds['TM','DB time'])\n  7  \/\n\n   SNAP_ID TY NAME    MICROSECONDS\n---------- -- ------- ------------\n        42                       0\n<\/code><\/pre>\n<p>The linguistic comparison may not give a unique result depending on the character set, and that may be the cause for this message. With BINARY comparison (the default) there&#8217;s no problem.<\/p>\n<p>By the way, I was not surprised to find nothing in Google or MOS. I know that I may be the only one using the MODEL clause \ud83d\ude09 and database with such NLS settings are rare (hopefully).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>By Franck Pachot . I spent 30 minutes to try to understand this error with a query that I&#8217;ve run in many environments for years. So if you google it you may arrive here and the solution may be checking whether you have NLS_COMP=LINGUISTIC SQL&gt; alter session set nls_comp=linguistic; Session altered. SQL&gt; alter session set [&hellip;]<\/p>\n","protected":false},"author":27,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[229],"tags":[],"type_dbi":[],"class_list":["post-16015","post","type-post","status-publish","format-standard","hentry","category-database-administration-monitoring"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.2) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>ORA-32635: not a single cell reference predicate - dbi Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/ora-32635-not-a-single-cell-reference-predicate\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"ORA-32635: not a single cell reference predicate\" \/>\n<meta property=\"og:description\" content=\"By Franck Pachot . I spent 30 minutes to try to understand this error with a query that I&#8217;ve run in many environments for years. So if you google it you may arrive here and the solution may be checking whether you have NLS_COMP=LINGUISTIC SQL&gt; alter session set nls_comp=linguistic; Session altered. SQL&gt; alter session set [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/ora-32635-not-a-single-cell-reference-predicate\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2021-03-24T08:20:28+00:00\" \/>\n<meta name=\"author\" content=\"Oracle Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Oracle Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/ora-32635-not-a-single-cell-reference-predicate\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/ora-32635-not-a-single-cell-reference-predicate\/\"},\"author\":{\"name\":\"Oracle Team\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee\"},\"headline\":\"ORA-32635: not a single cell reference predicate\",\"datePublished\":\"2021-03-24T08:20:28+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/ora-32635-not-a-single-cell-reference-predicate\/\"},\"wordCount\":212,\"commentCount\":0,\"articleSection\":[\"Database Administration &amp; Monitoring\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/ora-32635-not-a-single-cell-reference-predicate\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/ora-32635-not-a-single-cell-reference-predicate\/\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/ora-32635-not-a-single-cell-reference-predicate\/\",\"name\":\"ORA-32635: not a single cell reference predicate - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\"},\"datePublished\":\"2021-03-24T08:20:28+00:00\",\"author\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/ora-32635-not-a-single-cell-reference-predicate\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/ora-32635-not-a-single-cell-reference-predicate\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/ora-32635-not-a-single-cell-reference-predicate\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\/\/www.dbi-services.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"ORA-32635: not a single cell reference predicate\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/\",\"name\":\"dbi Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee\",\"name\":\"Oracle Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g\",\"caption\":\"Oracle Team\"},\"url\":\"https:\/\/www.dbi-services.com\/blog\/author\/oracle-team\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"ORA-32635: not a single cell reference predicate - dbi Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dbi-services.com\/blog\/ora-32635-not-a-single-cell-reference-predicate\/","og_locale":"en_US","og_type":"article","og_title":"ORA-32635: not a single cell reference predicate","og_description":"By Franck Pachot . I spent 30 minutes to try to understand this error with a query that I&#8217;ve run in many environments for years. So if you google it you may arrive here and the solution may be checking whether you have NLS_COMP=LINGUISTIC SQL&gt; alter session set nls_comp=linguistic; Session altered. SQL&gt; alter session set [&hellip;]","og_url":"https:\/\/www.dbi-services.com\/blog\/ora-32635-not-a-single-cell-reference-predicate\/","og_site_name":"dbi Blog","article_published_time":"2021-03-24T08:20:28+00:00","author":"Oracle Team","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Oracle Team","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/ora-32635-not-a-single-cell-reference-predicate\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/ora-32635-not-a-single-cell-reference-predicate\/"},"author":{"name":"Oracle Team","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee"},"headline":"ORA-32635: not a single cell reference predicate","datePublished":"2021-03-24T08:20:28+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/ora-32635-not-a-single-cell-reference-predicate\/"},"wordCount":212,"commentCount":0,"articleSection":["Database Administration &amp; Monitoring"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/ora-32635-not-a-single-cell-reference-predicate\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/ora-32635-not-a-single-cell-reference-predicate\/","url":"https:\/\/www.dbi-services.com\/blog\/ora-32635-not-a-single-cell-reference-predicate\/","name":"ORA-32635: not a single cell reference predicate - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"datePublished":"2021-03-24T08:20:28+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee"},"breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/ora-32635-not-a-single-cell-reference-predicate\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/ora-32635-not-a-single-cell-reference-predicate\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/ora-32635-not-a-single-cell-reference-predicate\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"ORA-32635: not a single cell reference predicate"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee","name":"Oracle Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g","caption":"Oracle Team"},"url":"https:\/\/www.dbi-services.com\/blog\/author\/oracle-team\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/16015","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/27"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=16015"}],"version-history":[{"count":0,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/16015\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=16015"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=16015"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=16015"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=16015"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}