HPlogo ALLBASE/SQL Reference Manual: HP 9000 Computer Systems > Chapter 8 Expressions

Long Column Functions

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

Long column functions return information from the long column descriptor.

Scope

SQL Data Manipulation Statements

SQL Syntax

  { OUTPUT_DEVICE(LongColumnName)
    OUTPUT_NAME(LongColumnName)    }

Parameters

OUTPUT_DEVICE

returns an integer value indicating the output device type stored in the long column descriptor for LongColumnName. The values returned are shown in the table below:

Value ReturnedOutput Device Type
0none specified
1system file
2shared memory

OUTPUT_NAME

returns the output device name stored in the long column descriptor for LongColumnName. The string returned is a 44 byte value.

LongColumnName

is the name of the column that has a long data type (LONG BINARY or LONG VARBINARY).

Description

  • The long column functions can appear in the select list or search condition of an SQL data manipulation statement.

  • The long column functions are useful when you need information about the long column descriptors, but do not want to fetch the data.

  • For more information on long column data types, see the "Data Types" chapter.

  • Referencing a LONG column in a LONG column function does not cause the LONG data to be written out to the output device.

Examples

  1. OUTPUT_DEVICE example

    Change the PartPicture output device name to NewHammer in any row whose output device type for PartPicture is a system file.

       UPDATE PartsIllus
          SET PartPicture = '> NewHammer'
        WHERE OUTPUT_DEVICE(PartPicture) = 1
  2. OUTPUT_NAME example

    Select the output device name of the PartPicture column for any row with a PartNumber of 100.

       SELECT OUTPUT_NAME(PartPicture)
         FROM PartsIllus
        WHERE PartNumber = 100

    Change all occurrences of the output device name of the PartPicture column to NewHammer if the current output device name is Hammer.

       UPDATE PartsIllus
          SET PartPicture = '> NewHammer'
        WHERE OUTPUT_NAME(PartPicture) = 'Hammer'
Feedback to webmaster