<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>OpenText Analytics Database 26.2.x – Literals</title>
    <link>/en/sql-reference/language-elements/literals/</link>
    <description>Recent content in Literals on OpenText Analytics Database 26.2.x</description>
    <generator>Hugo -- gohugo.io</generator>
    
	  <atom:link href="/en/sql-reference/language-elements/literals/index.xml" rel="self" type="application/rss+xml" />
    
    
      
        
      
    
    
    <item>
      <title>Sql-Reference: Number-type literals</title>
      <link>/en/sql-reference/language-elements/literals/number-type-literals/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/language-elements/literals/number-type-literals/</guid>
      <description>
        
        
        &lt;p&gt;OpenText™ Analytics Database supports three types of numbers: integers, numerics, and floats.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;../../../../en/sql-reference/data-types/numeric-data-types/integer/&#34;&gt;Integers&lt;/a&gt; are whole numbers less than 2^63 and must be digits.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;../../../../en/sql-reference/data-types/numeric-data-types/numeric/&#34;&gt;Numerics&lt;/a&gt; are whole numbers larger than 2^63 or that include a decimal point with a precision and a scale. Numerics can contain exponents. Numbers that begin with 0x are hexadecimal numerics.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Numeric-type values can also be generated using casts from character strings. This is a more general syntax. See the Examples section below, as well as &lt;a href=&#34;../../../../en/sql-reference/language-elements/operators/data-type-coercion-operators-cast/#&#34;&gt;Data type coercion operators (CAST)&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;digits&lt;/span&gt;
&lt;span class=&#34;code-variable&#34;&gt;digits&lt;/span&gt;.[&lt;span class=&#34;code-variable&#34;&gt;digits&lt;/span&gt;] | [&lt;span class=&#34;code-variable&#34;&gt;digits&lt;/span&gt;].&lt;span class=&#34;code-variable&#34;&gt;digits&lt;/span&gt;
&lt;span class=&#34;code-variable&#34;&gt;digits&lt;/span&gt; e[+-]&lt;span class=&#34;code-variable&#34;&gt;digits&lt;/span&gt; | [&lt;span class=&#34;code-variable&#34;&gt;digits&lt;/span&gt;].&lt;span class=&#34;code-variable&#34;&gt;digits&lt;/span&gt; e[+-]&lt;span class=&#34;code-variable&#34;&gt;digits&lt;/span&gt; | &lt;span class=&#34;code-variable&#34;&gt;digits&lt;/span&gt;.[&lt;span class=&#34;code-variable&#34;&gt;digits&lt;/span&gt;] e[+-]&lt;span class=&#34;code-variable&#34;&gt;digits&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;parameters&#34;&gt;Parameters&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;digits&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;One or more numeric characters, 0 through 9&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;e&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Exponent marker&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;notes&#34;&gt;Notes&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;At least one digit must follow the exponent marker (&lt;code&gt;e&lt;/code&gt;), if &lt;code&gt;e&lt;/code&gt; is present.
&lt;/li&gt;
&lt;li&gt;There cannot be any spaces or other characters embedded in the constant.
&lt;/li&gt;
&lt;li&gt;Leading plus (+) or minus (–) signs are not considered part of the constant; they are unary operators applied to the constant.&lt;/li&gt;
&lt;li&gt;In most cases a numeric-type constant is automatically coerced to the most appropriate type depending on context. When necessary, you can force a numeric value to be interpreted as a specific data type by casting it as described in &lt;a href=&#34;../../../../en/sql-reference/language-elements/operators/data-type-coercion-operators-cast/#&#34;&gt;Data type coercion operators (CAST)&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Floating point literals are not supported. If you specifically need to specify a float, you can cast as described in &lt;a href=&#34;../../../../en/sql-reference/language-elements/operators/data-type-coercion-operators-cast/#&#34;&gt;Data type coercion operators (CAST)&lt;/a&gt;.
&lt;/li&gt;
&lt;li&gt;The database follows the IEEE specification for floating point, including NaN (not a number) and Infinity (Inf).&lt;/li&gt;
&lt;li&gt;A NaN is not greater than and at the same time not less than anything, even itself. In other words, comparisons always return false whenever a NaN is involved.&lt;/li&gt;
&lt;li&gt;Dividing INTEGERS (x / y) yields a NUMERIC result. You can use the // operator to truncate the result to a whole number.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following are examples of number-type literals:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;42
3.5
4.
.001
5e2
1.925e-3
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Scientific notation&lt;code&gt;:&lt;/code&gt;&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT NUMERIC &amp;#39;1e10&amp;#39;;
 ?column?
-------------
 10000000000
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;code&gt;BINARY&lt;/code&gt; scaling&lt;code&gt;:&lt;/code&gt;&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT NUMERIC &amp;#39;1p10&amp;#39;;
 ?column?
----------
     1024
(1 row)
=&amp;gt; SELECT FLOAT &amp;#39;Infinity&amp;#39;;
  ?column?
----------
 Infinity
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The following examples illustrated using the / and // operators to divide integers:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT 40/25;
 ?column?
----------------------
 1.600000000000000000
(1 row)
=&amp;gt; SELECT 40//25;
 ?column?
----------
        1
(1 row)
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;see-also&#34;&gt;See also&lt;/h2&gt;
&lt;a href=&#34;../../../../en/sql-reference/data-types/data-type-coercion/#&#34;&gt;Data type coercion&lt;/a&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: String literals</title>
      <link>/en/sql-reference/language-elements/literals/string-literals/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/language-elements/literals/string-literals/</guid>
      <description>
        
        
        &lt;p&gt;String literals are string values surrounded by single or double quotes. Double-quoted strings are subject to the backslash, but single-quoted strings do not require a backslash, except for &lt;code&gt;\&#39;&lt;/code&gt; and &lt;code&gt;\\&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;You can embed single quotes and backslashes into single-quoted strings. To include other backslash (escape) sequences, such as &lt;code&gt;\t&lt;/code&gt; (tab), you must use the double-quoted form.&lt;/p&gt;
&lt;p&gt;Precede single-quoted strings with a space between the string and its preceding word, since single quotes are allowed in identifiers.&lt;/p&gt;
&lt;h2 id=&#34;see-also&#34;&gt;See also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../en/sql-reference/statements/set-statements/set-standard-conforming-strings/#&#34;&gt;SET STANDARD_CONFORMING_STRINGS&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../en/sql-reference/statements/set-statements/set-escape-string-warning/#&#34;&gt;SET ESCAPE_STRING_WARNING&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../en/sql-reference/config-parameters/internationalization-parameters/#&#34;&gt;Internationalization parameters&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../en/admin/configuring-db/config-procedure/implement-locales-international-data-sets/#&#34;&gt;Implement locales for international data sets&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: Date/time literals</title>
      <link>/en/sql-reference/language-elements/literals/datetime-literals/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/language-elements/literals/datetime-literals/</guid>
      <description>
        
        
        &lt;p&gt;Date or time literal input must be enclosed in single quotes. Input is accepted in almost any reasonable format, including ISO 8601, SQL-compatible, and traditional POSTGRES.&lt;/p&gt;
&lt;p&gt;OpenText™ Analytics Database handles date/time input more flexibly than the SQL standard requires. The exact parsing rules of date/time input and for the recognized text fields including months, days of the week, and time zones are described in &lt;a href=&#34;../../../../en/sql-reference/language-elements/expressions/datetime-expressions/#&#34;&gt;Date/time expressions&lt;/a&gt;.&lt;/p&gt;

      </description>
    </item>
    
  </channel>
</rss>
