SELECT seems to ignore a space

Hi:
I'm hoping someone can shed some light on this strange case.
A table is being loaded from a 3-party source. One column is a 5-digit identifier. For whatever reason a space is coming in as a 6th character. Let's ignore the fact that we can fix the problem on the in-coming load.
I know the field has 6 chars: the LENGTH(identifier) returns 6. The ASCII(SUBSTR(identifier,6,1)) returns 32.
The strange thing is, in TOAD if I SELECT from the table where identifier = '12345' (no space at the end), I receive records. It seems that there's an automatic TRIM being applied.
I understand there are several ways around the problem of the extra space, but I'm curious about what I'm seeing.
Any thoughts?
Thanks.

mchrist wrote:
A table is being loaded from a 3-party source. One column is a 5-digit identifier. For whatever reason a space is coming in as a 6th character. Well, most likely column you use to store 5-digit identifier is declared as string. You did not explain how data is loaded, but most likely there is number to string conversion involved using TO_CHAR. By default, TO_CHAR number conversion to string result will have minus sign on the left for negative numbers or space for 0 and positive numbers. You need to use FM format modifier to remove that space:
SQL> select '[' || to_char(12345,'99999') || ']' from dual
  2  /
'['||TO_
[ 12345]
SQL> select '[' || to_char(12345,'FM99999') || ']' from dual
  2  /
'['||TO_
[12345]
SQL>  Also, I assume you always want 5 character identifier string. Then you need to use 0 format element, not 9:
SQL> select '[' || to_char(123,'FM99999') || ']' from dual
  2  /
'['||TO_
[123]
SQL> select '[' || to_char(123,'FM00000') || ']' from dual
  2  /
'['||TO_
[00123]
SQL> SY.
P.S. Correct solution, IMHO, would be declaring column as NUMBER(5).

