Retreving Hexadecimal Values from a table using SQL query.

Hi,
I'm looking for a query to retreive Hexadecimal values contained in a column using SQL query.
The column contains the values of all types, alphanumeric, numeric and hexadecimal.
I need to retreive only hexadecimal values.
any help to me in this regard will be appreciated.
Thanks

Presumably, you can be sure that any valid hex value is indeed MEANT to BE a hex value. For example the value 'ACE' is meant to be a hexadecimal value and not the word.

Similar Messages

  • How to retrive the blob data from a table using sql query

    Hi gurus,
    I have a table which has " BLOB "content in a column .I want to view the data From BLOB column using sql query .It would be helpfull If some one share their idea.
    Regards,
    vardhani.

    You can use data templates.
    See this: http://blogs.oracle.com/xmlpublisher/entry/blob_clob_raw_and_looooong
    http://blogs.oracle.com/xmlpublisher/entry/inserting_blobs_into_your_repo
    Thanks,
    Bipuser

  • How to get string value from database table using Visual Studio 2005?

    Hi,
    Im developing plugin in illustrator cs3 using visual studio 2005. I need to get the values eneterd in database. Im able to get the integer values. But while getting string values it is returning empty value.
    Im using the below code to get the values from database table
    bool Table::Get(char* FieldName,int& FieldValue)
        try
            _variant_t  vtValue;
            vtValue = m_Rec->Fields->GetItem(FieldName)->GetValue();
            FieldValue=vtValue.intVal;
        CATCHERRGET
        sprintf(m_ErrStr,"Success");
        return 1;
    Im using the below code to get the values.
    AIErr getProjects()
        char buf[5000];
        int i;   
        std::string  catName;
        ::CoInitialize(NULL);
        Database db;
        Table tbl;
        errno_t err;
        err = fopen(&file,"c:\\DBResult.txt","w");
        fprintf(file, "Before Connection Established\n");
        //MessageBox(NULL,CnnStr,"Connection String",0);
        if(!db.Open(g->username,g->password,CnnStr))
            db.GetErrorErrStr(ErrStr);
            fprintf(file,"Error: %s\n",ErrStr);
        fprintf(file, "After Connection Established\n");
    if(!db.Execute("select ProjectID,ProjectName from projectsample",tbl))
            db.GetErrorErrStr(ErrStr);
            fprintf(file,"Error: %s\n",ErrStr);
        int ProjectID;
        int UserID;
        int ProjectTitle;
        char ProjectName[ProjectNameSize];
        if(!tbl.ISEOF())
            tbl.MoveFirst();
        ProjectArrCnt=0;
        for(i=0;i<128;i++)
            buf[i]='\0';
            int j=0;
        while(!tbl.ISEOF())
            if(tbl.Get("ProjectID",ProjectID))
                fprintf(file,"Project ID: %d ",ProjectID);
                ProjectInfo[ProjectArrCnt].ProjectID = ProjectID;
                sprintf(buf,"%d",ProjectID);
                //MessageBox(NULL, buf,"f ID", 0);
                j++;
            else
                tbl.GetErrorErrStr(ErrStr);
                fprintf(file,"Error: %s\n",ErrStr);
                break;
            //if(tbl.Get("ProjectTitle",ProjectName))
            if(tbl.Get("ProjectName",ProjectName))
                MessageBox(NULL,"Inside","",0);
                fprintf(file,"ProjectTitle: %s\n",ProjectName);
                //catName=CategoryName;
                ProjectInfo[ProjectArrCnt].ProjectName=ProjectName;
                //sprintf(buf,"%s",ProjectName);
                MessageBox(NULL,(LPCSTR)ProjectName,"",0);
            else
                tbl.GetErrorErrStr(ErrStr);
                fprintf(file,"Error: %s\n",ErrStr);
                break;
            ProjectArrCnt++;
            //MessageBox(NULL, "While", "WIN API Test",0);
            tbl.MoveNext();
        //MessageBox(NULL, ProjectInfo[i].ProjectName.c_str(),"f Name", 0);
        ::CoUninitialize();
        //sprintf(buf,"%s",file);
        //MessageBox(NULL,buf,"File",0);
        fprintf(file, "Connection closed\n");
        fclose(file);
        for(i=0;i<ProjectArrCnt;i++)
            sprintf(buf,"%i",ProjectInfo[i].ProjectID);
            //MessageBox(NULL,buf,"Proj ID",0);
            //MessageBox(NULL,ProjectInfo[i].ProjectName.c_str(),"Project Name",0);
        return 0;
    In the above code im geeting project D which is an integer value. But not able to get the project name.
    Please some one guide me.

    As I said in the other thread, this really isn't the place to ask questions about a database API unrelated to the Illustrator SDK. You're far more like to find people familliar with your problem on a forum that is dedicated to answering those kinds of questions instead.

  • How to show data in a matrix form from a table using SQL

    Dear Friends,
    I have a table with three columns with the following data:
    Market, Product, Date, Value
    Market-A Product-A 01/01/04 34
    Market-A Product-A 01/02/04 33
    Market-A Product-A 01/03/04 67
    Market-A Product-A 01/04/04 64
    Market-A Product-B 01/01/04 34
    Market-A Product-B 01/02/04 36
    Market-A Product-B 01/03/04 77
    Market-A Product-B 01/04/04 32
    Market-B Product-C 01/01/04 25
    Market-B Product-C 01/02/04 56
    Market-B Product-C 01/03/04 45
    Market-B Product-C 01/04/04 68
    Market-B Product-D 01/01/04 78
    Market-B Product-D 01/02/04 75
    Market-B Product-D 01/03/04 32
    Market-B Product-D 01/04/04 35
    I have a requirement where in I have to filter the products based on market and then show in the following format on the screen:
    After filtering based on Market-A (eg) the data should look like:
    01/01/04 01/02/04 01/03/04 01/04/04
    Product-A 34 33 67 64
    Product-B 34 36 77 32
    Kinldy suggest how can I write a query to get the data in this format using SQL
    Thanks & Regards,
    Vinay

    scott@ORA92> -- test data:
    scott@ORA92> SELECT * FROM a_table
      2  /
    Market-A Product-A 01/01/04         34
    Market-A Product-A 01/02/04         33
    Market-A Product-A 01/03/04         67
    Market-A Product-A 01/04/04         64
    Market-A Product-B 01/01/04         34
    Market-A Product-B 01/02/04         36
    Market-A Product-B 01/03/04         77
    Market-A Product-B 01/04/04         32
    Market-B Product-C 01/01/04         25
    Market-B Product-C 01/02/04         56
    Market-B Product-C 01/03/04         45
    Market-B Product-C 01/04/04         68
    Market-B Product-D 01/01/04         78
    Market-B Product-D 01/02/04         75
    Market-B Product-D 01/03/04         32
    Market-B Product-D 01/04/04         35
    scott@ORA92> -- query:
    scott@ORA92> SELECT product,
      2           SUM (DECODE (the_date, to_date ('01/01/2004', 'mm/dd/yyyy'), value)) AS "01/01/04",
      3           SUM (DECODE (the_date, to_date ('01/02/2004', 'mm/dd/yyyy'), value)) AS "01/02/04",
      4           SUM (DECODE (the_date, to_date ('01/03/2004', 'mm/dd/yyyy'), value)) AS "01/03/04",
      5           SUM (DECODE (the_date, to_date ('01/04/2004', 'mm/dd/yyyy'), value)) AS "01/04/04"
      6  FROM   a_table
      7  WHERE  market = 'Market-A'
      8  GROUP  BY product
      9  /
    Product-A         34         33         67         64
    Product-B         34         36         77         32
    scott@ORA92>

  • Count rows from multiple tables using SQL only

    Hi, I know this has probably been answered before, but I couldn't find the answer anywhere. Please help.
    I'd like count(*) [rows] for all tables in database using SQL only - no PL/SQL
    The result should be something like:
    Table RowCount
    DBA_TABLES 1000
    DBA_USERS 50
    etc.
    Thanks!

    offcource write this script:
    create or replace procedure count_tables (ip_schema VARCHAR2)
    is
    lv_owner VARCHAR2(100);
    lv_table_name VARCHAR2(100);
    lv_sql_statement VARCHAR2(2000);
    lv_count_table NUMBER;
    CURSOR c1 IS
    SELECT owner, table_name
    FROM all_tables
    WHERE owner = ip_schema
    ORDER BY table_name;
    begin
    dbms_output.put_line ('+--------------------------------------------------------------------+');
    dbms_output.put_line ('¦ | | ¦');
    dbms_output.put_line ('¦ Schema Name | Table Name | Number of Rows ¦');
    dbms_output.put_line ('¦ | | ¦');
    dbms_output.put_line ('¦------------------------------------------------------------------¦');
    OPEN c1;
    LOOP
    FETCH c1 INTO lv_owner , lv_table_name;
    EXIT WHEN c1%NOTFOUND;
    lv_sql_statement := 'SELECT count(*) FROM ' || lv_owner || '.' || lv_table_name;
    EXECUTE IMMEDIATE lv_sql_statement INTO lv_count_table;
    IF lv_count_table > 0 THEN
    dbms_output.put_line ('| '||rpad(lv_owner, 14, ' ')||'| '|| rpad(lv_table_name, 32, ' ')||'| '|| rpad(lv_count_table, 16, ' ')||' |');
    -- dbms_output.put_line ('|---------------|---------------------------------|------------------|');
    END IF;
    END LOOP;
    CLOSE c1;
    dbms_output.put_line ('+--------------------------------------------------------------------+');
    exception
    WHEN OTHERS THEN
    dbms_output.put_line ('owner: '||lv_owner||' - table: '||lv_table_name||' - '||sqlerrm);
    end count_tables;
    set serveroutput on size 1000000
    exec count_tables
    drop procedure count_tables;

  • Retrive the second-highest value from the table using query.

    Hi,
    I am using Oracle 8i...
    I have to retrieve the second-highest salary from the table...for this I need to write a SQL..Can anybody please help me to figure out this problem..Thanks in advance..
    smitha

    Using analytic functions
    SELECT *
    FROM (SELECT other_columns,DENSE_RANK() OVER(ORDER BY salary DESC) sal_rank
          FROM table)
    WHERE sal_rank = 2
    Using Order by and rownum
    SELECT *
    FROM (SELECT other_columns,rownum sal_rank
          FROM (SELECT other_columns,salary
                FROM table
                ORDER BY salary DESC))
    WHERE sal_rank = 2TTFN
    John

  • Retrive a new sequence value from a table using Stored Procedure

    Dear experts
    i have written the following stored procedure, but i want this to return itemid to the environment. Please help as i am absolutely new to oracle.
    create or replace procedure "SP_ITEMS"
    (vitem IN VARCHAR2,
    vqty IN NUMBER,
    vrate IN NUMBER)
    is
    begin
    INSERT INTO ITEMS (item,qty,rate)
    VALUES (vitem,vqty,vrate);
    end;
    Thanks
    With regards
    Manish Sawjiani

    If you want a column to be automatically populated with a sequence, then you need to create a sequence, and create a trigger to populate the column with the sequence. You can use the returning clause in a select statement to return the value of the inserted sequence. You can do this with just sql or you can put it in a procedure. I have demonstrated both below. This is a general sql and pl/sql problem, not something specific to the Express Edition, so please post future such questions in the sql and pl/sql discussion group instead.
    SCOTT@10gXE> CREATE TABLE items
      2    (itemid NUMBER,
      3       item   VARCHAR2 (50),
      4       qty    NUMBER (10, 3),
      5       rate   NUMBER (10, 3))
      6  /
    Table created.
    SCOTT@10gXE> CREATE SEQUENCE item_sequence
      2  /
    Sequence created.
    SCOTT@10gXE> CREATE OR REPLACE TRIGGER items_bir
      2    BEFORE INSERT ON items
      3    FOR EACH ROW
      4  BEGIN
      5    SELECT item_sequence.NEXTVAL
      6    INTO   :NEW.itemid
      7    FROM   DUAL;
      8  END items_bir;
      9  /
    Trigger created.
    SCOTT@10gXE> SHOW ERRORS
    No errors.
    SCOTT@10gXE> VARIABLE g_itemid NUMBER
    SCOTT@10gXE> INSERT INTO items (item, qty, rate)
      2  VALUES ('item1', 2, 3)
      3  RETURNING itemid INTO :g_itemid
      4  /
    1 row created.
    SCOTT@10gXE> PRINT g_itemid
      G_ITEMID
             1
    SCOTT@10gXE> CREATE OR REPLACE PROCEDURE sp_items
      2    (p_item      IN  VARCHAR2,
      3       p_qty      IN  NUMBER,
      4       p_rate      IN  NUMBER,
      5       p_itemid OUT NUMBER)
      6  AS
      7  BEGIN
      8    INSERT INTO ITEMS (item, qty, rate)
      9    VALUES (p_item, p_qty, p_rate)
    10    RETURNING itemid INTO p_itemid;
    11  END sp_items;
    12  /
    Procedure created.
    SCOTT@10gXE> SHOW ERRORS
    No errors.
    SCOTT@10gXE> EXECUTE sp_items ('item2', 3, 4, :g_itemid)
    PL/SQL procedure successfully completed.
    SCOTT@10gXE> PRINT g_itemid
      G_ITEMID
             2
    SCOTT@10gXE> SELECT * FROM items
      2  /
        ITEMID ITEM                                                      QTY       RATE
             1 item1                                                       2          3
             2 item2                                                       3          4
    2 rows selected.
    SCOTT@10gXE>

  • Get maximum value in a field using SQL query

    Hi,
    I want to retrieve the row containing the maximum value for a particular field.
    select max(fieldname) from tablename
    How do I do this using database connectivity toolkit.
    Shiva

    Hello,
    I figured out the answer. It was sql syntax.
    Thanks for coming in here to help.
    I created another post earlier because I had a little different question that pertained to fetch.vi.  How do you get an array out from fetch.vi without creating error. I also made type an array also but it does not allow an array.
    Thanks for your help.
    By the way, how do I as the original poster get rid of a whole thread I created, especially if its a duplicate.

  • How to display contineous 10 dates from today date using SQL query

    Hi All
    I need a requirement of displaying 10 dates and numbers contineously, I have written a query for getting 10 numbers like this
    select rownum from dual where rownum < 10 connect by rownum = level;
    But i am not able to get the dates, Can any one help me ?

    Hi Satyaki,
    No issues on my 9.2.0.8 client.
    SQL*Plus: Release 9.2.0.8.0 - Production on Sat May 3 09:49:17 2008
    Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
    SQL> conn test/test@db10g
    Connected.
    SQL> select rownum, trunc(sysdate) + rownum from dual where rownum <= 10 connect by rownum = level;
        ROWNUM TRUNC(SYS
             1 04-MAY-08
             2 05-MAY-08
             3 06-MAY-08
             4 07-MAY-08
             5 08-MAY-08
             6 09-MAY-08
             7 10-MAY-08
             8 11-MAY-08
             9 12-MAY-08
            10 13-MAY-08
    10 rows selected.
    SQL> Regards

  • How to delete entire data from MDS UI using SQL query or Using SSIS

    Hi All,
    Using SSIS i loaded data in MDS UI(Subcription view),I want when i execute my package next time and load data in MDS it should be blank or data should not be in UI.

    Hi
    please checked following url to insert data  in your MDM
    http://msdn.microsoft.com/en-us/library/jj819772.aspx

  • How to retrieve 2 values from a table in a LOV

    Hi
    I'm pretty new to APEX. I try to retrieve two values from a table using a LOV. I have a table named DEBIT with then columns SITE, NAME and KEY
    I want to display NAME to the user in a list. When the user select an item from the list, I want to retrieve the data of the SITE and KEY column of this item in order to launch an SQL command based on this two values.
    How to retrieve thes two values whant the user chooses an item from the list ?
    I apologize for my english, being french.
    Regards.
    Christian

    Christian,
    From what I understood about your requirement, you want a 'select list with submit' which displays "NAME" and based on the value selected, you want to get the corresponding values for "SITE" and "KEY" from the table.
    <b>Step 1: Create a select list with submit, say P1_MYSELECT </b><br><br>
    Use something like this in the dynamic list of values for the select list: <br>
    SELECT NAME display_value, NAME return_value
    FROM DEBIT<br><br>
    <b>Step 2: Create a page process of type PL/SQL block. Also create 2 hidden items P1_KEY and P1_SITE. </b><br><br>
    In the PL/sQL, write something like:
    DECLARE
      v_key DEBIT.KEY%TYPE;
      v_site DEBIT.SITE%TYPE;
      CURSOR v_cur_myvals IS
              SELECT KEY, SITE
              FROM DEBIT
              WHERE NAME = :P1_MYSELECT;
    BEGIN
      OPEN v_cur_myvals;
      LOOP
              FETCH v_cur_myvals
              INTO  v_key,v_site;
              EXIT WHEN v_cur_myvals%NOTFOUND;
    :P1_KEY := v_key;   
    :P1_SITE := v_site; 
      END LOOP;
      CLOSE v_cur_myvals;
    END; <br><br>
    Then you can use these values for whatever purpose you need to.
    Hope this helps.

  • Retreiving data from 2 tables using a sender JDBC Channel

    Hi all,
    We got anew requirement where we have to select data from 2 tables and update fields in 2 tables at the sametime.
    I have a few queries regarding this.
    Can we retrieve data from 2 tables using select query in sender JDBC channel?
    If yes, how we can achieve this?
    Can we use inner/outer joins in the select query?
    Can we update field of 2 tables using the Update query in Sender JDBC channel?
    Your help is greatly rewarded.
    With Regards
    Sudha.

    Hi,
    Even i have the same requirement where data has to be read from 2 tables and later update the falg once done .
    SELECT query :
    SELECT t1.KUNNR,t1.SETT_KEY,t1.QUART_START,t1.QUART_END,t2.PAY_METH,t2.MAT_NDC,t2.AMOUNT   FROM TSAP_REBATE_MEDI t1  INNER JOIN  TSAP_REBATE_LINE t2  ON  t1.KUNNR=t2.KUNNR AND t1.SETT_KEY=t2.SETT_KEY  WHERE  t1.PROCESSING_STATUS = 'N' AND t2.PROCESSING_STATUS = 'N'
    This is working fine.
    Can somebody help me with update query with this. where flag PROCESSING_STATUS has to be updated with 'P'.
    I tried a lot but couldnt get the answer
    Br,
    Manoj

  • Using SQL query on user defined table

    Hi all,
    i'am currently working on a project which use user defined table and i would like to know if sap allow us to do insertion/deletion/update on those table using sql query or if we have to use the DI only?
    thanks
    Best regards,

    Hi,
    Definitely you can insert in UDT. You can update but you cant change the Code field after added the rest of the field
    can be updated. You cant delete in UDT but you cant delete anytime in SQL Management Studio.
    THanks.
    CLint

  • Finding minimum value in each row using dynamic query

    need to find the minimum and maximum value from each row using dynamic query
    [from curr] will be given as input
    Tuky

    DECLARE @t TABLE(a INT,b INT,c INT);
    INSERT @t VALUES(1,2,3),(9,8,7),(4,6,5);
    SELECT *
    ,      (   SELECT  MAX(val) 
               FROM    (VALUES (a)
                           ,   (b)
                           ,   (c)
                       ) AS value(val)
           ) AS MaxVal 
    ,      (   SELECT  MIN(val) 
               FROM    (VALUES (a)
                           ,   (b)
                           ,   (c)
                       ) AS value(val)
           ) AS MinVal 
    FROM @t;
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • From two given tables, how do you fetch the values from two columns using values from one column(get values from col.A if col.A is not null and get values from col.B if col.A is null)?

    From two given tables, how do you fetch the values from two columns using values from one column(get values from col.A if col.A is not null and get values from col.B if col.A is null)?

    Hi,
    Use NVL or COALESCE:
    NVL (col_a, col_b)
    Returns col_a if col_a is not NULL; otherwise, it returns col_b.
    Col_a and col_b must have similar (if not identical) datatypes; for example, if col_a is a DATE, then col_b can be another DATE or it can be a TIMESTAMP, but it can't be a VARCHAR2.
    For more about NVL and COALESCE, see the SQL Language manual: http://docs.oracle.com/cd/E11882_01/server.112/e26088/functions119.htm#sthref1310
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables involved, and also post the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    Always say which version of Oracle you're using (e.g., 11.2.0.2.0).
    See the forum FAQ: https://forums.oracle.com/message/9362002

Maybe you are looking for

  • Need to send some notifications by mail (not all notif)

    Hi! We run workflow embeded into EBS (11.5.10.2 4RUP). We have a custom workflow that uses Role (WF_LOCAL_ROLES) connected to employee register (ORIG_SYSTEM = 'PER' and orig_system_id = (person_id in per_all_people_f). we get the Role in the db packa

  • Under/Overpayment Amt Allowing missing in 2007A SP01 PL9 US localization

    Hello experts, In Admin > System Init > Document Settings on the Per Document tab for Incoming Payment (and also Outgoing Payment), the "Under/Overpayment Amt Allowed" setting is not displayed.  2007A, SP01 patch level 9, US localization Where could

  • Formatting a combined dual chart - which svg commands necessary?

    Hello all, I have a combined dual chart (two columns and one line) as shown in the picture below. I'd like to format the following things: - color of columns (costs in one color and Incoming Order List in a different) - color of outer ticks of both y

  • Is there a way to hide the SSID?

    On my old Linksys router I could choose to not broadcast the SSID as a form of added security (a hacker won't hack what he doesn't know exists). Instead of it showing up in the list of available networks, you had to type it in manually. It finally br

  • Safari won't work after 10.5 update

    I just updated my Power Mac G5 to leopard. For the most part I love the new features of the system but I have not been able to use Safari since the update. Safari will open and connect to the internet but it will not fully load any web page and basic