How to convert VARCHAR to SMALLINT using DB2?

Hi, guys:
I am trying to do some comparison in my sql code:
A.mySmallInt = B.mySmallIntAsString
Unfortunately, mySmallInt is stored as 1, 2, 3, ..... while
mySmallIntAsString is stored as '1', '2', '3'......
I am wondering if there is a DB2 function that can directly
convert a string into an interger or vice versa?
thanks a lot

I believe you can use CAST(B.mySmallIntAsString AS DECIMAL).
Hi, guys:
I am trying to do some comparison in my sql code:
A.mySmallInt = B.mySmallIntAsString
Unfortunately, mySmallInt is stored as 1, 2, 3, .....
while
mySmallIntAsString is stored as '1', '2', '3'......
I am wondering if there is a DB2 function that can
directly
convert a string into an interger or vice versa?
thanks a lot

Similar Messages

  • How To convert mp4 to mp3 using itunes 11.1.3.8 for windows

    How To convert mp4 to mp3 using itunes 11.1.3.8 for windows

    pgyan wrote:
    How To convert mp4 to mp3 using itunes 11.1.3.8 for windows
    The normal situation would be wanting to convert .m4a (AAC or Apple Lossless) to .mp3 as these are both music file formats. The extension .mp4 is normally for a video file and iTunes itself will only convert music files from one format to another.
    For details on how to convert between music formats see http://support.apple.com/kb/ht1550
    If you want to convert the audio track of an .mp4 video to a .mp3 file then you are going to need to use a different utility.

  • How to convert varchar to int in MSSQL?

    Hi,
    I am using mssql. how can i convert varchar to int type.
    for eg.
    id (int) txt(varchar)
    1 ---------10
    2 ---------10a
    3 ---------10b
    i want to convert varchar to int. HOw? pls explain with query.
    Thanks
    edward

    "10a" wouldn't normally be considered a number. So what sort of number do you expect it to be?
    Other than that you can look at the substring and convert/cast functions.

  • How to convert columns into rows using  transpose function

    Hi
    anybody tell me how to convert columns values into rows using transpose function.

    Since BluShadow went to all the trouble to put it together, someone should use it.
    See the post titled How do I convert rows to columns? here SQL and PL/SQL FAQ
    John

  • How to convert XML into XSD Using Altova XML Spy

    Hi,
    How to convert XML file into XSD Using Altova XML Spy.
    I want to use that XSD as an External Def in my IR
    Regards
    Suman

    hi
    Following is the path where you could get the PDF's and zip file.
    https://www.sdn.sap.com/irj/sdn/howtoguides?rid=/webcontent/uuid/5024a59a-4276-2910-7580-f52eb789194b [original link is broken]
    please check out the following Heading, and at the bottom corner you will find the download option where you will get the zip file:
    How to Generate XSD Schemas from Existing MDM 5.5 Repositories
    You can download xomlite45.jar from sdn
    copy the jar file to your java installation location like c:>java in
    Java –jar xomLite45.jar MyFile.xml
    then you get correspondig MyFile.xsd
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/bf0e8a97-0d01-0010-f0a2-af3b18b7f4eb

  • Pocket Playlist- how to convert mp4 file to use on pocket playlist

    I have an mp4 video that i would like to use on my pocket playlist, but not sure how to convert the file?

    Hello Andy,
    I do not have an HP Pocket drive but according to the manual...
    The pocket acts as any other drive to store files on. Its the media player that you use that has to support the type of file you are playing.
    This is cut from the manual.
    "File types supported by HP Pocket PlaylistYour playback device may not support all of the following formats. If your playback device does not support a format, use the ArcSoft MediaConverter 7 computer application to convert (transcode) the files into a format that will play back on your mobile device.
    HP Pocket Playlist supports the following file formats:
    Video: .avi, .3gp, .flv, .m4v, .m4p, .mov, mp4, .mpeg, .mpeg2, .mpg, .ogg, .qt, .ts, .tts, .wmv
    Music: .aac, .ac3, .adts, asf, .lpcm, .m4a, .mp3, wav, wma
    Photo: .bmp, .gif, .jpeg, .png, .tiff, .tif
    You need to import files with the "Arcsoft Media Converter" which will convert the format for you.
    Here are the links to all the info for HP Pocket Drives.
    Using the HP Pocket Playist to Play Media Files
    Converting Media Files Using Arcsoft MediaConverter 7
    Hope it helps.

  • How to convert varchar to date datatype while insert or update in table

    Hai All
    I need to convert to varchar to date.
    I have two Tables T1,T2
    T1 Structure
    Code varchar
    Time varchar
    Date varchar
    T2 Structure
    Empname var
    Empcode var
    Intime date
    Outtime date
    Intrin date
    Introut date
    Att_date
    Now i need to move Time form T1 to T2 Intime,outtime,intrin,introut according some condition
    So now i need to convert Varchar to Date while insert or update
    I have tried something
    Insert into T1 (code,intime,att_date)values
    (code,To_date(Date||time,'dd-mon-yyyy hh24mi'),att_date);
    OR While update
    Update T2 set Outtime=To_date(Date||time,'dd-mon-yyyy hh24mi') where...
    I got an error Ora-01861
    Regards
    Srikkanth.M

    You didn't show any example of your date or time values, butyou might need to add a space between them, like
    To_date(Date || ' ' || time,'dd-mon-yyyy hh24mi')

  • How to convert jpeg to bmp using java code

    I want to convert a jpeg image to bmp image using java so that any coloured image can be converted to black&white using java. Is there any utility to accomplish this?
    Thanks in advance

    Try out this category on Esus:
    http://www.esus.com/javaindex/j2se/jdk1.2/javaawt/awtgraphics/2dgraphics/images/javaimagetypes/javaimagetypes.html
    Cheers,
    Joris

  • How to convert html to pdf using acrobat sdk 8.0?

    hi
    I am a beginner of acrobat sdk .
    I want to know How to use acrobat sdk 8.0 to convert html to pdf?
    herere some questions :
    1:How to support navigation inside PDF file that generated using acrobat sdk 8.0? For example: theres catalog in the top of HTML file, customer hopes can navigate inside the PDF file just like navigating inside the HTML file.
    2:How to support operating some controls in the PDF file that generated using acrobat sdk 8.0? For example: therere some drop down list and text box in HTML file, customer hopes can input text in the text box, click the drop down list to see available options in it just like in HTML file.
    Thanks in advance for any help and suggestion.

    Hello,
    I want a system to re-brand my 37 pages PDF for affiliates.
    I want a php dynamic link in the PDF online in order to personalize automatically the PDF for each affiliate. I need to change 2 links each time. The affiliate ID and the Paypal email (payment button) in page 36.
    Can you help?
    Please let me know
    Thank you
    Alex
    PS My system is online and i can give you the url if it helps.

  • How to convert varchar to timestamp

    in the db , i have a column indtalledDate with datatype varchar-- and value is like 'Thu Dec 20 07:33:20 PST 2012'. Now i need to convert this to timestamp format-->20-DEC-12 07.47.49.463000000 AM . how can i do?
    can anyone pls help???

    >
    hi..Thanks for the quick reply. yes it worked. Now i do need to determine the day in month, quarter span, month span,year start date and year end date..
    something like below:
    to_date(add_months(trunc(installeddate,'q'),3)-1) - to_date(trunc(installeddate,'q')) as quarter_time_span
    any idea how to do this?
    You already have an idea of how to do that
    select trunc(sysdate, 'yyyy') year_start,
       add_months(trunc(sysdate, 'yyyy'), 12) next_year_start,
       trunc(sysdate, 'q') quarter_start,
       add_months(trunc(sysdate, 'q'), 3) next_quarter_start,
       to_number(to_char(sysdate, 'dd')) day_in_month,
       trunc(sysdate, 'mm') month_start,
       add_months(trunc(sysdate, 'mm'), 1) next_month_start from dual
    YEAR_START,NEXT_YEAR_START,QUARTER_START,NEXT_QUARTER_START,DAY_IN_MONTH,MONTH_START,NEXT_MONTH_START
    1/1/2012,1/1/2013,10/1/2012,1/1/2013,20,12/1/2012,1/1/2013

  • How to convert JPEG - PNG images using java?

    Hi,
    Has anyone done this before?
    Can you provide me with a sample code or point me to the direction on how this can be done?
    Are there any existing Java technology that supports this?
    Most grateful. Thanks.

    It's should be easy using Java Advanced Imaging (JAI). Try this.
    import javax.media.jai.JAI;
    import javax.media.jai.RenderedOp;
    public class convert {
      static public void main(String[] args) {
        String inName = args[0];
        String outName = args[1];
        RenderedOp source = JAI.create("fileload", inName);
        JAI.create("filestore", source, outName, "PNG", null);
        System.exit(0);
    }

  • How to convert VHS to DVD using FCP 7?

    Hello. For a brief, non-technical, introduction: I have dozens of family VHS tapes that I'd like to convert into a digital format where I can edit them and eventually transfer them onto an external hard drive and possibly DVDs as well. Ideally, I'd love to do all of the logging, capturing, and editing in FCP, but I am having difficulty figuring out set up and proper format conversions to obtain the best results. I am not a computer wizard, so a "Just-For-Dummies" walk through would be greatly appreciated.
    My questions are:
    1) What should my flowchart of devices be from VCR to FCP? (ie: converters, cables, inside FCP setup)
    2) What is the best video format for VHS to digital conversion?
    Here are the specs for devices I currently possess. I realize I may need to purchase more, but this is what I have to work with at the moment.
    MacBook Pro: Mac OS X Version 10.6.8. | Processsor 2.4 GHz Intel Core i5 | Memory 4GB 1067 MHz DDR3
    Final Cut Pro 7.0.3
    VCR: Toshiba SD-v295ku (output is Red, White, Yellow RCA)
    ION Video 2 PC converter: RCA cables to USB (this is already installed on my Mac and has successfully worked for video capture alone)
    Sony Digital Handycam DCR-TRV330
    My Passport 2TB Hard Drive
    Thank you so much in advance for any help you can offer.

    Buppas
    Getting out of my depth here a bit.
    I do have FCP 6 but have not used it much at all.
    There are many people here that are more able than me who may come to your rescue but anyway here are a few suggestions to try.
    Sony can be set to one of 2 audio modes, 12bit=32kHz, or 16bit=48kHz.Ensure set to 16bit , around page 85.
    Capture has to match 16bit=48kHz.
    In FCP7 User Preferences >General check box "Abort capture on dropped frames.On timecode break Make New Clip ".
    Also in Preferences> General I noticed this but not sure if it will help...Check box "Sync audio capture to video source if present".
    Coming back to the Sony, and still stabbing in the dark, there is a Time Base Corrector (TBC) setting that you could try both on and off.
    Also,do not start and stop the VHS player frequently; let it run through from start to end if you can to avoid breaks.
    Another option but not ideal.
    What happens when you import into iMovie, do you still get out of sync?
    If you dont then you could import to iMovie and then import the DV file/files to FCP7.
    This will not take up double the space as FCP7 references the files in iMovie.
    Other than this you could try a "search communities" or hope for more suggestions to come in.
    Good Luck.

  • How to convert varchar to BLOB in oracle 10g?

    Hi all,
    I have 2 columns A and B which are of varchar2(2000) dataype.
    I would like to concatinate these 2 columns and convert them into BLOB in oracle 10g.
    Any help is appreciated.
    Regards,
    Ravi

    don't use BLOB to store large text, use CLOB instead
    anyway:
    SQL> create table test
      2  (txt varchar2(10)
      3  ,other varchar2(10)
      4  );
    Table created.
    SQL>
    SQL> insert into test values ('some text', 'other text');
    1 row created.
    SQL>
    SQL> create table test2
      2  (col blob)
      3  /
    Table created.
    SQL>
    SQL> insert into test2
      2  select utl_raw.cast_to_raw (txt||other)
      3    from test
      4  /
    1 row created.
    SQL> select *
      2    from test2
      3  /
    SP2-0678: Column or attribute type can not be displayed by SQL*Plus
    SQL>
    SQL> select utl_raw.cast_to_varchar2(col)
      2    from test2
      3  /
    UTL_RAW.CAST_TO_VARCHAR2(COL)
    some textother text
    SQL>
    SQL> drop table test
      2  /
    Table dropped.
    SQL> drop table test2
      2  /
    Table dropped.

  • How to convert data type while using @variable function

    Hi Gurus,
    I have a query.
    i have created a Derived Table and the statement is given below.
    select 1 as SENSITIVITY_LEVEL,1 as SUBSENSITIVITY,@variable('US_T') as NITEMS, ...........
    here  in @variable('US_T') "US_T" is hard coded value. I want to change to data type of hard coded value as numeric or integer
    i am using sap BI 4.0 universe design tool.
    Thanks in Advance.
    Regards,
    Jeet

    Hi Jeet,
    Since it is text you can't convert into number.
    Can you please let mw know the exact requriement of yours?
    why you need this
    Thanks,
    Swapnil

  • How to convert varchar to date?

    Hello everyone, I'm new to OBIEE and I'm running into a roadblock...
    I have a date that is stored in a varchar2 column in the physical table, like so: 20071225
    Silly I know, but that's what I'm dealing with.
    Anyway, I want to create a logical column in the business model (using the Administration tool) and convert it to a date so that I can do date arithmetic with it, but TO_DATE doesn't seem to be supported.
    In Oracle SQL would do this (I'm using XE):
    SELECT SYSDATE - TO_DATE('20050101', 'YYYYMMDD') FROM DUAL
    Is there any way to accomplish this same thing in the OBIEE? I see the CAST function, but there doesn't seem to be any way to cast a string to a date?

    The original post is 4 years old - I am sure the poster must have figured it out by this time... obiee 11g supports a To_Datetime function though! thanks!

Maybe you are looking for

  • How can I store history of certain websites for ever?

    So I like to read Manga but I keep forgetting which chapter i am on of the manga in question, i got 10's of manga on my current read list that get now and then updated. And firefox deletes the history after so many pages doesn't it? I get the feel it

  • [SOLVED] Chromium updated to 24.0.1312.52 (175374), no mouse wheel

    Just updated Chromium to version 24.0.1312.52 (175374) and the mouse wheel can't scroll anymore, had to install an extension for middle-click to be able to scroll again, anyone else with this problem? Last edited by bmanuel (2013-01-11 10:25:24)

  • Email Settings: Gmail

    I use my iPod Touch 5th Gen to check email when away from home.  My email account is with Gmail.  I primarly use my pc (MS Outlook 2013) for my email processing.   Prior to my hard disc drive failure, when I checked email on my iPod Touch, only unrea

  • Is it Time.....this is the Question?  Opinions Please

    Is it time...this is the question? Every 3 or 4 months since the release of Leopard I ask myself this question. I've been using Apple's Tiger operating system since it was released and I've been extremely happy with it and more to the point so has my

  • Selecting multiple rows in datatable

    Hi all, i want to select multiple rows in datatable using checkbox or radiobox.. after selecting more than one row, user will click on "add" button and that list will be maintained by array. but i can't figure out how do i select multiple entries...