Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7903561
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T09:46:33+00:00 2026-06-03T09:46:33+00:00

I have an sql server script which inserts known fixed guid values into a

  • 0

I have an sql server script which inserts known fixed guid values into a table. It looks like:

INSERT INTO MyTable (ID)
VALUES ('BBD098BF-58F0-4A84-90C2-F806D6D06061')

Note that guid is in human-readable form.
Since ID is uniqueidentifier sql server understands how to convert a string to guid data type.

I need to make the same script for Oracle, ID is of RAW(16) type. Taking the script directly doesn’t work because Oracle interprets a string just like a binary, it should be some “other” string, a string representation of a correct binary chunk.

Does anyone knows a way to convert human-readable sql server string to a string required by Oracle?

So far I can only think about saving a guid to Oracle in .net code, for example, and than making a select in oracle script to get a string. But this is crazy.

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T09:46:34+00:00Added an answer on June 3, 2026 at 9:46 am

    According to this link
    Sqlserver reverses the 3 first sections so you need to do:

    hextoraw(substr(guid,7,2)||
             substr(guid,5,2)||
             substr(guid,3,2)||
             substr(guid,1,2)||
             substr(guid,12,2)||
             substr(guid,10,2)||
             substr(guid,17,2)||
             substr(guid,15,2)||
             substr(guid,20,4)||
             substr(guid,25,12)
    )
    

    (guid is like ‘BBD098BF-58F0-4A84-90C2-F806D6D06061’)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have SQL Server 2008 with a table called ProductCategories designed like this: Id
I am using Sql server 2005. I have to give SQL insert script to
Using SQL Server 2008 R2, I have a Users table, in which I would
I have a SQL script that inserts data (via INSERT statements currently numbering in
I have a PHP script which runs a MySQL query. $query = INSERT INTO
I have a script that connects to SQL Server 2005 default instance. But I'm
I have table a and table b . (SQL Server 2008) Both tables have
On a webserver, I have a php script that parses a .sql file (which
I have the below SQL Script which is run from Excel VBA using ADO
First a little introduction. We have an SQL Server Express 2008 database, which schema

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.