Convert all the column of table to ToBase64String

Hi ,
I have one assisgnment that I have to convert all the source column to ToBase64String.
Suppose I have 3 column in department table like
Select Deptid,Dept_name,location from department.
in same query I want to derive checlksum ToBase64String value .
My output shild be look like below output
HjGrRZvXy/kMQE+NKwfXNA==
470xf2ZinGTq0PoQtPGiWQ==
uFM0YIkWVsRlEgg9lmkekw==
fghxvsUd3nuO6Zvmhv1t/w==
Regards,
Vipin jha
Thankx & regards, Vipin jha MCP

Easiest way to do this is use Xquery function
see
http://blogs.msdn.com/b/sqltips/archive/2008/06/30/converting-from-base64-to-varbinary-and-vice-versa.aspx
Please Mark This As Answer if it solved your issue
Please Vote This As Helpful if it helps to solve your issue
Visakh
My Wiki User Page
My MSDN Page
My Personal Blog
My Facebook Page

Similar Messages

  • Query to get the data of all the columns in a table except any one column

    Can anyone please tell how to write a query to get the data of all the columns in a table except one particular column..
    For Example:
    Let us consider the EMP table.,
    From this table except the column comm all the remaining columns of the table should be listed
    For this we can write a query like this..
    Select empno, ename, job, mgr, sal, hiredate, deptno from emp;
    Just to avoid only one column, I mentioned all the remaining ( 7 ) columns of the table in the query..
    As the EMP table consists only 8 columns, it doesn't seem much difficult to mention all the columns in the query,
    but if a table have 100 columns in the table, then do we have to mention all the columns in the query..?
    Is there any other way of writing the query to get the required result..?
    Thanks..

    Your best best it to just list all the columns. Any other method will just cause more headaches and complicated code.
    If you really need to list all the columns for a table because you don't want to type them, just use something like...
    SQL> ed
    Wrote file afiedt.buf
      1  select trim(',' from sys_connect_by_path(column_name,',')) as columns
      2  from (select column_name, row_number() over (order by column_id) as column_id
      3        from user_tab_cols
      4        where column_name not in ('COMM')
      5        and   table_name = 'EMP'
      6       )
      7  where connect_by_isleaf = 1
      8  connect by column_id = prior column_id + 1
      9* start with column_id = 1
    SQL> /
    COLUMNS
    EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,DEPTNO
    SQL>

  • How can I list all the column names of a table by programming?

    Hi,
    Now I want to write an function which has the following features:
    Firstly, The function was given a parameter as table name.
    Then, it will lists all the columns names of the table.
    e.g
    table: person
    ---firstName------lastName----+
           Michale               Jackson
    We can get the columns 'firstname' and 'lastName' by calling the function with table name 'person'.
    And I also wonder that where I can get reference book or any other materials?
    Thanks.
    Edited by: wenjing wang on Feb 15, 2008 6:42 AM
    Edited by: wenjing wang on Feb 15, 2008 6:57 AM

    hi,
    hope the below code helps u. Just take the headee which contains the field name and split it like below and compare it with the field name u want here 'last name'.
    here,
    'First name' will be in wt_filedata1 and remaining field names in wt_filedata2, so 'do' continues.
    c_tab must be the separator, either , or + or tab etc..
    CODE:
    read table person into wl_header index 1.
    do.
        split wl_header at c_tab into: wt_filedata1 wt_filedata2.
        if wt_filedata1 <> 'lastname'.
          cnt1 = cnt1 + 1.
          wl_header = wt_filedata2.
        else.
          exit.
        endif.
      enddo.
    Please reward if it is useful.
    regards,
    sri

  • When I upload a cvs file not all the column display in the Data / Table Mapping screen

    1. I have created application using Apex Data Loading wizard. There when I am trying to load data from .csv file, but not all the columns display in the "Data / Table Mapping" screen. But if I go through AQL --> Utility --> Data Workshop, there all column display in "Data / Table Mapping" page. I want to get same thing in application I created. How will get all columns display in the screen?
    2. Is there any way to select target table dynamically during runtime. So that in appication we can select different target tables with different source file to load data.

    Your user info says iPad. This is the OS X Numbers forum. Assuming you are using OS X… Be sure the file is named with a .csv suffix.
    (I don't have an iPad, so I don't know the iOS answer.)

  • How can I instruct SqlMetal to exclude the 'storage' attribute of all the columns on a mapping file when converting a .dbml file to a mapping file?

    Hi,
    I'm trying to use LINQ to SQL with a top down approch using my own POCO classes. I'm using a XML file for the external mapping but in order to avoid typing a long file by hand I found that I could use the O/R designer to create the .dbml and from there I
    could use SqlMetal.exe to generate the map file from the .dbml. The only thing is that, by default, SqlMetal generates a map file which includes the 'storage' attribute for all the columns of the database. For example:
    <
    Column
    Name="Ticker"
    Member="Ticker"
    Storage="_Ticker"
    DbType="NChar(20)
    NOT NULL"
    CanBeNull="false"
    />
    However, in my code I only use automatic properties (Ticker, in this example) and not properties with the corresponding private field. Basically, I don't have any field "_Ticker" in my class. I found out that this the reason why I'm getting the error
    "Bad Storage property: '_Ticker' on member 'TTS.Domain.Asset.Ticker" when trying to add an entity to the database. However, ff I delete the all the 'storage' attributes from my mapping file everything works fine.
    Is there a way so I could use SqlMetal to generate a map file from a .dbml file but in which it never includes the 'storage' attribute?
    Thanks.
    Best,
    Miguel T.
    This is reason why I'm getting the error.

    Hi Serguey,
    I was expecting that answer but I still had some hope that it could be possible! I checked those 2 links before sending my question.
    Currently, I'm deleting the storage attributes everytime that I generate a mapping file. The issue is that I will have to do this eveytime that I need to add data in my O/R designer which happens quite frequently since I'm working with iterations in my project.
    It's not very practical but it's still better than write the additional data by hand.
    I don't know how I could create my own mapping validation in order to exclude the 'storage' attributes everytime that I generate a mapping file from a .dbml file with SqlMetal but I will check that option too.
    Thanks for your helps.
    Best,
    Miguel.

  • All the columns of an alv grid report are not downloading in excel in 1 lin

    Hi All,
    I have some 60 columns in my alv grid report and user can download the report using list->export->localfile->spreadsheet.
    What the issue is that all the columns are not downloading in one line, instead they split in two rows.
    Please help.
    Regards,
    Neha Patel

    hi,
    just use this procedure it will solve your problem:
    Firstly export  the data to memory using the FM LIST_FROM_MEMORY.
    CALL FUNCTION 'LIST_FROM_MEMORY'
    TABLES
    listobject = t_listobject
    EXCEPTIONS
    not_found = 1
    OTHERS = 2.
    IF sy-subrc 0.
    MESSAGE e000(su) WITH text-001.
    ENDIF.
    then i converted it into ASCII using LIST_TO_ASCI,
    CALL FUNCTION 'LIST_TO_ASCI'
    TABLES
    listasci = t_xlstab
    listobject = t_listobject
    EXCEPTIONS
    empty_list = 1
    list_index_invalid = 2
    OTHERS = 3.
    IF sy-subrc NE 0.
    MESSAGE e003(yuksdbfzs).
    ENDIF.
    This gives the data in ASCII format separated by '|' and the header has '-', dashes. If you use this internal table directly without any proccesing in SO_NEW_DOCUMENT_ATT_SEND_API1, then you will not get a good excel sheet attachment. To overcome this limitation, i used cl_abap_char_utilities=>newline and cl_abap_char_utilities=>horizontal_tab to add horizontal and vertical tabs to the internal table, replacing all occurences of '|' with
    cl_abap_char_utilities=>horizontal_tab.
    Set the doc_type as 'XLS', create the body and header using the packing_list and pass the data to be downloaded to SO_NEW_DOCUMENT_ATT_SEND_API1 as contents_bin.
    This will create an excel attachment.
    Sample code for formatting the data for the attachment in excel format.
    u2022     Format the data for excel file download
    LOOP AT t_xlstab INTO wa_xlstab .
    DESCRIBE TABLE t_xlstab LINES lw_cnt.
    CLEAR lw_sytabix.
    lw_sytabix = sy-tabix.
    u2022     If not new line then replace '|' by tabs
    IF NOT wa_xlstab EQ cl_abap_char_utilities=>newline.
    REPLACE ALL OCCURRENCES OF '|' IN wa_xlstab
    WITH cl_abap_char_utilities=>horizontal_tab.
    MODIFY t_xlstab FROM wa_xlstab .
    CLEAR wa_xlstab.
    wa_xlstab = cl_abap_char_utilities=>newline.
    IF lw_cnt NE 0 .
    lw_sytabix = lw_sytabix + 1.
    u2022     Insert new line for the excel data
    INSERT wa_xlstab INTO t_xlstab INDEX lw_sytabix.
    lw_cnt = lw_cnt - 1.
    ENDIF.
    CLEAR wa_xlstab.
    ENDIF.
    ENDLOOP.
    Sample code for creating attachment and sending mail:
    FORM send_mail .
    u2022     Define the attachment format
    lw_doc_type = 'XLS'.
    u2022     Create the document which is to be sent
    lwa_doc_chng-obj_name = 'List'.
    lwa_doc_chng-obj_descr = w_subject. "Subject
    lwa_doc_chng-obj_langu = sy-langu.
    u2022     Fill the document data and get size of message
    LOOP AT t_message.
    lt_objtxt = t_message-line.
    APPEND lt_objtxt.
    ENDLOOP.
    DESCRIBE TABLE lt_objtxt LINES lw_tab_lines.
    IF lw_tab_lines GT 0.
    READ TABLE lt_objtxt INDEX lw_tab_lines.
    lwa_doc_chng-doc_size = ( lw_tab_lines - 1 ) * 255 + STRLEN( lt_objtxt ).
    lwa_doc_chng-obj_langu = sy-langu.
    lwa_doc_chng-sensitivty = 'F'.
    ELSE.
    lwa_doc_chng-doc_size = 0.
    ENDIF.
    u2022     Fill Packing List For the body of e-mail
    lt_packing_list-head_start = 1.
    lt_packing_list-head_num = 0.
    lt_packing_list-body_start = 1.
    lt_packing_list-body_num = lw_tab_lines.
    lt_packing_list-doc_type = 'RAW'.
    APPEND lt_packing_list.
    u2022     Create the attachment (the list itself)
    DESCRIBE TABLE t_xlstab LINES lw_tab_lines.
    u2022     Fill the fields of the packing_list for creating the attachment:
    lt_packing_list-transf_bin = 'X'.
    lt_packing_list-head_start = 1.
    lt_packing_list-head_num = 0.
    lt_packing_list-body_start = 1.
    lt_packing_list-body_num = lw_tab_lines.
    lt_packing_list-doc_type = lw_doc_type.
    lt_packing_list-obj_name = 'Attach'.
    lt_packing_list-obj_descr = w_docdesc.
    lt_packing_list-doc_size = lw_tab_lines * 255.
    APPEND lt_packing_list.
    u2022     Fill the mail recipient list
    lt_reclist-rec_type = 'U'.
    LOOP AT t_recipient_list.
    lt_reclist-receiver = t_recipient_list-address.
    APPEND lt_reclist.
    ENDLOOP.
    u2022     Finally send E-Mail
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
    EXPORTING
    document_data = lwa_doc_chng
    put_in_outbox = 'X'
    commit_work = 'X'
    IMPORTING
    sent_to_all = lw_sent_to_all
    TABLES
    packing_list = lt_packing_list
    object_header = lt_objhead
    contents_bin = t_xlstab
    contents_txt = lt_objtxt
    receivers = lt_reclist
    EXCEPTIONS
    too_many_receivers = 1
    document_not_sent = 2
    document_type_not_exist = 3
    operation_no_authorization = 4
    parameter_error = 5
    x_error = 6
    enqueue_error = 7
    OTHERS = 8.
    Hope it will help you
    Regards
    Rahul sharma

  • Reg:How to delete the column in table control also from database table.

    Hi Experts,
    Once again thank u all for giving the responses.
    one more doubt is how to delete the columns of table control and also the record shold delete from ztable.
    With Regards,
    Saroja.P.

    Hi,
    If you want to delete the rows in the table control and simultaneously delete it from the database table, then you can implement a 'DELETE' functionality specific to your table control. Have a MARK field (you will find that in the screen attributes of the table control -> give a name for the MARK field, you will find an additional MARK column at the beginning of your table control). You can check whatever rows you want to delete from the table control, call the delete module.
    "This portion of code inside the LOOP...ENDLOOP.
    IF sy-ucomm eq 'F_DELETE'.
       gt_itab2-check = mark.  " Store the MARK field status into your internal table's correspoding field 'check'
      MODIFY gt_itab INDEX tabcontrol-current_line.
    ENDIF.
    iF sy-ucomm eq 'DELETE1'.
      DELETE gt_itab WHERE check eq 'X'. "Your internal table does not have rows that you want to delete
    ENDIF.
    Now you can modify your database table using the MODIFY statement.
    MODIFY ZDB FROM TABLE gt_itab.

  • Return all the column values using the F4IF_INT_TABLE_VALUE_REQUEST

    Hi,
    How to return all the column values using the F4IF_INT_TABLE_VALUE_REQUEST?
    For example : if the row has 3 columns then after selecting the particular row, the RETURN_TAB internal table should contain all the three column values.
    Regards,
    Raghu

    Hi,
       Try the following...
    DATA : it_fields like help_value occurs 1 with header line.
    data: begin of w_vbap,
            vbeln      like vbap-vbeln,    
            posnr      like vbap-posnr,   
            werks      like vbap-werks,  
          end of w_vbap.
    data: i_vbap   like w_vbap   occurs 0 with header line,
             w_fields type help_value,
          i_dfies type table of dfies,
          i_return_tab type table of ddshretval with header line,
          i_field  type dfies.
      select vbeln posnr werks
          from vbap into table i_vbap up to 5 rows.
    if sy-subrc = 0.
       sort i_vbap by vbeln.
    endif.
      clear it_fields[] , it_fields.
      it_fields-tabname = c_vbap.
      it_fields-fieldname = 'VBELN'.
      it_fields-selectflag = c_on.
      append it_fields.
      it_fields-tabname = c_vbap.
      it_fields-fieldname = 'POSNR'.
      it_fields-selectflag = space.
      append it_fields.
      it_fields-tabname = c_vbap.
      it_fields-fieldname = 'WERKS'.
      it_fields-selectflag = space.
      append it_fields.
      loop at it_fields into w_fields.
        i_field-tabname   = w_fields-tabname.
        i_field-fieldname = w_fields-fieldname.
        i_field-keyflag   = w_fields-selectflag.
        append i_field to i_dfies.
      endloop.
      call function 'F4IF_INT_TABLE_VALUE_REQUEST'
        exporting
          retfield               = 'VBELN'
         window_title           = 'Select'
        tables
          value_tab              = i_vbap
          field_tab                = i_dfies
          return_tab             = i_return_tab
       exceptions
         parameter_error        = 1
         no_values_found        = 2
         others                 = 3
      read table i_return_tab into w_return_tab index 1.
      if sy-subrc = 0.
      endif.
    Regards,
    Srini.

  • Apply distinct to all the columns in a select list

    Select distinct name, date , venue , duration from tableA
    the above query distinct onlu the first column in the select list but is it possible to distinct all the columns.
    current out put is
    1 , raj, 25-may-2009, uk , 10
    1 , raj, 25-may-2009, usa , 10
    1 , raj, 25-may-2009, uk , 20
    requried output....
    1 , raj, 25-may-2009, uk , 10
    the first found row is enogh...
    thanks in advance :)
    raj

    But all these tree rows are distinct. Doesn't it? Why you want to take only first row? What's the logic?
    Kamran Agayev A. (10g OCP)
    http://kamranagayev.wordpress.com
    [Step by Step install Oracle on Linux and Automate the installation using Shell Script |http://kamranagayev.wordpress.com/2009/05/01/step-by-step-installing-oracle-database-10g-release-2-on-linux-centos-and-automate-the-installation-using-linux-shell-script/]

  • How to update all the rows of table using stored procedures

    Hi,
    I want to update all the rows of a table of a specific column
    sp_a  male
    sp_b female
    sp_c  male
    sp_d female
    in above table 
    gender of all the columns has to be interchanged.

    Sir table is like this detail(name varchar(10),gender varchar(10))
    Where Details  are like this 
    Name  Gender
    sp_a 
    male
    sp_b
    female
    sp_c 
    male
    sp_d
    female
    I want to create a stored procedure which automtically updates gender from male to female and female to male
    for all the rows . i.e., all the rows are updated for column gender by just running a stored procedure.
    So after execution of stored proc the above table looks
    Name  Gender
    sp_a 
    female
    sp_b
    male
    sp_c 
    female
    sp_d
    male

  • How to export the all the columns of a VO to Excel

    Hi,
    I have one Advanced Table with 4 columns. But the associated query contains 6 columns.
    I have one Export to Excel button on the table.
    I need to export all the columns fo the VO to the Excel once click on the Export to Excel button.
    SO along with the 4 columns of the table i need to display the extra columns also which the VO contains.
    Quick response appreciated.
    Regards,
    Palepu.
    Edited by: Palepu on Aug 2, 2011 12:22 AM

    When I set the FND:Diagnostics profile option , I could see what was the exact error . It was SQL Wrapper exception error.
    The VO which is extended , has a dynamic where clause with bind variables. The binding style of the extended VO does not match with seeded VO. It works when the binding style is changed.
    Thanks,
    Thavam

  • Change the datatype of all the columns

    Oracle version 10g.
    I have a table with 150 columns.
    I'd like to change the datatype of all the columns in my table to varchar.
    Do we have a query for this task?
    Thanks.

    Not knowing yet what you'll answer to John:
    If your table is empty, you can use the datadictionary to generate a statement and execute it using dynamic SQL or spool the query to a file that does the DDL and run that...
    Example:
    MHO%xe> create table bla (col1 number, col2 number);
    Tabel is aangemaakt.
    MHO%xe> select column_name, data_type from user_tab_columns where table_name = 'BLA';
    COLUMN_NAME                    DATA_TYPE
    COL1                           NUMBER
    COL2                           NUMBER
    MHO%xe> declare
      2    l_sql varchar2(4000);
      3    l_sep varchar2(1);
      4  begin
      5    l_sql := 'alter table BLA modify ('||chr(10);
      6    for rec in ( select column_name from user_tab_columns where table_name = 'BLA')
      7    loop
      8      l_sql := l_sql||l_sep||' '||rec.column_name||' varchar2(50)'||chr(10);
      9      l_sep := ',';
    10    end loop;
    11    --
    12    dbms_output.put_line(l_sql||' )');
    13    --
    14    execute immediate l_sql||' )';
    15    --
    16  end;
    17  /
    alter table BLA modify (
    COL1 varchar2(50)
    , COL2 varchar2(50)
    PL/SQL-procedure is geslaagd.
    MHO%xe> select column_name, data_type from user_tab_columns where table_name = 'BLA';
    COLUMN_NAME                    DATA_TYPE
    COL1                           VARCHAR2
    COL2                           VARCHAR2

  • Report Column Attributes Does Not Display All the Column Names

    Good Morning,
    I have an interactive query Select * from table_name. I have to select * since my query returns well over 32k. I have 162 columns in the query. On the screen, all the columns are displayed; however, on the report tab, only about half of the columns are displayed. The rest are cut off. I need to be able to go into these field's attributes. Is this an APEX bug, or am I just missing something.
    Regards,
    Kelly

    Hello Tony,
    I can't break them out because APEX is limited to one interactive report per page. There is need to be able to do computations on the data, which interactive reports allows. The data is all statistical.
    Regards,
    Kelly

  • How can I display all the columns on the screen without scrolling from side to side?

    My clinic software has many columns. How can I display all the columns without having to scroll from left to right all the time?

    If the software you are using doesn't offer the ability to increase or decrease document size, as many do, then the only way is to increase your screen resolution. If that's not possible, maybe you can decrease your font size?  If you can't do any of these, I think you're out of luck!

  • How to see all the list of tables in APEX

    Hi
    COuld anyone of you help me find out how to see all the tables present in APEX ?
    I can see all the list of tables when i give the command : select * from tab
    But apart from finding like this , is there any way to find out all the list of tables ?
    Regards,
    Tasha

    Hi Tasha,
    For Apex 3.2 ;
    select * from dba_tables where owner in
    (select workspace from APEX_030200.APEX_WORKSPACES)
    tab is a synonym for user_tables
    http://www.oreillynet.com/pub/a/network/2002/10/28/data_dictionary.html
    hope this helps you
    regards
    mozkavra

Maybe you are looking for

  • Anyone manage to get ColdFusion to work under Apache on OS X 10.10 Yosemite?

    Hi all I'm having great difficulty getting ColdFusion10 to work under Apache with OS X 10.10 Yosemite. Here is a description of what I've faced and a little of what I've done to solve my problem Problem 1 Apache httpd.conf file gets messed up Solutio

  • BAPI FOR PARKING FI INVOICE

    All, Is there any BAPI  to park FI docuemnt in SAP nit MIRO ? Best Rgds SumaMani

  • Nice to have....

    Been using ADE for a while now and although I doubt anyone will consider them these are what I think needs to be added: 1 - Ability to search by PUBLICATION date - this way since the next one is highly unlikely at least you can work out the order of

  • Problème: Photoshop CC se bloque dès que j'essaie d'ouvrir un fichier :(

    Bonjour, Je n'arrive pas à utiliser Photoshop CC. J'ai Windows 7-64 bits. Intel Core 2.2 GHZ, RAM 8GHz J'utilise Creative Cloud, j'ai déjà Illustrator qui marche très bien. J'ai installer Photoshop, je me suis déconnectée et connectée. Je peux démarr

  • Searching within PDF text

    So here is what I have: Currently Bridge can search using the Quick Search and also with the "Find..." command for a more detailed search of metadata information. This is great for searching pictures, editing metadata, and saving searches to collecti