Using When COL1 like 'XYZ%'   in sqlldr controlfile

Hi
i noticed that WHEN clause in the controlfile only takes = and !=
can i use WHEN COL1 LIKE 'XYZ%'
Thanks

Instead of using LIKE operator, you can use the position number to match the alphabets in position. I know its just a workaround but sqlldr doesn't provides those enhancements currently.
check the below link
Re: SQL Loader When Clause

Similar Messages

  • Two cols index used when "col1=:1" but not when "col1 is null"(same cardin)

    Hi everybody,
    here is my test case (Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bi):
    DROP TABLE TEST;
    CREATE TABLE TEST AS SELECT RPAD('X',100,'X') X, (CASE WHEN MOD(ROWNUM,10)=0 THEN CAST(NULL AS NUMBER) ELSE MOD(ROWNUM,10) END) Y, ROWNUM Z FROM DUAL CONNECT BY LEVEL<=10000;
    SELECT Y, COUNT(*) FROM TEST GROUP BY Y ORDER BY 1;
    create index test_idx on test(y,z);
    exec dbms_stats.gather_table_stats(ownname=>'&_USER', tabname=>'TEST', method_opt=>'for all columns size REPEAT', cascade=>true, no_invalidate=>false);
    select * from (select z from test where y=1 order by z) where rownum <= 10;
    select * from (select z from test where y is null order by z) where rownum <= 10;So there are 1000 records per Y column value:
    SQL> SELECT Y, COUNT(*) FROM TEST GROUP BY Y ORDER BY 1;
             Y   COUNT(*)
             1       1000
             2       1000
             3       1000
             4       1000
             5       1000
             6       1000
             7       1000
             8       1000
             9       1000
                     1000
    10 filas seleccionadas.So, what I don't undertand is why in the second query from below, the index is not used:
      select * from (select z from test where y=1 order by z) where rownum <= 10
    Plan hash value: 2425049421
    | Id  | Operation          | Name     | Starts | E-Rows | Cost (%CPU)| A-Rows |   A-Time   | Buffers |
    |*  1 |  COUNT STOPKEY     |          |      1 |        |            |     10 |00:00:00.01 |       3 |
    |   2 |   VIEW             |          |      1 |     10 |     2   (0)|     10 |00:00:00.01 |       3 |
    |*  3 |    INDEX RANGE SCAN| TEST_IDX |      1 |     10 |     2   (0)|     10 |00:00:00.01 |       3 |
    Predicate Information (identified by operation id):
       1 - filter(ROWNUM<=10)
       3 - access("Y"=1)
      select * from (select z from test where y is null order by z) where rownum <= 10
    Plan hash value: 2549875903
    | Id  | Operation               | Name | Starts | E-Rows | Cost (%CPU)| A-Rows |   A-Time   | Buffers |  OMem |  1Mem | Used-Mem |
    |*  1 |  COUNT STOPKEY          |      |      1 |        |            |     10 |00:00:00.01 |     161 |       |       |          |
    |   2 |   VIEW                  |      |      1 |   1000 |    43   (5)|     10 |00:00:00.01 |     161 |       |       |          |
    |*  3 |    SORT ORDER BY STOPKEY|      |      1 |   1000 |    43   (5)|     10 |00:00:00.01 |     161 |  9216 |  9216 | 8192  (0)|
    |*  4 |     TABLE ACCESS FULL   | TEST |      1 |   1000 |    42   (3)|   1000 |00:00:00.01 |     161 |       |       |          |
    Predicate Information (identified by operation id):
       1 - filter(ROWNUM<=10)
       3 - filter(ROWNUM<=10)
       4 - filter("Y" IS NULL)Any clue?
    Thanks.
    Joaquin Gonzalez

    Hi,
    Null values are not stored in the index, so if you use "col is null" as a predicate there is no entry on the index and so no pointer to the actual row hence the full table scan.
    If you query USER_INDEXES and look in the DISTINCT_KEYS column for your index, you should see that there are only 9 keys.
    e.g.
    SQL> create table nt as
      2  select decode(m, 0, null, m) v from
      3* (select mod(level,10) m from dual connect by level <= 10000)
    SQL> /
    Table created.
    SQL> select v, count(*) from nt group by v order by v ;
    V                                          COUNT(*)
    1                                              1000
    2                                              1000
    3                                              1000
    4                                              1000
    5                                              1000
    6                                              1000
    7                                              1000
    8                                              1000
    9                                              1000
    *NULL*                                         1000
    10 rows selected.
    SQL> create index nt_i on nt (v) ;
    Index created.
    SQL> analyze table nt compute statistics
      2  /
    SQL> select distinct_keys from user_indexes where index_name = 'NT_I'
    SQL> /
    DISTINCT_KEYS
                9Edited by: Steve_B on 06-Jul-2009 02:30

  • When to use REUSE/SET, NO-ARCHIVELOGS in create controlfile in HOT BACKUP?

    I am a trainee Oracle DBA and have the following queries. Kindly reply with detailed explanation as I want to get my concepts cleared!
    Q1>> While doing a user managed hot backup, when we are creating a control file(CREATE CONTROLFILE) from trace for recovery when do we use the create control file with the following options:
    *1. REUSE / SET*
    *2. ARCHIVELOGS / NOARCHIVELOGS*
    Q2>> In what scenarios do we re-create the control file while recovering datafiles from a hot backup??
    Thanks a tonne!
    Regards,
    Bhavi

    Hemant K Chitale wrote:
    1.1 It is not "REUSE/SET". These are two very different clauses.
    REUSE is when you want the CREATE to overwrite the existing controlfile(s). If the controlfile(s) {as named in the instance parameter file, initSID.ora or spfileSID.ora} is/are already present, the CREATE fails unless REUSE is specified.
    SET is when you want to change the database name. Oracle then creates the controlfile(s) with the specified database name and updates the headers of all the datafiles. If you run a CREATE with a database name that is different from that in the datafile headers, the CREATE fails unless you include a SET to specify that the name must be changed. Note that this also means that the name in the instance parameter file must already have been updated.
    1.2 ARCHIVELOG/NOARCHIVELOG is to set the database state. The same is achieved by issuing an "ALTER DATABASE ARCHIVELOG/NOARCHIVELOG" when the database is MOUNTed but not OPEN.
    2. You'd run the CREATE CONTROLFILE if you do not have a binary backup of the controlfile.
    Optionally, you can also use CREATE CONTROLFILE to rename all the datafiles by specifying the new locations of the datafiles -- the datafiles must already be present in the new locations, else the CREATE fails if it doesn't find a datafile that is included in the list of datafiles included in the CREATE statement.
    RMAN is the correct way to run Backups. User Managed Backup scripts are used in cases like Storage-based Snapshots / SnapClones / BCV.
    Hemant K ChitaleThanks that was really helpful..One last question when to use the resetlogs/noresetlogs clause in the create controlfile statement. I have noticed that at times it accepts resetlog while at times it accepts noresetlogs

  • I've recently started to use Numbers but when I try to sync to iCloud it asks me to create a new iCloud account. Problem is I already have one and that's the one I want to use. Looks like I have the same situation on my iphone. Any guidance? Thanks.

    I've recently started to use Numbers on my macbook pro but when I try to sync to iCloud it asks me to create a new iCloud account. Problem is I already have one and that's the one I want to use.
    Looks like I have the same situation on my iphone.
    The only option I'm being given is to create an lCloud account.
    Any guidance? Thanks.

    The last thing you want is a second iCloud account. Try logging out and back in in System Preferences. If that doesn't work, I'd get AppleCare on the line.
    Jerry

  • Just subscribed to Acrobat for $19.99/year to be able to use expanded pdf manipulation features. From left hand window I signed in successfully. However when I try to use a feature like export to Word doc I am sent to Web page to subscribe for more money.

    Just subscribed to Acrobat for $19.99/year to be able to use expanded pdf manipulation features. From left hand window I signed in successfully. However when I try to use a feature like export to Word doc I am sent to Web page to subscribe for more money.  I thought I had already paid for access to these features by subscribing for the $19.99? What features did this $19.99 allow me if NOT to edit or export PDF files?

    Please check the name of what you subscribed to. You say "Acrobat" but that isn't $19.99/year. Unfortunately Adobe have products which do the same thing and need to be used in different ways.

  • How to use WHEN clause in sqlldr

    I want to insert RECORDS in table which are having orgno column values greater then 100 in my datafile using sqlldr.
    In WHEN clause in my control file if i mention WHEN (orgno > '100')
    it gives me error :
    Illegal combination of non-alphanumeric characters
    WHEN (orgno < '500')
    ^
    I am able to insert records when i use WHEN (orgno = '100') but not when i use > or < sign.
    what to do???

    Hello user8531525.
    "The supported operators are equal (=) and not equal (!= or ne)"; replace the ne with less than and greater than signs. (http://www.mcs.csueastbay.edu/support/oracle/doc/10.2/server.102/b14215/ldr_control_file.htm)
    Your filtering will need to be performed on the file itself or on the records after they are loaded. If your file is local to your database, consider using External Tables.
    Luke
    Please mark the answer as helpful or answered if it is so. If not, provide additional details.
    Always try to provide create table and insert table statements to help the forum members help you better.
    Edited by: Luke Mackey on Aug 5, 2010 2:58 PM

  • Is there anyway to find a new font on Pages for iPad? The letters are hard like a rock when you use foreign languages like Thai. The fonts on device do not support foreign language.

    Is there anyway to find a new font on Pages for iPad? The letters are hard like a rock when you use foreign languages like Thai. The fonts on device do not support foreign language.

    varat_pond wrote:
    Anyone in Apple if you see this message
    These are user to user help forums.  To tell Apple you want more fonts for Thai, go here:
    http://www.apple.com/feedback/ipad.html
    But I suspect this is likely one of those things for which you will always have to use a full computer rather than a iPad.

  • After I upgraded my Mac with Yosemite, Photoshop Elements 12 stops responding when you use editing tools like eraser, clone stamp.

    After I upgraded my Mac with Yosemite, Photoshop Elements 12 Editor stops responding when you use some tools like eraser, clone stamp.

    This should help. Photoshop Elements doesn't respond when you use editing tools in Mac OS X 10.10
    ~ Arpit

  • I would like a refund now. I bought this service this morning and it does not work as advertised. Reliable is not what I would use to describe this product. Cancel my subscription/refund my money and send me an email to the address I used when I signed up

    I would like a refund now. I bought this service this morning and it does not work as advertised. Reliable is not what I would use to describe this product. Cancel my subscription/refund my money and send me an email to the address I used when I signed up.

    Hi,
    I just checked your account.
    Your Adobe Export pdf service has been cancelled & refunded.
    Regards,
    Florence

  • 10.9.4: Graphical errors when using OSX functions like Mission Control, Spotlight

    Device: MBP 15" Retina 2.3 GHz Intel i7
    OSX: 10.9.4
    Monitor: 27" Thunderbolt Display
    Issue: When using OSX functions like Mission Control (Expose) and spotlight, I frequently get graphical errors that remain on the desktop unless I reset the computer. I can resolve the issue by adding a new desktop and dragging my windows over.
    This happens almost every day.

    You have installed all these non-Apple system modifications:
    Kernel Extensions: ?
      [loaded] at.obdev.nke.LittleSnitch (4052 - SDK 10.8) Support
      [loaded] com.nvidia.CUDA (1.1.0) Support
      [loaded] com.promise.driver.stex (5.2.7 - SDK 10.9) Support
      [not loaded] com.silabs.driver.CP210xVCPDriver (3.0.0d1) Support
      [not loaded] com.silabs.driver.CP210xVCPDriver64 (3.0.0d1) Support
      [not loaded] com.wacom.kext.pentablet (5.2.6) Support
      [not loaded] com.wacom.kext.wacomtablet (6.3.8 - SDK 10.9) Support
    Litlle snitch has been a bad actor for some users.
    You do not have any CUDA Hardware, so the CUDA Driver is not needed.
    I do not know what siLabs driver thinks it may be driving.
    You left the door open:
    Gatekeeper: ?
      Anywhere

  • I'm trying to read some XML data from temperature logger over my network. I'm using LabView version 2009 sp1. I'm using the URL Get Document Vi. It works fine when using Internet sites like google or foxnews etc...

    I'm trying to read some XML data from temperature logger over my network.  I'm using LabView version 2009 sp1.  I'm using the URL Get Document Vi.  It works fine when using Internet sites like google or foxnews etc...
    When I use it with my temperature logger most of the time I get an Error 66...but some times it does work and actually retrieves the document. 
    I can use the same address "http://172.22.21.68/XMLfeed.rb" (Internet Explorer or Google Chrome) in my browser and get a response every time.  When accessing from my browser the server in the temperature logger does take around 6 seconds to respond, but it does respond every time. 
    Is the URL Get Document Vi exceeding a timeout?  If so, where can I set it to wait longer?
    Attachments:
    Error 66.jpg ‏183 KB

    It looks like the TCP Buffered Read has a 2.5 sec timeout, I believe that is where I had trouble as well.  Try creating your own URL Get HTTP Doc vi in which you call URL Get Document in normal mode, with an appropriate number of characters to fetch (enough characters so that you capture all the important data in the XML file).
    Attachments:
    ex1.PNG ‏33 KB

  • Why iPad2 has now an ugly design on the music labrary. it used to be like itunes library on the PC. it's not artistic at all that design. how can i get the other design back to my ipad 2?

    Last August 2011 I purchased an ipad2 and the music labrary design used to be like iTunes labrary that we have on our PC. But last Dec, 5th 2011 I was downloaded songs from my PC iTunes labrary to my iPad2, then everything were restored and i lost all my apps. I retreived my app but the music labrary design changed to the very ugly design instead of the original iTunes labrary I used to have. and on the logo changed from iPod logo to just music logo.
    This new music labrary design is so ugly and no artistic at all. no professional at all.
    I am wondering if somebody can help me to find back my iPod logo and iTunes labrary design I used to have on my iPad2 when I purchased it, Please.
    Thanks in advance for whomever will help.

    There is no iPod App anymore. the Music App took it's place. There is nothing that you can do about the way it looks and you can't change the features in the app.
    You can send feeback to Apple about any changes that you would to see them implement.
    http://www.apple.com/feedback/ipad.html

  • Can I use a MacBook like a Mac Mini? How would I power it on?

    Is it possible to use a MacBook like a Mac Mini when I'm at home, with it plugged into a monitor? I've seen pictures of people using theirs when the MacBook is closed, but how would you power it on? If it's turned off, can it be powered on with the remote? And if not, how would I turn it on without opening it? I don't much fancy leaving it in sleep mode all the time.

    Basically, you have to use sleep mode, either
    with a USB keyboard and/or mouse
    http://docs.info.apple.com/article.html?artnum=86286
    or with bluetooth
    http://support.apple.com/kb/HT1308
    You can use the Energy Saver preferences to set up schedules for automated shutdown (at night), startup (in the morning), and sleep (when idle) settings.
    If it's powered off, just open the lid and power it up, then close the lid again, or get a laptop stand and use both the built-in display and the external display at the same time in extended desktop mode, if you have the desk space.

  • Is there a way to affect the URL used when running a report subscription?

    We are using SQL Server 2008 R2.  I am finding out that when running a report subscription to extract a file in csv format, an extra blank line is created at the bottom (i.e., extra line feed), and the mysterious BOM characters also get inserted at
    the beginning.  Both of these "features" are causing problems with a client's import of these files.  Of course, it affects multiple clients.
    I have done some research and have found information on how to edit the rsconfigserver file to render CSV files using ASCII and to not use Excel formatting.  This removes both "features"/problems stated above.
    However, editing the server config file will affect all csv extractions on that report server.  Is there a way to control the URL of a specific report subscription to include these values (so only the reports that need the fix get it)?  For example,
    someone gave this URL as an example of how to add parameters including encoding in the URL.   http://MyReportServer/ReportServer?%2fReport+Folder%2fReportName&rs:Command=Render&rs:Format=CSV&rc:Encoding=ASCII
    Is there a way to have the report subscription run the report using a URL like this so it extracts it without the BOM characters?  I was thinking a data driven subscription would allow me to set the values like this, but these parameters are only pertinent
    AFTER the report is run and only needed for the final rendering.  Not sure how to do this. Maybe it's not possible. If it's not, that's fine.  I just need to write a proposal to our DBA's to talk them into making a couple edits to the server config
    file.
    Has anyone ever worked around this before in SSRS?
    Thank you!!
    Dana

    Hi DanaSSRS,
    According to your description, you want to have some report exported into CSV file with ASCII encoding when running a subscription. Right?
    In Reporting Services, when we run the subscription, it will call the Render Extension as we configured in rsreportserver.config file, we can't set the Render format with ASCII Encoding on subscription level. As you said, the Render Extension we configured
    in the rsreportserver.config will apply to all reports. In this scenario, you only want that extension apply to specific reports. For your requirement, we suggest you add a custom Render Extension in configure file. You just need to copy the CSV Extension
    and add a <OverrideNames/> to override a new name. Then set the <Encoding> in <Configure>. And you can select this custom Extension when creating the subscription. This might be the most effective workaround.
    Reference:
    Customizing Rendering Extension Parameters in RSReportServer.Config
    CSV Device Information Settings
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • XI 3.0 Which mapping to used when ? If choice is given to me...

    Hi
        Out of all mappings (Graphical message mapping ,Java Mapping,XSLT mapping,
         ABAP mapping).
         If choice is given which mapping i need to use? What are the conditions to
         go any specific mapping ?
         <u>Pls...expalin me all in detail</u>
    Adv thanx to all res...
    Regards
    Prasad

    Hi Prasad,
    There is no hard and fast rule for using the mapping techniques.
    <b>
    Graphical Mapping </b>is used for simple mapping cases. When, the logic for your mapping is simple and straight forward and it does not involve any complex logic.
    <b>
    Java and XSLT mapping</b> are used when graphical mapping cannot help you and you have multilevel hierarchy structure data.
    When the choice is between Java and XSLT, XSLT is simpler than java mapping and easier. But, it has its drawbacks. One among them being that you cannot use Java APIs and Classes in it. There might be cases in your mapping when you will have to perform something like a properties file look up or a DB lookup, such scenarios are not possible in XSLT and so, when you want to use some specific Java API's you will have to go for Java Mapping.
    Java Mapping uses 2 types of parsers. DOM and SAX. DOM is easier to use with lots of classes to help you create nodes and elements, but, DOM is very processor intensive.
    SAX parser is something that parses your XML one after the other, and so is not processor intensive. But, it is not exactly easy to develop either.
    To know more about each of them please go thru the following links. And if you ask me your which is better, it depends basically on the scenario you implementing and the complexity involved. Anyways please go thru the following links:
    Graphical mapping
    http://help.sap.com/saphelp_nw04/helpdata/en/6d/aadd3e6ecb1f39e10000000a114084/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/43/c4cdfc334824478090739c04c4a249/content.htm
    /people/bhanu.thirumala/blog/2006/02/02/graphical-message-mapping-150-text-preview
    http://www.sapgenie.com/netweaver/xi/mapping1.htm
    /people/alessandro.guarneri/blog/2006/01/26/throwing-smart-exceptions-in-xi-graphical-mapping
    XSLT mapping
    http://help.sap.com/saphelp_nw04/helpdata/en/73/f61eea1741453eb8f794e150067930/content.htm
    http://www.w3.org/TR/xslt20/
    JAVA mapping
    http://help.sap.com/saphelp_nw04/helpdata/en/e2/e13fcd80fe47768df001a558ed10b6/content.htm
    DOM parser API
    http://java.sun.com/j2se/1.4.2/docs/api/org/w3c/dom/package-frame.html
    ABAP mapping
    /people/r.eijpe/blog
    To know more about the value mapping tools for the SAP Exchange Infrastructure (XI), please go thru the following link:
    http://www.applicon.dk/fileadmin/filer/XI_Tools/ValueMappingTool.pdf
    To get an idea as to what value mapping is, please go thru the following links:
    http://help.sap.com/saphelp_nw04/helpdata/en/13/ba20dd7beb14438bc7b04b5b6ca300/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/f2/dfae3d47afd652e10000000a114084/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/2a/9d2891cc976549a9ad9f81e9b8db25/content.htm
    most of the links that I have provided also helps you get the step by step procedure of doing the same. And also involves the procedure to implement certain advanced features.
    And please go through this link which clearly explains the 3 types of mappings.
    /people/ravikumar.allampallam/blog/2005/02/10/different-types-of-mapping-in-xi
    Regards,
    Pooja

Maybe you are looking for

  • Saving preferred Shadow Text options in powerpoint 2013

    Hello, I'm trying to save my powerpoint format shape text options for shadow text, I see there are presets, but I am wondering would I be able to save a custom setting as a reset? This is under Format, Text effects, shadow, shadow options.

  • Can I place all my SQL's in one object?

    Hi, Is there a way to have a business component object where I can place all my SQL's and call methods off of it. A method that displays that selects all items in an item table Say.. I have a select where the 'where' clause will change upon user choi

  • Missing item category & material description in sales order screen

    Hi all, We have upgraded SAP from 4.6C to ECC 6.0 version. In the sales order screen (create, change & display mode) the item category & the material description cannot be seen at the item level in the ECC 6.0 version. The same appears in the 4.6C ve

  • Sample of webi mobi reports

    Hello, Does anybody has a simple sample of webi reports for mobile apps. I'm just started learning webi and would like to have samething to start with. Where can I get samples online? Thanks a bunch, Nelly

  • How do I download video to my iMac from a Sony Handycam?

    How do I download vido to my iMac from a Sony Handycam?  The Handycam comes along with PMBR software which is not compatible with Mac.  I have not had any luck just searching the net for my answer..  Thanks.