
Ingres 10S OpenSQL Reference Guide ING-10-OSR-04 This Documentation is for the end user's informational purposes only and may be subject to change or withdrawal by Actian Corporation ("Actian") at any time. This Documentation is the proprietary information of Actian and is protected by the copyright laws of the United States and international treaties. It is not distributed under a GPL license. You may make printed or electronic copies of this Documentation provided that such copies are for your own internal use and all Actian copyright notices and legends are affixed to each reproduced copy. You may publish or distribute this document, in whole or in part, so long as the document remains unchanged and is disseminated with the applicable Actian software. Any such publication or distribution must be in the same manner and medium as that used by Actian, e.g., electronic download via website with the software or on a CD- ROM. Any other use, such as any dissemination of printed copies or use of this documentation, in whole or in part, in another publication, requires the prior written consent from an authorized representative of Actian. To the extent permitted by applicable law, ACTIAN PROVIDES THIS DOCUMENTATION "AS IS" WITHOUT WARRANTY OF ANY KIND, INCLUDING WITHOUT LIMITATION, ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT. IN NO EVENT WILL ACTIAN BE LIABLE TO THE END USER OR ANY THIRD PARTY FOR ANY LOSS OR DAMAGE, DIRECT OR INDIRECT, FROM THE USER OF THIS DOCUMENTATION, INCLUDING WITHOUT LIMITATION, LOST PROFITS, BUSINESS INTERRUPTION, GOODWILL, OR LOST DATA, EVEN IF ACTIAN IS EXPRESSLY ADVISED OF SUCH LOSS OR DAMAGE. The manufacturer of this Documentation is Actian Corporation. For government users, the Documentation is delivered with "Restricted Rights" as set forth in 48 C.F.R. Section 12.212, 48 C.F.R. Sections 52.227-19(c)(1) and (2) or DFARS Section 252.227-7013 or applicable successor provisions. Copyright © 2012 Actian Corporation. All Rights Reserved. Actian, Cloud Action Platform, Cloud Action Server, Action Server, Ingres, Vectorwise, OpenROAD, Enterprise Access, and EDBC are trademarks or registered trademarks of Actian Corporation. All other trademarks, trade names, service marks, and logos referenced herein belong to their respective companies. Contents Chapter 1: Introduction 15 In This Guide ...................................................................................................................... 15 Audience ........................................................................................................................... 15 Syntax Conventions Used in This Guide .................................................................................. 16 Conventions for Embedded OpenSQL Examples ....................................................................... 16 Terminology Used in This Guide ............................................................................................ 17 Chapter 2: Overview of OpenSQL 19 What Is OpenSQL? .............................................................................................................. 19 Enterprise Access Products .............................................................................................. 20 Ingres Star ................................................................................................................... 20 Interactive OpenSQL ...................................................................................................... 20 Embedded OpenSQL ...................................................................................................... 20 Dynamic OpenSQL—Specifying Parameters at Runtime ....................................................... 21 Differences Between Embedded and Interactive OpenSQL ................................................... 22 OpenSQL Features .............................................................................................................. 23 Rules for Naming Objects ................................................................................................ 24 Regular and Delimited Identifiers ..................................................................................... 25 Restrictions on Identifiers ............................................................................................... 25 Comment Delimiters ...................................................................................................... 28 Statement Terminators ................................................................................................... 28 Correlation Names ......................................................................................................... 29 Chapter 3: OpenSQL Data Types 31 OpenSQL Data Types ........................................................................................................... 31 Character Data Types .......................................................................................................... 32 Character Data Type ...................................................................................................... 33 Varchar Data Type ......................................................................................................... 34 Long Varchar Data Type ................................................................................................. 34 Unicode Data Types ............................................................................................................. 36 Nchar Data Type ........................................................................................................... 36 Nvarchar Data Type ....................................................................................................... 37 Long Nvarchar Data Type ............................................................................................... 38 Numeric Data Types ............................................................................................................ 39 Integer Data Type ......................................................................................................... 39 Decimal Data Type ........................................................................................................ 39 Floating-point Data Type ................................................................................................ 40 Contents iii Abstract Data Types ............................................................................................................ 41 Date Data Type ............................................................................................................. 41 Money Data Type........................................................................................................... 46 Binary Data Types ............................................................................................................... 47 Long Byte Data Type ...................................................................................................... 47 Storage Formats of Data Types ............................................................................................. 47 Literals .............................................................................................................................. 48 String Literals ............................................................................................................... 48 Numeric Literals ............................................................................................................ 49 Floating-point Literals ..................................................................................................... 51 OpenSQL Constants ............................................................................................................. 51 Nulls ................................................................................................................................. 52 Nulls and Comparisons ................................................................................................... 52 Nulls and Aggregate Functions ......................................................................................... 53 Chapter 4: Elements of OpenSQL Statements 55 Operators .......................................................................................................................... 55 Arithmetic Operators ...................................................................................................... 55 Comparison Operators .................................................................................................... 56 Logical Operators .......................................................................................................... 57 Operations ......................................................................................................................... 57 Assignment Operations ................................................................................................... 58 Arithmetic Operations .................................................................................................... 60 Functions ........................................................................................................................... 63 Function Support for Enterprise Access Products ................................................................ 63 Scalar Functions ...........................................................................................................
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages454 Page
-
File Size-