Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
On this page

DBE_RAW

Updated on 2024-10-14 GMT+08:00

Interface Description

Table 1 provides all interfaces supported by the DBE_RAW package.

Table 1 DBE_RAW

Interface

Description

DBE_RAW.CAST_FROM_BINARY_INTEGER_TO_RAW

Converts a value of the INTEGER type to a binary representation (RAW type).

DBE_RAW.CAST_FROM_RAW_TO_BINARY_INTEGER

Converts a binary representation (RAW type) to a value of the INTEGER type.

DBE_RAW.GET_LENGTH

Obtains the length of a RAW object.

DBE_RAW.CAST_FROM_VARCHA...

Converts a value of the VARCHAR2 type to a binary representation (RAW type).

DBE_RAW.CAST_TO_VARCHAR2

Converts a value of the RAW type to a value of the VARCHAR2 type.

DBE_RAW.SUBSTR

Returns the substring of the RAW type.

DBE_RAW.BIT_OR

Performs the bitwise OR operation on raw data.

NOTICE:

RAW data is represented as hexadecimal characters externally, and stored as binary characters internally. For example, one byte of RAW data with bits 11001011 is displayed and entered as 'CB'.

  • DBE_RAW.CAST_FROM_BINARY_INTEGER_TO_RAW

    The stored procedure CAST_FROM_BINARY_INTEGER_TO_RAW converts a value of the INTEGER type to a binary representation (RAW type).

    The function prototype of DBE_RAW.CAST_FROM_BINARY_INTEGER_TO_RAW is as follows:

    1
    2
    3
    4
    DBE_RAW.CAST_FROM_BINARY_INTEGER_TO_RAW (
    value          IN  INTEGER,
    endianess      IN  INTEGER DEFAULT 1)
    RETURN RAW;
    
    Table 2 DBE_RAW.CAST_FROM_BINARY_INTEGER_TO_RAW interface parameters

    Parameter

    Description

    value

    Specifies the INTEGER value to be converted to the RAW value.

    endianess

    Specifies the INTEGER value 1 or 2 for the byte sequence. (1 indicates BIG_ENDIAN and 2 indicates LITTLE-ENDIAN.)

  • DBE_RAW.CAST_FROM_RAW_TO_BINARY_INTEGER

    The stored procedure CAST_FROM_RAW_TO_BINARY_INTEGER converts a binary representation (RAW type) to a value of the INTEGER type.

    The function prototype of DBE_RAW.CAST_FROM_RAW_TO_BINARY_INTEGER is as follows:

    1
    2
    3
    4
    DBE_RAW.CAST_FROM_RAW_TO_BINARY_INTEGER (
    value          IN  RAW,
    endianess      IN  INTEGER DEFAULT 1)
    RETURN BINARY_INTEGER;
    
    Table 3 DBE_RAW.CAST_FROM_RAW_TO_BINARY_INTEGER interface parameters

    Parameter

    Description

    value

    Specifies an INTEGER value in a binary representation (RAW type).

    endianess

    Specifies the INTEGER value 1 or 2 for the byte sequence. (1 indicates BIG_ENDIAN and 2 indicates LITTLE-ENDIAN.)

  • DBE_RAW.GET_LENGTH

    The stored procedure GET_LENGTH returns the length of a RAW object.

    The function prototype of DBE_RAW.GET_LENGTH is as follows:

    1
    2
    3
    DBE_RAW.GET_LENGTH(
    value     IN    RAW)
    RETURN INTEGER;
    
    Table 4 DBE_RAW.GET_LENGTH interface parameters

    Parameter

    Description

    value

    Specifies a RAW object.

  • DBE_RAW.CAST_FROM_VARCHAR2_TO_RAW

    The stored procedure CAST_FROM_VARCHAR2_TO_RAW converts a VARCHAR2 object to a RAW object.

    The function prototype of DBE_RAW.CAST_FROM_VARCHAR2_TO_RAW is as follows:

    1
    2
    3
    DBE_RAW.CAST_TO_RAW(
    str     IN    VARCHAR2)
    RETURN RAW;
    
    Table 5 DBE_RAW.CAST_FROM_VARCHAR2_TO_RAW interface parameters

    Parameter

    Description

    c

    Specifies a VARCHAR2 object to be converted.

  • DBE_RAW.CAST_TO_VARCHAR2

    The stored procedure CAST_TO_VARCHAR2 converts a RAW object to a VARCHAR2 object.

    The DBE_RAW.CAST_TO_VARCHAR2 function prototype is as follows:

    1
    2
    3
    DBE_RAW.CAST_TO_VARCHAR2(
    str     IN    RAW)
    RETURN VARCHAR2;
    
    Table 6 DBE_RAW.CAST_TO_VARCHAR2 interface parameters

    Parameter

    Description

    str

    Specifies a RAW object to be converted.

  • DBE_RAW.BIT_OR

    The stored procedure BIT_OR calculates the bitwise OR result of two raw data records.

    The DBE_RAW.BIT_OR function prototype is as follows:

    1
    2
    3
    4
    DBE_RAW.BIT_OR(
    str1     IN    RAW,
    str2     IN    RAW)
    RETURN RAW;
    
    Table 7 DBE_RAW.BIT_OR interface parameters

    Parameter

    Description

    str1

    First character string of the bitwise OR operation

    str2

    Second character string of the bitwise OR operation

  • DBE_RAW.SUBSTR

    The stored procedure SUBSTR truncates an object of the RAW type based on the start bit and length.

    The DBE_RAW.SUBSTR function prototype is as follows:

    1
    2
    3
    4
    5
    DBE_RAW.SUBSTR(
        IN lob_loc raw,
        IN off_set integer default 1,
        IN amount integer default 32767)
    RETURN RAW;
    
    Table 8 DBE_RAW.SUBSTR interface parameters

    Parameter

    Description

    lob_loc

    Source raw character string

    off_set

    Start position of a substring. The default value is 1.

    amount

    Length of a substring. The default value is 32767.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
--Perform operations on RAW data in a stored procedure.
CREATE OR REPLACE PROCEDURE proc_raw
AS
str varchar2(100) := 'abcdef';
source raw(100);
amount integer;
BEGIN
source := dbe_raw.cast_from_varchar2_to_raw(str);--Convert the type.
 amount := dbe_raw.get_length(source);--Obtain the length.
dbe_output.print_line(amount);
END;
/

-- Call the stored procedure.
CALL proc_raw();

-- Delete the stored procedure.
DROP PROCEDURE proc_raw;

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback