Converting from VARCHAR to RAW

Hi,
is there a function or a way to convert let's say a string '123' into hexadecimal data type?
the hex equivalent for this would be '313233'.
Thanks.

UTL_RAW
The UTL_RAW package provides SQL functions for manipulating RAW datatypes. This package is necessary because normal SQL functions do not operate on RAWs, and PL/SQL does not allow overloading between a RAW and a CHAR datatype. UTL_RAW also includes subprograms that convert various COBOL number formats to, and from, RAWs.
UTL_RAW is not specific to the database environment, and it may actually be used in other environments as it exists here. For this reason, the prefix UTL has been given to the package, instead of DBMS.
This chapter discusses the following topics:
Usage Notes
Summary of UTL_RAW Subprograms
Usage Notes
UTL_RAW allows a RAW "record" to be composed of many elements. By using the RAW datatype, character set conversion will not be performed, keeping the RAW in its original format when being transferred through remote procedure calls.
With the RAW functions, you can manipulate binary data that was previously limited to the hextoraw and rawtohex functions.
http://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96612/u_raw.htm#998101
Joel Pérez

Similar Messages

  • How to convert  from  varchar to blob ?

    How to convert from varchar to blob ?
    thanks

    Here is a small PL/SQL block that we have used to convert varchar2 to blob.
    declare
    cursor get_blob is
    select blob_statement
    from report
    where report_id = 205
    FOR UPDATE OF blob_statement;
    v_loc blob;
    v_raw_buffer raw(32767);
    v_amount binary_integer := 32767;
    v_offset binary_integer := 1;
    v_buffer VARCHAR2(32767);
    begin
    open get_blob;
    fetch get_blob into v_loc;
    close get_blob;
    v_buffer := 'Sample text';
    v_raw_buffer := utl_raw.cast_to_raw(v_buffer);
    v_amount := utl_raw.length(v_raw_buffer);
    dbms_lob.write(v_loc, v_amount, v_offset, v_raw_buffer);
    commit;
    end;

  • Error on select when using value converted from varchar to integer (with isnumeric in where)

    Hi,
    Why is it, that when I convert a varchar into integer and filter it to numeric only that I get the Error 'Conversion failed when converting the nvarchar value '...' to data type int.'
    Here is a short SQL witch shows the Error:
    create table tTest(ID int, sText nvarchar(15))
    insert into tTest
    select 1, null
    insert into tTest
    select 2, 'q'
    go
    select distinct ID, sText, convert(int,sText) AS ID2 from tTest where isnumeric(sText) = 1
    go
    SELECT DISTINCT TOP 100 PERCENT
    ID
    FROM
    (select distinct ID, sText, cast(sText as int) AS ID2 from tTest where isnumeric(sText) = 1) v1
    WHERE
    id2 = 1
    go
    drop table tTest
    As a workaround I replaced the case with 'cast(case when isnumeric(sText) = 1 then sText else null end as int)', but this rater unexpected.
    It works fine in a short query, but if I create a view with the SQL from V1 then the error is unexpected, since I only know that if I view the source of the view

    >'cast(case when isnumeric(sText) = 1 then sText else null
    ISNUMERIC is not 100% accurate.
    BOL: "ISNUMERIC returns 1 for some characters that are not numbers, such as plus (+), minus (-), and valid currency symbols such as the dollar sign ($). For a complete list of currency symbols, see money and smallmoney (Transact-SQL)."
    LINK: http://technet.microsoft.com/en-us/library/ms186272.aspx
    ISNUMERIC examples:
    http://sqlusa.com/bestpractices/isnumeric/
    Kalman Toth Database & OLAP Architect
    Free T-SQL Scripts
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • Convertion from char to raw

    HI all,
    I have to convert a char255 to raw255. Is there any methods/function module that can do this.
    Regards
    Ravish

    Hi,
    try this FM
    Unicode - Konvertierung SOLI in SOLIX
    CALL FUNCTION 'SO_SOLITAB_TO_SOLIXTAB'
    EXPORTING
    ip_solitab = gt_compressed_list[]
    IMPORTING
    ep_solixtab = gt_pdf_hex[].
    Regards

  • Why will CS4 not open DNG files converted from Olympus E-M1 raw files?

    For several years I have been able to use the DNG Converter to convert .ORF raw files from my Olympus E-M1 and then open them for processing in CS4. Suddenly CS4 quit recognizing these DNG files saying "Photoshop could not complete your request because Photoshop does not recognize this type of file"
    I have not changed any preferences. I'm using E-M1 v3.0, DNG Converter v8.3.0.141 on a Mac. I have deleted DNG converter several times, even reinstalled an earlier version but nothing changes.
    However, CS4 will open DNG files converted from Pentax raw .PEF files from my K-5. Weird. It's the Olympus raw DNG conversions that won't open.
    I can view the DNG converted files in question in Mac's Preview just fine but not CS4. Any ideas will be appreciated.

    Be sure the DNG Converter's compatibility is set to provide support for your version of ACR:
    Benjamin

  • How can I convert from Modbus raw data to engineering units using a formula?

    Within Lookout, I have several Modbus numerical input types that do not have a linear corespondence to the Engineering values they represent.  How can I display these values accurately using a formula to convert from the raw data to an engineering value?

    I don't quite understand your reply.  I'm using Lookout 6.0.2, logged in as Administrator, in Edit Mode.  The Modbus object is named RTU06_SAV.  The Active member is 30002 with an alias of SAVfmSMT_RSL.
    Following your instructions, I opened Object Explorer and right-clicked on RTU06_SAV. 
    This opened a menu containing:  Refresh, Cut, Copy, Rename, Delete, Edit connections..., Edit Data Member Configuration, Configure Network Security and Properties.
    I assumed that I should select Edit Data Member Configuration, but maybe I'm wrong. 
    Within Data Member Configuration I can set up Linear Scaling between Raw data and Engineering data.  I know how to do that, but what I need to know is how to convert Raw data to Engineering data using a formula representing a non-linear transformation (such as a converion to a logarithmic value or perhaps a formula derived by fitting the formula to a curve on a calibration chart).
    Once I have this my Engineering data can be represented on a control panel as both a numeric value AND as a correctly reading Gauge.  It can also be properly represented on a HyperTrend graph.
    What do you suggest?

  • Saving from bridge and converting from raw to jpeg

    why can I not convert from raw to jpeg in bridge (camera raw) and save to a location different from the  original

    Yep sure can.
    In bridge select your picture(s) then edit in camera raw.
    In camera raw look in the bottom left of the camera raw dialog box and you will see a save as button.
    This will allow you to save your raw files as jpg, tiff or pngs.

  • Hidden file when converting from raw to jpeg. How to delete this?

    I just found out that when converting raw into jpeg in Photoshop there is a hidden file enclosed starting with ._ Computers don't see them but televisions do. I discovered this because I want to show a batch of my images on a television with a usb of a sd card. It shows my images and after each normal image I get a black image with a questionmark. It says 'cannot read this file' and it shows the name of the image but with a ._ in front of it. For instance garden.jpg and then -_garden.jpg. Computers don't read images starting with ._ but televisions seem to do so. I want to delete these ._ images because I cannot show a slide show of my images on a television. Anyone can help? It seems that this hidden file is incorporated into the jpeg file.
    Thanks in advance!

    Thanks. I have thought of this solution but these files are not showing when I set it this way. I had a specialist helping me to find this problem and he was very surprised that these hidden files didn't show up in his special program for showing hidden information. Only when going deeper and deeper into this program these files showed on his computer. As they are incorporated into the original file (the jpeg version) you don't seem to be able to delete them. What do people do when they want to show (jpeg converted from raw)images on their tv?
    I have a Mac if that helps.

  • Limitation of converting from Long Raw to Blob

    Hi All,
    DB:11g
    Oracle Apps:R12
    Is there a limitation of converting from Long Raw to Blob?
    Please share your experience on this subject in case anyone has faced it before.
    Thanks for your time!
    Regards,

    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:13213885403654
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:510622111991

  • How do you stop DNG Converter from embedding Adobe's ACR default settings instead of custom settings?

    I notice that the new version of Adobe DNG Converter (8.6, and maybe earlier) appears to place Adobe's ACR defaults in the converted file.  Thus, the converted files open up in Bridge with an indication that they already have settings made, and, hence, ACR does not apply the custom camera settings.  One has to Clear Settings first in Bridge, then open in ACR.
    This behavior is new, perhaps to 8.6.  But it's presence defeats the purpose of having custom Camera Defaults.
    Is there any way to prevent DNG Converter from installing settings?

    ssprengel wrote:
    What do you mean by “custom camera settings”?  Do you mean you’ve changed the Camera Raw defaults for a particular camera and those aren’t being seen until you do a Reset?  Or do you mean some sort of Nikon-settings that Adobe never looks at?
    Also at what point in the workflow are you converting these files, just after copying them to your hard-disk and before touching them with any other Adobe software, or after they’ve been adjusted in Nikon software, or after they’ve been adjusted in Bridge/ACR, initially as NEFs?
    I mean my custom camera defaults that are set by the Save New Camera Defaults for a given camera.
    My workflow is to take my original raw files first into Adobe DNG Converter.  I then open the folder in Bridge.  At this point I notice that my original raw files remain unaltered (there is no "settings" icon in the top right corner – circle with two lines and up-arrows – in the image's thumbnail), but the converted dng's (otherwise untouched and unopened in ACR) have a "settings" icon.  When I open the original raw file in ACR, it opens using my custom camera defaults.  When I open the otherwise virgin dng in ACR, it opens using the Adobe defaults (the same defaults that would be employed if no custom camera default had been set).
    This behavior is new.  DNGs formed by earlier versions of the DNG Converter did not apply any settings to the converted file, and when they opened in Bridge, they were given the custom camera settings.
    In order to retain the old (and proper) behavior, I now have to take the just-converted documents into Bridge, select them, and immediately apply Develop Settings/Clear Settings.  That gets rid of the settings that have been installed by the DNG Converter (as well as the "settings" icon on the thumbnail).
    I notice there is a new feature in Adobe DNG Converter 8.6, namely, a panel-specific toggle between the settings and the default settings. This indicates to me the likelihood that Adobe has been making some alterations with the settings that is having unintended consequences.  It clearly is not proper for DNG Converter to be adding (installing) settings, because that prevents the custom camera default settings from being applied, and hence defeats the purpose of the custom camera default settings.

  • System or program crashes when converting from NEF to DNG

    Hello Adobe.
    First off, I love your software.
    Second, this is my concern. You guys are pushing DNG as the go to raw format. That would be great if it worked good, but it doesn't.
    First, when I convert from my Nikon NEF format (Nikon D7100) it chugs along just fine, then suddenly crashes either the program or my system after converting 50-100 or so images.
    I have tried everything from downloading your software again, to turning off everything other then what is needed to do the conversion.
    Of course I have the latest DNG utility/plug in/drivers from your website.
    Second, the DNG images open much slower then my NEF images. Plus when I view them in Windoze file system view and want to see the photos in extra large icons, it renders the images very slowly.
    My system is Windoze 8.1 updated always, Photoshop CC latest and greatest (I'm in the rental program), Bridge and Lightroom.
    I have tried to use bridge and lightroom to do the conversion, even a separate utility and the crashing still happens. All these are up to date.
    My system has an i7 Intel processor, 16 gb of Kingston ram, an ASUS P8Z77 MPRO mother board and a good stable power supply.
    No other software crashes my system like converting from NEF to DNG.
    What I do notice is my CPU fan goes into high RPM's and I am wondering if the CPU is overheating causing this.
    If that is the case, then it would seem to me the conversion software is taxing the system far more then it should since my system is no slouch and while it isn't the latest and greatest, I would consider it to be in the top 20%,
    it should be able to handle the conversion with no problem.
    Are you aware of problems with the DNG software and or file format?
    Is their any information I could forward to you to help solve the problem?

    Photoshop Help | Digital Negative (DNG) - Adobe
    helpx.adobe.com/photoshop/digital-negative.html
    DNG is a publicly available archival format for storing camera raw files. Adobe provides Adobe DNG Converter, a free utility that converts files from more than ...
    That is off the net, therefore, Adobe looks at DNG as part of Adobe Photoshop, which it is if a person chooses to convert.
    My issue has to do with it crashing, both my system and software.
    I assume if people here are using it, then they can advise me if they are having similar problems.
    I have also written Adobe directly several times over the last month and have yet to receive a response.
    I apologize that I posted here, but since I consider DNG an integral part of Photoshop, then I think it is appropriate here.
    I was also not aware of a DNG forum, if one exists.
    Thank you for your assistance.
    Jim

  • Need help converting a varchar to a date

    The following select displays a horizontal column vertically. I need to convert the varchar horizontal column to a date column.
    SELECT raso.SRC_SUPL_CD,
    case numbers.n
    when 1 then
    case instr(raso.DT_TM_PHASE_DT,':',1,1)
    when 0 then raso.DT_TM_PHASE_DT
    else substr(raso.DT_TM_PHASE_DT,1,instr(raso.DT_TM_PHASE_DT,':',1,1)-1)
    end
    else substr
    (raso.DT_TM_PHASE_DT
    ,1 + instr(raso.DT_TM_PHASE_DT,':',1,numbers.n-1)
    ,case instr(raso.DT_TM_PHASE_DT,':',1,numbers.n)
    when 0 then length(raso.DT_TM_PHASE_DT)
    - instr(raso.DT_TM_PHASE_DT,':',1,numbers.n-1) +1
    else instr(raso.DT_TM_PHASE_DT,':',1,numbers.n)
    - instr(raso.DT_TM_PHASE_DT,':',1,numbers.n-1) - 1
    end
    end PHASE_DT
    from RSSP_API_SELECT_OVERRIDE raso
    , (select level n from dual connect by level <= 38) numbers
    where length (raso.DT_TM_PHASE_DT) - length (replace(raso.DT_TM_PHASE_DT,':')) + 1
    >= numbers.n

    An example wouldn't hurt.
    As it is now, my reply would be:
    SQL> create table rssp_api_select_override
      2  as
      3  select 1 src_supl_cd, '01:12:2006:14:55:00' dt_tm_phase_dt from dual
      4  /
    Tabel is aangemaakt.
    SQL> SELECT raso.SRC_SUPL_CD
      2       , case numbers.n
      3         when 1 then
      4           case instr(raso.DT_TM_PHASE_DT,':',1,1)
      5           when 0 then raso.DT_TM_PHASE_DT
      6           else substr(raso.DT_TM_PHASE_DT,1,instr(raso.DT_TM_PHASE_DT,':',1,1)-1)
      7           end
      8         else
      9           substr
    10           ( raso.DT_TM_PHASE_DT
    11           , 1 + instr(raso.DT_TM_PHASE_DT,':',1,numbers.n-1)
    12           , case instr(raso.DT_TM_PHASE_DT,':',1,numbers.n)
    13             when 0 then length(raso.DT_TM_PHASE_DT)
    14                         - instr(raso.DT_TM_PHASE_DT,':',1,numbers.n-1) +1
    15             else instr(raso.DT_TM_PHASE_DT,':',1,numbers.n)
    16                  - instr(raso.DT_TM_PHASE_DT,':',1,numbers.n-1) - 1
    17             end
    18           )
    19         end PHASE_DT
    20    from RSSP_API_SELECT_OVERRIDE raso
    21       , (select level n from dual connect by level <= 38) numbers
    22   where length (raso.DT_TM_PHASE_DT) - length (replace(raso.DT_TM_PHASE_DT,':')) + 1 >= numbers.n
    23  /
                               SRC_SUPL_CD PHASE_DT
                                         1 01
                                         1 12
                                         1 2006
                                         1 14
                                         1 55
                                         1 00
    6 rijen zijn geselecteerd.
    SQL> select to_date(dt_tm_phase_dt,'dd:mm:yyyy:hh24:mi:ss') from rssp_api_select_override
      2  /
    TO_DATE(DT_TM_PHASE
    01-12-2006 14:55:00
    1 rij is geselecteerd.Regards,
    Rob.

  • Converting files with Camera Raw 4.1

    Have just upgraded to iphoto '08, and am having problems with "noise" in the raw conversion within iphoto. So, I'm using Camera Raw 4.1 instead (a bit of a pain as I have a batch of 200 photos to convert from a wedding!).
    A question ... can you save the converted files directly into iphoto?
    Your help will be greatly appreciated.
    Many thanks.
    Jayne

    No, you need to save them to another folder and "import" them. If you just store them directly in the iPhoto Library it will confuse iPhoto.
    However, you can convert all 200 and import them at one time.

  • Conversion failed when converting the varchar value 'undefined' to data typ

    Conversion failed when converting the varchar value 'undefined' to data type int.
    hi, i installed oracle insbridge following the instruction in the manual. in rate manager, when i tried to create a new "Normal rating" or "Underwriting", im getting the following exception
    Server Error in '/RM' Application.
    Conversion failed when converting the varchar value 'undefined' to data type int.
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
    Exception Details: System.Data.SqlClient.SqlException: Conversion failed when converting the varchar value 'undefined' to data type int.
    Source Error:
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
    Stack Trace:
    [SqlException (0x80131904): Conversion failed when converting the varchar value 'undefined' to data type int.]
    System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +1948826
    System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +4844747
    System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +194
    System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2392
    System.Data.SqlClient.SqlDataReader.HasMoreRows() +157
    System.Data.SqlClient.SqlDataReader.ReadInternal(Boolean setTimeout) +197
    System.Data.SqlClient.SqlDataReader.Read() +9
    System.Data.SqlClient.SqlCommand.CompleteExecuteScalar(SqlDataReader ds, Boolean returnSqlValue) +50
    System.Data.SqlClient.SqlCommand.ExecuteScalar() +150
    Insbridge.Net.Fwk.DAO.DataAccess.ScalarQuery(String connectionString, String command, Transaction transType, Object[] procParams) +110
    [Exception: Cannot Execute SQL Command: Conversion failed when converting the varchar value 'undefined' to data type int.]
    Insbridge.Net.Fwk.DAO.DataAccess.ScalarQuery(String connectionString, String command, Transaction transType, Object[] procParams) +265
    Insbridge.Net.Fwk.DAO.SqlProcessor.ExecuteScalarQueryProc(String subscriber, String datastore, String identifier, String command, Transaction transType, Object[] procParams) +101
    Insbridge.Net.Fwk.DAO.SqlProcessor.ExecuteScalarQuery(String subscriber, String identifier, String command) +22
    Insbridge.Net.RM.IBRM.ExeScalar(String cmd, Object[] paramsList) +99
    Insbridge.Net.RM.Components.Algorithms.AlgEdit.Page_Load(Object sender, EventArgs e) +663
    System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
    System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
    System.Web.UI.Control.OnLoad(EventArgs e) +99
    System.Web.UI.Control.LoadRecursive() +50
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
    my insbridge versions are as follows
    IBRU 4.0.0 Copyright ©2010, Oracle. All rights reserved. - Version Listing
    RMBUILD.DLL 4.0.0.0 (x86)
    SRLOAD.DLL 3.13.0 (x86)
    IBRM v04.00.0.17
    IB_CLIENT v04.00.0.00
    RM.DLL 4.00.0 (x86)
    IBFA 3.0.2
    OS: Windows Server 2003
    DB: Sql Server 2008
    Browser: IE8
    how do i solve this, please help

    This is an error due to conversion failed from character string to int datatype. Infact, the table column contains "NO" value which you are trying to convert to Int/SUM which is illegal. Without your code and table structure, its difficult to pinpoint your
    actual issue. But check, all columns for value "NO". 

  • Conversion failed when converting the varchar value to data type int

    Hi, I am unable to resolve this error and would like some assistance please.
    The below query produces the following error message -
    Msg 245, Level 16, State 1, Line 1
    Conversion failed when converting the varchar value 'NCPR' to data type int.
    Select Pc2.Assess,
                    Select Pc1.Title
                    From Pc1
                    Where Pc1.Assess = Pc2.Assess
                ) [Title]
            From Pc2
    However, when I run the query below I get the results shown in the image . Ie. nothing. Pc1 & Pc2 are aliases and are the same table and the assess field is an int. I found NCPR in one cell but that column (prop) is not used in the query. The table
    is nearly 25k rows.
    SELECT * FROM Pc1 WHERE Pc1.Assess LIKE '%NCPR%' OR ISNUMERIC(Pc1.Assess) = 0
    Thank you

    WHERE ISNUMERIC(id) = 1 and there are obviously no 'NCPR' records in the view as per my previous post.
    That is a bad assumption - SQL Server does not have to evaluate the query in the order you are expecting it to.
    Take this simple example
    CREATE TABLE #example
    col1 VARCHAR(50) NOT NULL
    INSERT INTO #example VALUES ('1'), ('2'), ('NaN')
    SELECT * FROM
    SELECT * FROM #example
    WHERE ISNUMERIC(col1) = 1
    ) X
    (3 row(s) affected)
    col1
    1
    2
    (2 row(s) affected)
    compare to
    CREATE TABLE #example
    col1 VARCHAR(50) NOT NULL
    INSERT INTO #example VALUES ('1'), ('2'), ('NaN')
    SELECT * FROM
    SELECT * FROM #example
    WHERE ISNUMERIC(col1) = 1
    ) X
    WHERE col1 = 1
    (3 row(s) affected)
    col1
    1
    Msg 245, Level 16, State 1, Line 8
    Conversion failed when converting the varchar value 'NaN' to data type int.

Maybe you are looking for

  • How to restore a Rman backup from Tape

    Hi, We need to restore the database backup taken through RMAN on 24-JUNE-2013 from tape as this backup is not currently available on disk. Can you please help me on the following, 1) how i can check if the same backup on 24-JUNE-2013 is available on

  • I can't replace or delete pages in a pdf file - I am receiving a "bad parameters" error message

    I am unable to replace or delete pages in pdf files.  I keep getting an error message that says "bad parameters".  This just recently started happening.  I'm using Windows 7 & PPT 2010.  Help.

  • Grouping with A formula issue

    I am grouping on a date that was calculated using the following formula : local stringvar d:= {TAGDTL.USER_DEF_TEXT_1}; //or database field numbervar y:= tonumber ( '20' & d[5 to 6]); numbervar m:= tonumber ( d[1 to 2] ); numbervar dd:= tonumber ( d[

  • Not Authorized Message

    Today was the first time I tried to play the iTunes radio. Initailly I was able to 'sample' couple of the radio stations. Later though, when I click on one of the Itunes radio stations I get the following message: "We could not complete your iTunes S

  • Help! Video Mix down

    How do I combine all my video tracks to one layer so that I can add a letterbox to it all?