Similar Messages

  • I write both JPG and DNG files in the camera.   Camera is a Leica Monochrom.   Photo, unlike iPhoto, seems to ignore DNG files and only imports JPG files.   What am I missing here?

    I write both JPG and DNG files in the camera.   Camera is a Leica Monochrom.   Photo, unlike iPhoto, seems to ignore DNG files and only imports JPG files when both are present on the SD card.  JPGs are used for quick proofing on an iPad.    DNG RAW files are edited on a Mac Pro (2013).    Other than deleting the JPGs before importing images from the SD card,  is there any way to force Photo to select and import only the DNG images?

    Thanks Larry,
    I did see the J stacked in the lower left of the thumbnails but couldn't figure out how to get to whatever is below it.   How do you select R?  
    I use an iPad to do quick proofs of my images.   A JPG is good enough for a proof ( dust on the lens,  composition, blown out image, etc. ).   The iPad is JPG friendly and can load the images quickly.    Serious editing takes place on my Mac Pro with the DNG files.   I use the same workflow with the the Leica M 240.   iPhoto has been a quick and easy importer to the Mac capturing all of the metadata in the EXIF sidecar file ( location, date, time,  camera settings, lens type).  A quick scan in iPhoto for the "keepers" let's me export those worth editing to Lightroom/Bridge/Photoshop.  I typically shoot 50 images from three locations in a normal day.  If I'm lucky I'll get 1 worth real work to add to the portfolio.  

  • HT2357 So how does this work on Mountain Lion? I cannot seem to ignore the iTunes 11 updates, which now seem to appear every 5 minutes!!

    So how does this work on Mountain Lion? I cannot seem to ignore the iTunes 11 updates, which now seem to appear every 5 minutes!!

    Fantastic!  Didn't work at first so restarted App store and tried again.  This time it asked 'ignore update'.  All gone!

  • I have a 64GB iPad2 and selected to "Automatically fill free space with songs".... will it have to download that 60GB of music to my ipad everytime I sync?  It took about 8 hours to sync the music to it

    I have a 64GB iPad2 and selected to "Automatically fill free space with songs".... will it have to download that 60GB of music to my ipad everytime I sync?  It took about 8 hours to sync the music to it.
    I did this last night at 10pm thinking it would take 30 minutes to sync these 10,000 songs or so to my ipad to take up the 64 GB.  I went to bed because it was taking so long and woke up at 6am and it was just about to finish.  It finished around 630am.  So it took a good 8 hours to sync.
    I unhooked it and used it for an hour or so and then hooked it backup so that I could update a few apps on it.  When i did that it acted like it was re-adding all of those songs again and it took about 8 hours again to sync all the music.  Was that just a fluke because I made changes to the ipad?  or will it always calculate and then re-sync alllllllllllllllllll of those 10,000 songs?
    Thanks so much for any help!!!
    -Michael

    Anyone?

  • "record enable" buttons not showing up in Garage Band 10.0.3 (I have selected "show record enable"- a space in the track header opens up, but the button is not present.  Same with "input moniter".

    "record enable" buttons not showing up in Garage Band 10.0.3 (I have selected "show record enable"- a space in the track header opens up, but the button is not present.  Same with "input monitor".

    Look at all the posts in the forum from users with similar problems, it happened with the last Logic update.

  • How to install selected modules to save disk space?

    Rapidinstall installs all the modules of the Oracle Applications. But if we want to install only selected modules to save disk space (In R12 disk space requirment is 160+gb) how can we do it?
    Thanks and Regards
    M.A.Rahman

    If you really want to save space, install Vision 11.5.10.2, and upgrade the database to 10.1.0.5. Use the 10g tablespace rename feature to rename all APPS% tablespaces to some other name, can even just remove the APPS_TS from the tablespace names. Truncate applsys.fnd_ts_mig_cmds. The run OATM using uniform 64 KB segment size. The resulting database will be ~40GB, 30GB less than Vision from rapid install.
    Then upgrade to R12 via the procedure in Oracle Applications Upgrade Guide: Release 11i to Release 12 (zipped) B31566-01. The resulting footprint will be about 65 GB, almost 100GB smaller than R12 Vision from rapid install.

  • The size of your selected options exceeds the available space

    I am trying to install a brand new full version of Adobe Creative Suite 4 Web Premium.
    I am unable to proceed, as the install options window tells me "The size of your selected options exceeds the available space" with a red exclamation point.
    It says my options require 9.6GB of space.
    I am trying to install on my D Drive, which has 1.1 TB of available space. Yes, that's right, Terrabytes.
    Help!
    System: Intel Core2 Quad Q6600 @2.4 GHz, Windows Vista Ultimate 64 bit SP1, 4 GB RAM, system drive WD Raptor (75GB) and main drive (where I am trying to install CS4) is (6) 500GB seagate SATA hard drives in a 2.5TB RAID 5 array. Motherboard is a Gigabyte GA-P35-DQ6 and video is an Nvidia GEForce 8800GT (512 RAM). RAID controller is onboard the motherboard (Intel ICH8R)

    SOLVED!
    Bob and Peter, you nailed it.
    I had inadequate room on the C drive...I was down to only 5 GB of space.
    I cleaned up the desktop (The wife thinks that is a great place to store everything) and freed up my C drive so it had just over 10 GB of free space, and the red exclamation point went away. It is now happily installing onto my D drive.
    Ian, my C drive (system) is a Western Digital Raptor...10,000 RPM. They are really small (75GB) but really fast so that windows boots up really quick. It is a performance thing. My D is a RAID array for redundancy...as I cannot afford to lose my pictures, videos, and documents, etc. - and I always keep my program installs on D so as to keep the C drive speedy and un-cluttered - plus if and when windows gets corrupted (which it does once every couple of years for some reason), I can re-do it in 5 minutes with an image using Acronis True Image.
    Thanks to all of you for your ideas, and I am glad I got it solved. If any Adobe employees read this...you can at least throw in some nice paper manuals for the software. When software is $1600.00 I'm not real concerned about saving another tree - and you shouldn't be either...I'd rather have some paper manuals for reference when I buy a full retail package. So pump up the packaging please. Thanks!!!!
    Shane

  • SQL: Select seems to be ignoring WHERE conditions

    SQL Version:  2008 (not r2)
    Problem:  My Select statement seems to be unaffected by some of the conditions in the WHERE Clause.  For instance
    JCCD.Mth >= cutoffs.FiscalYear_FirstMonth (value '20130101') AND JCCD.Mth <= @WIPMonthCurrent (value '20130101')
    AND LTRIM(RTRIM(JCCD.Job)) = '71-' (see output and code below)
    SQL Code:
    declare @WIPMonthCurrent date  = '20130101'
    SELECT  
         JCCD.JCCo, JCCD.Job, JCCD.Mth, JCCD.Source, sum(JCCD.ActualCost) AS CostToDate
         , cutoffs.FiscalYear_FirstMonth, @WIPMonthCurrent AS WIPMonthCurrent
     FROM JCCD
     LEFT JOIN xcft_XAWP_FiscalPeriodCutoffs_ForWIPMonth() AS cutoffs ON JCCD.JCCo = cutoffs.GLCo
     WHERE
          JCCD.Mth >= cutoffs.FiscalYear_FirstMonth AND JCCD.Mth <= @WIPMonthCurrent
         AND JCCD.ActualCost IS NOT NULL OR JCCD.ActualCost <> 0
         AND JCCD.Job IN(SELECT JobNum FROM budxcWIPData_SQL WHERE WIPMonth = @WIPMonthCurrent)
         AND JCCD.JCCo IN(SELECT JCCo FROM JCCO WHERE udExcludeFromWIP <> 'Y' or udExcludeFromWIP IS NULL)
         AND LTRIM(RTRIM(JCCD.Job)) = '71-'
     GROUP BY
         JCCD.JCCo, JCCD.Mth, JCCD.Job, JCCD.Source
         , cutoffs.FiscalYear_FirstMonth
    OUTPUT:
    JCCo
    Job
    Mth
    Source
    CostToDate
    FiscalYear_FirstMonth
    WIPMonthCurrent
    1.00
       121-  
    1/1/2013
    JC CostAdj
    923.24
    1/1/2013
    1/1/2013
    1.00
       162-
    1/1/2013
    JC OrigEst
    0.00
    1/1/2013
    1/1/2013
    1.00
       114-
    1/1/2013
    PR Entry  
    436.53
    1/1/2013
    1/1/2013
    1.00
        71-
    2/1/2012
    AP Entry  
    83.55
    1/1/2013
    1/1/2013
    1.00
       128-  
    1/1/2013
    JC CostAdj
    11.96
    1/1/2013
    1/1/2013
    1.00
        71-  
    3/1/2014
    PR Entry  
    30,845.19
    1/1/2013
    1/1/2013
    1.00
        71-  
    12/1/2014
    PR Entry  
    335.50
    1/1/2013
    1/1/2013
    1.00
        71-  
    3/1/2014
    PR Entry  
    162.17
    1/1/2013
    1/1/2013
    1.00
        71-  
    8/1/2011
    PR Entry  
    2,548.98
    1/1/2013
    1/1/2013
    1.00
     50043-  
    1/1/2013
    JC CostAdj
    4,580.56
    1/1/2013
    1/1/2013

    I think the OR condition is throwing it off.. put that in paranthesis...
    declare @WIPMonthCurrent date = '20130101'
    SELECT
    JCCD.JCCo, JCCD.Job, JCCD.Mth, JCCD.Source, sum(JCCD.ActualCost) AS CostToDate
    , cutoffs.FiscalYear_FirstMonth, @WIPMonthCurrent AS WIPMonthCurrent
    FROM JCCD
    LEFT JOIN xcft_XAWP_FiscalPeriodCutoffs_ForWIPMonth() AS cutoffs ON JCCD.JCCo = cutoffs.GLCo
    WHERE
    JCCD.Mth >= cutoffs.FiscalYear_FirstMonth AND JCCD.Mth <= @WIPMonthCurrent
    AND (JCCD.ActualCost IS NOT NULL OR JCCD.ActualCost <> 0)
    AND JCCD.Job IN(SELECT JobNum FROM budxcWIPData_SQL WHERE WIPMonth = @WIPMonthCurrent)
    AND JCCD.JCCo IN(SELECT JCCo FROM JCCO WHERE udExcludeFromWIP <> 'Y' or udExcludeFromWIP IS NULL)
    AND LTRIM(RTRIM(JCCD.Job)) = '71-'
    GROUP BY
    JCCD.JCCo, JCCD.Mth, JCCD.Job, JCCD.Source
    , cutoffs.FiscalYear_FirstMonth
    Hope it Helps!!

  • Changing a mapplet select seems not to be working

    I am trying to change the mapplet select for the BOM Header extraction task. I've copied the mapping from the ORA R12 Adaptor to my custom folder and I've altered the mapplet in my custom folder. I've also copied the informtica task and workflow.
    In DAC I've pointed the task BOM Header to pick the task from my custom folder.
    Session Log says custom folder... but it seems that the mapplet is still running the original select. (I've changed the mapplet to limit the number of rows ROWNUM < 10 but I can see in DS table more than 400K records...
    Anything I am forgotting ?
    Txs. a lot.
    Antonio

    Sometimes the SQL in a mapping is ignored because there is a session SQL override in the workflow? In workflow manager, select workflow, select task, select tab mapping, select source qualifier, look at property "SQL Query".

  • Select in Finder by typing space

    I want to select a file in the Finder by typing the first few characters of the name, even if the name begins with a space... In Leopard I could use option-space. Any word on what to do in Snow Leopard? Option-space now seems to be "full-screen quick look".

    In System preference "Exposé & Spaces" I found no mention of option-spacebar (or any spacebar) in either of the panes. In "Keyboard > Keyboard Shortcuts" I find command-space and option-command-space, but no option-space. What next?
    Message was edited by: Gerald Edgar

  • SQL in Shuttle (DHTML_SHUTTLE) Seem to Ignore "order by" Substitution

    Using a literal "order by" in Shuttle SQL works.
    Using "order by :P1_My_OrderBy_Column" seems to happily ignore it. Using Debug does not reveal what happened.
    Your thoughts?

    Hi,
    This is not an APEX specific issue. Try running the following query in SQL*Plus
    SELECT *
    FROM emp
    ORDER BY :p_order_by_col
    It doesn't order the column. I found a few hits on Google about this, all suggesting to use a substitution string for the order by column (see Re: oci_bind_by_name and 'order by' clause in select statement? for an example). If you do this approach you should be aware that SQL injection could occur so you'll need to take all the steps to ensure that doesn't happen.
    Unfortunately I don't know why Oracle accepts the bind variable but doesn't process it (maybe you should post that question on the SQL forums.)
    Martin
    [http://apex-smb.blogspot.com/]

  • Tableview ignores leading spaces (please help!)

    Hello,
    I am new with BSP.
    I have a table with just text entries, some of these texts are entered in the table with leading spaces, I used Tableview to display the entries as is, but when it comes up on the web page, the leading spaces are ignore. 
    Could you give me advice on how to accomplish this, here's how it should look like on the tableview:
    Object                 Description
    12345                  Text description 1
    54321                       Text Description 2
    53451                       Text description 3
    45621                  Text description 4
    12334                        Text description 5
    Thanks for the help, any helpful answer will be rewarded.
    Edited by: Ricky Orea on Feb 6, 2008 8:29 AM
    Edited by: Ricky Orea on Feb 6, 2008 8:30 AM

    Hi Rick,
    this happens because web browsers condense white-space. You can use the non-breaking space ( ) element to force a space.
    Try this example..
    * Layout Section
    <%@extension name="htmlb" prefix="htmlb" %>
    <%
      data: t001t TYPE TABLE OF t001t,
            ref TYPE REF TO t001t.
      select * from t001t into TABLE t001t.
      loop at t001t REFERENCE INTO ref.
        do sy-tabix times.
          CONCATENATE ` ` ref->ltext into ref->ltext.
        enddo.
      endloop.
    %>
    <htmlb:content design="design2003" >
      <htmlb:page title="Test  " >
        <htmlb:form>
          <htmlb:tableView id    = "test"
                           table = "<%= t001t %>" />
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    Cheers
    Graham Robbo

  • I can't get video to loop exporting an OAM file and importing into Muse. Seems to ignore all triggers.

    I've tried everything I can think of, but triggers are ignored. I've tested in Safari and Firefox so far. Tested in Muse Preview. Tested in An. Nothing is paying attention to the trigger I have set up.
    I've used a label to get it to loop back to the beginning. I've used zero to get it to loop back. I've searched the web, YouTube, and here looking for answer none will fix this. No errors in the error box BTW. Been back to Lynda.com re-re-viewing videos. All seems fine, but it isn't.
    Website is here: http://www.moviesandfx.com. The animation on the home page is what I want to loop. It plays okay in Safari, has mixed results in Firefox. Not sure yet about IE, I'm on a Mac.
    I'd love to hear ideas to fix this. The workflow is An—>OAM export—>Muse "place"—>Muse publish to ftp.
    Thank you,
    Dan

    I'm having the same problem. I inserted the oam in Dreamweaver, where it loops forever in split and live view. As soon as I view it in a browser (Safari and Chrome), the looping is disabled. There are no console errors.

  • Netui:select seems to be broken in Portal 9.2

    Hi
    I have problems with the tag and I slowly think it might be a bug in the tag. The optionsDataSource attribute seems not to work anymore. It only puts the actual text '{pageFlow._options}' in the dropdown box. I tried to use it with the pageFlow and actionForm option but with the same result. I hope there is something I do wrong ;) Any help is very much appreciated
    on JSP page
    <netui:select dataSource="{actionForm.selections}" optionsDataSource="{pageFlow._options}"
    in JPFController
    public String[] _options = {"red", "green", "blue", "orange", "pink", "aqua", "black", "brown", "tan"};
    with setters and getters
    in formbean
    public static class SubmitForm extends FormData
    private String[] selections;
    public void setSelections(String[] selections)
    this.selections = selections;
    public String[] getSelections()
    return this.selections;
    }

    That did the trick ;\
    optionsDataSource="${pageFlow.selectOptions}

  • J2EE Agent seems to ignore scenario parameters

    Hi all,
    I'd appreciate if anybody can give me some hints on how to diagnose/solve this problem. I am running a scenario for a package with interfaces, procedures, etc.
    When the scenario is run from the Linux command line, it works ok. If the same scenario is called via the OdiInvoke web service, it seems to be ignoring the parameters passed in the call. For example, when called like this:
    /oracle/app/product/midtier/OraODI/oracledi/agent/bin/startscen.sh "SENDDATATOTARGET" 006 TESTING 5 \
    -NAME="OracleDIAgent" \
    -SESSION_NAME="Inbound" \
    "AMRINBOUND1.TransferNoReads=F"
    ... it works correctly (The AMRINBOUND1.TransferNoReads=F parameter is interpreted correctly). But if the same scenario is called via a service call like:
    <InvokeODIScenario_invokeStartScen_InputVariable>
    <part name="part1">
    <ns0:OdiStartScenRequest>
    <Credentials>
    <OdiUser>supervisorusername</OdiUser>
    <OdiPassword>supervisorpwd</OdiPassword>
    <WorkRepository>WL_WORKREP1</WorkRepository>
    </Credentials>
    <Request>
    <ScenarioName>SENDDATATOTARGET</ScenarioName>
    <ScenarioVersion>006</ScenarioVersion>
    <Context>TESTING</Context>
    <Synchronous>true()</Synchronous>
    <SessionName>Inbound</SessionName>
    <Variables>
    <Name>AMRINBOUND1.TransferNoReads</Name>
    <Value>F</Value>
    </Variables>
    <LogLevel>5</LogLevel>
    </Request>
    </ns0:OdiStartScenRequest>
    </part>
    </InvokeODIScenario_invokeStartScen_InputVariable>
    ...the parameter AMRINBOUND1.TransferNoReads is ignored and its default value is used. Please note that it's the same scenario being executed by the same agent, the only change is in the way the scenario is started (command line vs. web service call); so the problem must be in the web service call.
    This is running on ODI 11.1.1.5.1 and Oracle Weblogic 11.1.1.5.0 for Linux x64.
    Thanks for your replies!
    Jose
    Edited by: JR on Jan 10, 2012 6:01 PM
    Edited by: JR on Jan 10, 2012 6:04 PM

    Here's a solution:
    Instead of assigning the ODI parameters individually through BPEL assign operations, put the whole input to the startSCenRequest service call in an XML fragment. Different values for the ODI input parameters would require different XML fragments. Assigning the <Variables><Name></Name><Value></Value></Variables> elements through assign operations does not work.
    for example:
    <switch name="Switch1">
    <case condition="bpws:getVariableData('inputVariable','payload','/client:process/client:input') = *'F'* ">
    <assign name="prepareInputParams">
    <copy>
    <from><ns0:OdiStartScenRequest xmlns:ns0="xmlns.oracle.com/odi/OdiInvoke/">
    <Credentials xmlns="">
    <OdiUser>SUPERVISOR</OdiUser>
    <OdiPassword>#####</OdiPassword>
    <WorkRepository>WL_WORKREP1</WorkRepository>
    </Credentials>
    <Request xmlns="">
    <ScenarioName>PARAMETERTEST</ScenarioName>
    <ScenarioVersion>001</ScenarioVersion>
    <Context>DEVELOPMENT</Context>
    <Synchronous>true</Synchronous>
    <SessionName>Parameter Test</SessionName>
    <Keywords>WebService</Keywords>
    <Variables>
    <Name>AMRINBOUND1.RunStatus</Name>
    <Value>0</Value>
    </Variables>
    <Variables>
    <Name>AMRINBOUND1.AMRInbound2TransferNoReads</Name>
    *<Value>F</Value>*
    </Variables>
    <LogLevel>5</LogLevel>
    </Request>
    </ns0:OdiStartScenRequest></from>
    <to variable="InvokeODIScenario_invokeStartScen_InputVariable"
    part="part1"/>
    </copy>
    </assign>
    </case>
    <otherwise>
    <assign name="prepareInput2">
    <copy>
    <from><ns0:OdiStartScenRequest xmlns:ns0="xmlns.oracle.com/odi/OdiInvoke/">
    <Credentials xmlns="">
    <OdiUser>SUPERVISOR</OdiUser>
    <OdiPassword>#####</OdiPassword>
    <WorkRepository>WL_WORKREP1</WorkRepository>
    </Credentials>
    <Request xmlns="">
    <ScenarioName>PARAMETERTEST</ScenarioName>
    <ScenarioVersion>001</ScenarioVersion>
    <Context>DEVELOPMENT</Context>
    <Synchronous>true</Synchronous>
    <SessionName>Parameter Test</SessionName>
    <Keywords>WebService</Keywords>
    <Variables>
    <Name>AMRINBOUND1.RunStatus</Name>
    <Value>0</Value>
    </Variables>
    <Variables>
    <Name>AMRINBOUND1.AMRInbound2TransferNoReads</Name>
    *<Value>T</Value>*
    </Variables>
    <LogLevel>5</LogLevel>
    </Request>
    </ns0:OdiStartScenRequest></from>
    <to variable="InvokeODIScenario_invokeStartScen_InputVariable"
    part="part1"/>
    </copy>
    </assign>
    </otherwise>
    </switch>

Maybe you are looking for

  • Is the problem in my PSU? vol.2 ;)

    Hi guys.. thanks for your yeasterday's replies.. i have now used other PSU and i am still encountering the same problem. the PSU i used this time was only 300w but its specifications were: 3.3V 28A, 12V 15A, 5V 30A..  if ur are too lazy to look for t

  • View usage

    With the new webpage set up are they a way to tell the difference between a text and a pic under view my usage?

  • Real-time query build up

    Say there are 10 fields that are a combination of combo boxes and text fields that represent different columns from multiple tables in the database. Based on the what the user chooses say either 1 , 1+2, 1+3+4 etc would mean different queries with a

  • Swap columns in query

    Hi All,       We've a new query  that we are now using on a regular basis is missing a feature ability to swap columns in the query results pane. All of our original queries/workbooks allow the user to "Swap" Column headings with other column heading

  • Windows 7 Control Panel Display and Intel Graphics Media Control Panel Constantly

    I have a Nvidia NVS 5200 M running with Intel 4000 and Windows 7 on a Lenovo T430S. Whenever I load the Control Panel -> Display settings, I can see options just fine, but I click on any of the drop down menus and they appear for a second, then immed