Ksh. Integer value splitted into two parts

Hi ,
I have code like below in my Ksh script, and getting the sample_id value as '2003 15588' instead of '200315588'
I'm using this sample_id to run an oracle report. Any help on why the value is getting splitted into two parts like 2003 15588.
if (( CHECKS == 0 )) || (( CHECKS == 1 ))
then
V_SAMPLE_ID=$( $ORACLE_HOME/bin/sqlplus -S / <<EOF
whenever sqlerror exit 1 rollback;
whenever oserror exit 1 rollback;
--Set up pagesize parameters.
set newpage 0;
set space 0;
set echo off;
set pagesize 0;
set heading off;
set verify off;
set feedback off;
set trimspool off;
set termout on;
set colsep "";
set linesize 5;
select substr(SAMPLE_ID,1,15) from sample_m
where NAME=$MFGLBL and TVALUE=$C_SAMPLE;
exit;
EOF
v_count=$?
print "V_SAMPLE_ID: $V_SAMPLE_ID" >> $LOG_FILE
fi
Pls help . thanks.

Here the actual outputs,
from SqlPlus,
SQL> select substr(SAMPLE_ID,1,15) from nais_sample_attributes where NAME='MFG LABEL NUMBER' and te
xt_value ='9300141751';
SUBSTR(SAMPLE_I
200315588
used the same query in the script , only difference is name and text_value are
passing as variables.
from script log file,
/app/oracle/product/dev6i/bin/rwrun60 /app//reports/105.rep /@DB18 BATCH=YES DESTYPE=PRINTER DESNAME=nullprinter DESFORMAT=PDF P_SAMPLE_ID=20031 5588
in the script , when i tried ,
substr(SAMPLE_ID,1,5 ) it returns 20031 and
substr(SAMPLE_ID,1,6) it returns 20031 5.

Similar Messages

  • How do I save a long video clip which I've split into two parts; save it as two seperate clips?

    I've split a video about 25 minutes into two parts; now how do I save the parts separately (as two different clips)?

    smwproductions
    What version of Premiere Elements and on what computer operating system is it running?
    Do you want to export these two clips from the same Timeline? If so, you can selectively export them.
    Two critical details for this...
    a. Set the gray tabs of the Work Area Bar to span just the segment that you want to export
    and
    b. Have a check mark next to the option Share Work Area Bar Only in the export settings. Not all export
    choices have this option. But, it is a must have for this select exporting.
    You can set the gray tabs of the Work Area Bar with keyboard shortcuts...
    Move the Timeline Indicator to the beginning of the segment to be exported. Then as you hold down the
    Alt key of the computer keyboard, hit the left bracket key [
    Move the Timeline Indicator to the end of the segment to be exported. Then as you hold down the
    Alt key of the computer keyboard, hit the right bracket key ]
    The following is a quick look at the gray tabs and the Work Area Bar to which I am referring.
    This screenshot is from a Premiere Elements version earlier than 11, but it conveys the concept of gray tabs and
    Work Area Bar in the Edit area as well as the option Share Work Area Bar Only in the export settings.
    Please le me know if you have any questions or need clarification on any of the above.
    Thank you.
    ATR
    Add On...I am strictly an Elements Windows user. The same principles should hold for Premiere Elements Mac.
    Not sure how the Alt will translate for match in this keyboard shortcut - Option or something else?

  • In the itunes library, a single album appears to be split into two separate parts, how do i combine them?

    my itunes library has several albums that are split into two parts. one contains half of the album's songs and the other the other half. how do i combine these so the album only appears once in it's entirety?

    Generally setting a common Album Artist will fix things.
    For deeper problems see Grouping tracks into albums.
    tt2

  • Please help, I am trying to split a HD mp4 video into two parts using Quicktime 10.2

    Please help, I am trying to split a HD mp4 video into two parts using Quicktime 10.2, running Mountain Lion. I use trim then export but it doesn't give the movie option as a format. What would you suggest i do?

    I'm not sure why you're using a FAT32 drive, but using ExFAT instead of FAT32 would be a better overall choice as it doesn't have the 4 Gig limit.
    http://www.tech-recipes.com/rx/2801/exfat_versus_fat32_versus_ntfs/

  • How to split currency into two parts at dot

    Hi,
    I am working in ECC6.0.
    how can I split a currency field into two parts split at dot ( . )
    I cannot use SPLIT AT  for currency field. All FMs I found does not works for currency.
    Reagrds,
    Divya

    DId u check G_DECIMAL_PLACES_GET ?
    You can use this FM to find the decimal places in the currency .

  • How to split  the records into two parts

    Hi experts,
    I have a field with 75 char length, this field have records also, Now i want to split the field into two differnt fields. That means upto first 40 char goes to one field, from 41st char to 70 char goes to another field, for that how to split record into two parts.
    Plz advice this,
    Mohana

    Hi,
    Do the following:
    f1 = fsource(40).
    f2 = fsource+40(30).
    where fsource is the 70 character original string and target strings are f1 (length 40) and f2 (length 30).
    Cheers,
    Aditya
    Edited by: Aditya Laud on Feb 22, 2008 2:10 AM

  • Container hirearchy for splitting screen into two parts.

    I have the following requirement.
    I need a screen split in two parts. The left part will always contain a tree menu (JTree) and the right part will be loaded according to the node selected in the left part of the screen (i.e. JTree). I understand that I have to use JSplitPane for dividing the screen and the top level container should be JFrame. But I am not sure of the container hirearchy for both the JTree and the right part of the screen.
    regards,
    nirvan

    Based on that very limited description I would guess -
    -- in the left part, a JScrollPane containing a JTree
    -- in the right part, a JPanel with CardLayout, containing other JPanels with appropriate layouts and content. Or if the content is larger than the screen space available, you mat need to enclose the CardLayout panel in a JScrollPane too.
    db

  • Connect_by Parent split into two- causing issues

    I am creating a hierarchy solution, same old stuff parent having child and levels. I find the leaf and traverse all the way upto the top, assign it a group and sequence. Group id's are incrment of 1 starting with 1.
    I have a sitution where parent splits into two, when it split into two then one of the child should have the same group as parent but the other child should not be part of that group.
    I have two cursors first feeds second.
    CURSOR firstCursor
    IS
    SELECT AA
    FROM ER
    WHERE fk =100
    AND (AA NOT IN
    (SELECT BB
    FROM ER
    WHERE BB IS NOT NULL
    AND fk =100
    OR AA = BB);
    CURSOR secondCursor
    IS
    SELECT P.AA,
    P.BB,
    P.ER_id,
    CONNECT_BY_ISCYCLE ,
    LEVEL
    FROM ER P
    START WITH AA = v_column_name --(FEED FROM CURSOR FIRST GOES HERE)
    CONNECT BY NOCYCLE Prior P.BB= P.AA
    AND LEVEL <= 80 ;
    What I get is follows:
    AA (LEAF)          BB(PARENT)           CC_ID (group)
    U286                               100
    U287                U286               100
    U291                U287               100
    U292               U291               100
    U293           U292               100
    AA (LEAF)          BB(PARENT)           CC_ID (group)
    U286                               101
    U287                U286               101
    U290                U287               101
    What I want is :
    AA (LEAF)          BB(PARENT)           CC_ID (group)
    U286                               100
    U287                U286               100
    U291                U287               100
    U292               U291               100
    U293           U292               100
    AA (LEAF)          BB(PARENT)           CC_ID (group)
    U290                U287               101
    Edited by: Dinesh.Sharma on Mar 6, 2010 6:59 AM
    Edited by: Dinesh.Sharma on Mar 6, 2010 7:52 AM

    OK, I resorted to ORDER SIBLINGS BY this time ( gotta love 'trial and error' ;) )
    This will change the ordered output of your resultset a bit, but that way splitting uo the hierarchies correctly as desired seems like the simplest way.(I'm assuming a way to split up the hierarchies is of more importance here than the actual values for FK.)
    Using this data ( perhaps you made a typo for records 14/15?):
    SQL> select * from er;
    ER_ID AA    BB     FK
        1 U286          1
        2 U287  U286    1
        3 U291  U287    1
        4 U290  U287    1
        5 U292  U291    1
        6 U293  U292    1
        7 U295  U290    1
        8 U296          1
        9 U297  U297    1
       10 U298  U290    1
       11 U400          1
       12 U401  U400    1
       13 U402  U400    1
       14 U403  401     1
       15 U404  U403    1
       16 U405  U402    1
       17 U417  U405    1
    17 rows selected.You get:
    SQL> select /* 4. finally add rownumbers over new FK value */
      2         er_id
      3  ,      aa
      4  ,      bb
      5  ,      new_fk
      6  ,      row_number() over (partition by new_fk order by rn) new_rn      
      7  from ( select /* 3. sum splits to get FK values*/
      8                er_id
      9         ,      aa
    10         ,      bb
    11         ,      rn
    12         ,      sum(split_here) over (order by rn) new_fk
    13         from ( select /* 2. try to identify when to split using CASE and LAG */
    14                       er_id
    15                ,      aa
    16                ,      bb
    17                ,      lvl
    18                ,      lf
    19                ,      rownum rn
    20                ,      case
    21                         when  split_here = 1 then 1
    22                         when lag(lvl) over (order by rownum) >= lvl and lf = 0 then 1
    23                         when lag(lvl) over (order by rownum) = lvl
    24                          and lag(lf) over (order by rownum) = lf then 1
    25                       end split_here
    26                from ( /* 1. get an ordered resultset we can split on first */
    27                       select er_id
    28                       ,      aa
    29                       ,      bb
    30                       ,      level lvl
    31                       ,      connect_by_isleaf  lf
    32                       ,      case
    33                                when
    34                                  level = 1
    35                                then 1
    36                              end split_here
    37                       from   er
    38                       start with (bb is null or bb=aa)
    39                       connect by nocycle prior aa = bb
    40                       order siblings by er_id
    41                     )
    42              )
    43       );
    ER_ID AA    BB        NEW_FK     NEW_RN
        9 U297  U297           1          1
        1 U286                 2          1
        2 U287  U286           2          2
        3 U291  U287           2          3
        5 U292  U291           2          4
        6 U293  U292           2          5
        4 U290  U287           3          1
        7 U295  U290           3          2
       10 U298  U290           4          1
        8 U296                 5          1
       11 U400                 6          1
       12 U401  U400           6          2
       13 U402  U400           7          1
       16 U405  U402           7          2
       17 U417  U405           7          3
    15 rows selected.

  • The Same Album is Split Into Two On My iPod

    Okay this may be hard to explain but here it goes...
    I bought a CD, and imported it onto my iTunes library. No big deal. It imported fine. Then I tried importing it onto my 4th Generation iPod Touch (32GB). The album has 10 tracks, and it was split into two on my iPod. One album has all tracks 1-10, while the other has tracks 2-10. But when I search up the song on my iPod (on the songs list), it only comes up as one. I tried deleted the album that has tracks 2-10, but when I do, the tracks 2-10 on the other album get deleted, so I'm only left with Track 1.
    This is starting to get really confusing for me and I don't know what to do. In my iTunes library it comes up as one album, on iTunes when I look at my songs list it comes up as one album, and even on my actual iPod on the songs list, there's only 1 version of each song, but on the albums list, there's 2 versions of the same album.
    Please help! Thanks so much !!

    In iTunes on your computer right click on the songs and select Get Info and look at the sorting. From iTunes Help
    Tips for using song and CD info to organize your music
    You can edit information in the Info window to make it easier to find and sort items in your library. For example, you can:
    Group individual movements on a classical CD into one work by indicating the name of the work (for example, “Piano concerto in A Minor, Op. 54”) in the Grouping field.
    Group songs that are part of a compilation together in your library by clicking Details and selecting the checkbox next to “Album is a compilation of songs by various artists”.
    Identify the individual artists on a tribute album in the Artist field, and type “various” in the Album Artist field.
    Create your own genre category by clicking Details and typing the category in the Genre field.
    Change the order in which tracks on a CD play by changing the numbers in the Track fields.
    Create a Smart Playlist that includes only songs that are just the right speed for your workout by typing the number of beats per minute in the BPM field. For instructions, see Create a Smart Playlist.
    Identify a movie as a music video (click the Options button, and choose Music Video from the Media Kind pop-up menu).
    Identify an item that you imported from a CD as an audiobook, so it appears under Audiobooks instead of Music (click the Options button and choose Audiobook from the Media Kind pop-up menu). If you do this, iTunes also remembers your place in the audiobook.
    Enter custom sorting criteria for an item. Select the item, choose File > Get Info, click Sorting, and enter the custom text.

  • ORDERS Idoc splitting into two

    Hi,
       I have requiremnt where i need to Split Orders idoc into messages.
       1. Orders XML file  2.XML file only with control record fields.
    i have seen all the discssion on this and deceiced to implement the scenario as per
      /people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible   blog. But the problem is need to use two message types on the target side.. for splitting the message..
      ORDERS and Contrlo record Fields message type... i can't change the standard idoc.. 
      Can i add the Control record fields to Standard IDOC  in any way....   like exporting file...if so..
    tell me whether the Idoc will split into two messaged or not....
    Regards,
    Deep

    My doubt is in the mentioned blog target msg type was created one.. here i need to take with ORDERS idoc(ED in our case). I need to split the IDOC everytime when it triggers based on RCVPRN field value.. this value is always so there should be 2 values everytime.
    you will need to duplicate the IDOC at the target side to achieve this...if you are successful in doing the 0...unbounded thing for your IDOC....
    1) Duplicating:
    Duplicating is not Multimapping.....Multimapping is what you saw in the blog and duplicating is right-clicking on the node and choosing Duplicate Subtree....no two messages will be created in this process (duplicating).....
    2) Multimapping:
    it is used to create two (or more) different messages at the target end...
    Does it split into two message ( ORDERS XML and Control Record XML)
    No it wont split the IDOC into two messages.....
    So if your requirement is to have only one target message with seperate IDOC nodes..having ORDERS and Control data individually...then go for duplication method...apply the condition for RCVPRN to generate the nodes...
    If your req is to have two different messages at the target then use multimapping apply the condition for RCVPRN to generate the two different messages.....
    Hope it helps...
    Regards,
    Abhishek.

  • Macbook pro Freezes, Screen splits into two half, scrambled..

    Hi,
    Just bought a new Macbook Pro 15.4, 2 Ghz i7 processor, AMD Raedon HD 6490M 256 Mb Video, 4 Gb Memory...
    After Three days, whenever I try to play a video, in quicktime or vlc or just load a video song on virtual dj,
    the screen just freezes and splits into two. The Force quit doesnt work.
    The only thing that works is "Hold the power button for three seconds."
    Please help..
    Thank you

    I have the same issue. This began before I installed Lion OSx. Happens randomly and not connected to any particular application. Here are some screen shots. It happens at least two times a day and is getting very frustrating. Taking it to the genius bar this weekend.
    All I can say is that it began after i applied some major updates (most probably the ones to fix the freeze issues that were cropping up on these new macbooks when they were launched). This is only my observation.
    MacBook Pro 2011 March (Thunderbolt) i7 - 2.2 GHz.
    8 GB RAM

  • Alv output splitting into two rows when converting into excel sheet.

    Hi frends,
    I have alv report with 60 fields . The report output is coming currently .  But when i am exporting into excel sheet from the option local file--> speadsheet  each row is splitting into two rows including header in excel sheet.
    Please provide your valuable suggestions to avoid this.
    Regards,
    Ramu .
    Edited by: Ramu.K on Sep 8, 2009 5:59 PM

    Hi,
    Please use the grid option and with the Spreadsheet button (CntrShiftF7). Do  "Save as" and save it as excel. It should work.
    Regards,
    Pradyumna

  • HT1040 I have a full page photo in a iPhoto book that is splitting into two sections across 2 pages. Any ideas what the problem might be?

    I have a full page photo in a iPhoto book that is splitting into two sections across 2 pages. Any ideas what the problem might be?

    Have you selected the spread layout?
    If so change it to a single page full page layout
    LN

  • Dividing Genrated PDF no  of  pages into two parts

    Dear Friends,
    I have requirement in which i need to divide total number output pdf pages into two parts.
    E.g. If there are 10 pages Then   10 / 2 = 5
    Before generation of pdf file from smartform it automatically divide by 2 and then show these files.
    How to do this?
    Thanks & Regards,
    Ravi Grover

    Hi Rob,
    when you call the function module of the smartform you have the output parameter:
    DOCUMENT_OUTPUT_INFO-TDFPAGES
    It is the number of pages of the smartform.
    Then... you can call the funtion module of smartform two times  :
    1rst with the input field OUTPUT_OPTIONS-TDPAGESLCT from 1 to number of pages / 2
    2nd  with the input field OUTPUT_OPTIONS-TDPAGESLCT from  number of pages / 2 to number of pages
    And generate both pdf.
    Bye!

  • 1 album split into two

    Hi
    I have an album in iTunes 10.5.1 which is split into two, there does not appear to be an discernable diferences in the Get Info of the various tracks, so why does iTunes insist on splitting the album?
    Is there any way to tell iTunes that all the tracks are from the same album?
    Cheers.

    Thanks again for the reply,
    I've selected all the tracks then copied and pasted the name of the Artist in the Get Info- Sorting- Sort Artist, this seems to have done the trick. If this fails I'll play around with this option, but this is something that I would rather not do in the future so I appreciate your tip.
    Cheers.

Maybe you are looking for

  • Printing Date with Calendar Object

    I am trying to print the current date of a calender object in a mm/dd/yyyy format. When I call system.out.println(now.getInstance()); and scroll through the console, it shows DAY_OF_MONTH=29, YEAR=2006, MONTH=6 for July 29, 2006. I realize months are

  • HOW TO INCLUDE a LITTLE LOGO of your site in the browser bar

    All the website are having their logo appearing in the browser bar at the left hand side. I would like to incorporate a little logo to my website ( www.buscapartamentosbogota.com).Does anyone know how?

  • Display output (Fn+F7) failed

    Hi, I have T61(7663-12U) and I'm trying to switch a display via VGA cable but it didn't work. I tried Fn+F7 but no use. I use Ubuntu 10.04 for my operation system. Any idea will be appreciated. I need to use this laptop for my presentation soon!!

  • MASTERS IN SAP-ABAP.

    Hi, There has to be a  lot of people out there who might be having many questions about higher studies in SAP-ABAP. Please HELP us by guiding us. Assuming that all such people are engineering graduates or equivalent, I have some general questions abo

  • Type Conflict

    hi, i got below conflict when i am porting alsb project. {color:#ff0000}line 25, column 16: {err}XP0051: "{{color}<a href="http://www.w3.org/2001/XMLSchema" class="jive-link-external">{color:#ff0000}http://www.w3.org/2001/XMLSchema</a>{color}{color:#