Doubt in LIKE.

Hi,
I have a doubt in like operator.
i have created a table and inserted few records by using the following sql statements.
CREATE TABLE james_sample1 (a VARCHAR2(20));
INSERT INTO james_sample1 VALUES(12);
INSERT INTO james_sample1 VALUES(123);
INSERT INTO james_sample1 VALUES(1234);
INSERT INTO james_sample1 VALUES(12345);
INSERT INTO james_sample1 VALUES(123456);
and i try the following query,
SELECT * FROM james_sample1 WHERE a LIKE '%_%';
and the above query returns all the records. but none of the columns has '_' in it.
can any body tell me why it behaves like this?
Thanks,
James

Hi James,
By SQL, the character '_' underscore with 'LIKE' means "any character, specific length" (as in the opposite of %, which means "any character, no specific length").
So, what you were asking is: give me the values that consist of any character of no specific length, followed by any character which is exactly 1 position long and then followed by any character(s) again. No wonder that all values come up...
Usually, you would use _ like this: where view_name like 'myview_'1, which would give back myviewA1, myviewB1, etc. But not myviewCCC1
Sometimes, the _ can be a problem, for example when you want all views with a name that begins with TEST_, but not TEST1. Then, use substr(view_name,1,3) = 'TEST_', because _ only works like a wildcard with like.
Regards,
Sabine
Regards,
Sabine

Similar Messages

  • Doubt in like operator

    hi,
    select name from emp where name like'%a'
    select name from emp where name like'a%'
    select name from emp where name like'%a%'
    above the three statements what is the difference between putting % front,back,both.
    plese can anyone clarify my doubts

    Consider the below example:
    Table emp
    Column : name
    manoj
    ashutosh
    aniket
    kanya
    1. select name from emp where name like'%a' will give output as Kanya
    2. select name from emp where name like'a%' will give output as ashutosh and aniket
    3. select name from emp where name like'%a%' will give ouptut as manoj, ashutosh, aniket and kanya . As the third statement says where a matches in the string followed by Zero, one or more character same applies to string succeeded by by Zero, one or more.
    I hope this makes sense.
    ~Vinod

  • Autocad, 3DS Max and the like.

    A pre-thank you for your time and input.
    So I just bought an iMac, 21.5 inch with 3.6 intel core i5, 8 GB ram and the ATI Radeon HD 5670. I have a few questions, some for curiosity's sake and some for how to move forward.
    Essentially all the questions revolve around the need to use autocad and 3dsmax on my computer, and as of right now, in windows form. I understand that there is parallels, fusion, and boot camp, but I have heard conflicting information from the sales rep at the store and thought to ask before going forward.
    Does windows in Bootcamp give me access to standard file types saved from Mac OS, ie. can I listen to my mp3s while in windows? Can i pull up a jpg or a pdf if the file was saved from mac?
    Can the new Fusion or Parallels handle heavy programs like Max or Autocad or Photoshop?
    In fusion, if I set the amount of cores and ram for windows to use, does that mean that Mac OS cannot use that, and if so, even when Fusion is shut down and windows turned off?
    How much should I attribute to Windows for optimum speed?
    I have a trial version of Fusion and I want to experiment with Max etc, but if I install and need to uninstall is that going to make a mess of the Mac, or is that pretty straight forward?
    Lastly, assuming I didnt just make an *** of myself for buying this beautiful machine, should the configuration I bought really be suitable? I ask these questions mainly because the sales reps seemed to agree that it should be, but I then the last guy gave me doubts.
    Thanks again, Justin. PS. Sorry for length, it's just that in my experience with posts, its better to be clear from the onset. I hope I was.

    Hi Justin and welcome to Discussions,
    Provinch wrote:
    A pre-thank you for your time and input.
    So I just bought an iMac, 21.5 inch with 3.6 intel core i5, 8 GB ram and the ATI Radeon HD 5670. I have a few questions, some for curiosity's sake and some for how to move forward.
    Essentially all the questions revolve around the need to use autocad and 3dsmax on my computer, and as of right now, in windows form. I understand that there is parallels, fusion, and boot camp, but I have heard conflicting information from the sales rep at the store and thought to ask before going forward.
    Does windows in Bootcamp give me access to standard file types saved from Mac OS, ie. can I listen to my mp3s while in windows? Can i pull up a jpg or a pdf if the file was saved from mac?
    Yes to both. The Apple BootCamp Windows drivers allow read-access to the OSX partition from BootCamp Windows. For write access a third-party tool named MacDrive is needed.
    Can the new Fusion or Parallels handle heavy programs like Max or Autocad or Photoshop?
    I don't have/use neither Mac nor Autocad, so I really can't say.
    In fusion, if I set the amount of cores and ram for windows to use, does that mean that Mac OS cannot use that, and if so, even when Fusion is shut down and windows turned off?
    As long as Fusion is running assigned cores and RAM cannot be used by OSX. When you shutdown Fusion the used cores and RAM are avaiable for OSX.
    How much should I attribute to Windows for optimum speed?
    At best use BootCamp which allows Windows to use all avaiable hardware resources.
    With Fusion you have to find the balance between your Windows useage and your OSX useage.
    I have a trial version of Fusion and I want to experiment with Max etc, but if I install and need to uninstall is that going to make a mess of the Mac, or is that pretty straight forward?
    To my knowledge the Fusion package includes an uninstaller app to remove Fusion completely.
    Before uninstalling Fusion you should use Fusion to delete/remove your Windows Virtual Machines.
    Such Virtual Machines usually consists or merely two files which reside on your OSX partition and, in case of need, can even be deleted using the OSX Finder.
    Lastly, assuming I didnt just make an *** of myself for buying this beautiful machine, should the configuration I bought really be suitable? I ask these questions mainly because the sales reps seemed to agree that it should be, but I then the last guy gave me doubts.
    Like said, I don't use Max or AutoCad, but the Mac you have should be really good for both.
    Although, there always will be a computer faster than the one you currently have.
    Thanks again, Justin. PS. Sorry for length, it's just that in my experience with posts, its better to be clear from the onset. I hope I was.
    Hope it helps clearing up. And no problem with lengthy posts
    Regards
    Stefan

  • [SOLVED]Java error running a .jar file

    Hi. I'm running Arch 64 and I keep getting this error when trying to run
    java -jar TwinkEdit-0.6.9.jar (from twinkle.sourceforge.net -- a flashcard program for palm. This .jar is the desktop editor for the flashcards. It's worked before on Linux ... but that was almost 2 years ago.)
    Exception in thread "AWT-EventQueue-0" java.util.NoSuchElementException
    at java.util.Vector.firstElement(Vector.java:442)
    at org.ekimd.twinkedit.TwinkUI.getJapFont(TwinkUI.java:979)
    at org.ekimd.twinkedit.TwinkUI$DynamicView.<init>(TwinkUI.java:589)
    at org.ekimd.twinkedit.TwinkUI.getDynamicView(TwinkUI.java:815)
    at org.ekimd.twinkedit.TwinkUI.access$1300(TwinkUI.java:88)
    at org.ekimd.twinkedit.TwinkUI$NewAction.actionPerformed(TwinkUI.java:1101)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
    at java.awt.Component.processMouseEvent(Component.java:6041)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
    at java.awt.Component.processEvent(Component.java:5806)
    at java.awt.Container.processEvent(Container.java:2058)
    at java.awt.Component.dispatchEventImpl(Component.java:4413)
    at java.awt.Container.dispatchEventImpl(Container.java:2116)
    at java.awt.Component.dispatchEvent(Component.java:4243)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
    at java.awt.Container.dispatchEventImpl(Container.java:2102)
    at java.awt.Window.dispatchEventImpl(Window.java:2440)
    at java.awt.Component.dispatchEvent(Component.java:4243)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
    It happens in both 32 bit (arch32 chroot) and 64 bit jre's exactly the same.
    java -version gives:
    java version "1.6.0_07"
    Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
    Java HotSpot(TM) 64-Bit Server VM (build 10.0-b23, mixed mode)
    (It also doesn't work on Windows, either .... I think it must be a Java version compatibility problem ??)
    Any ideas?
    Thanks, 
    Scott
    Last edited by firecat53 (2008-09-27 14:07:04)

    I gave it a try and got the same error. Then I started looking at the code:
    When you create a new file, the program starts looking for a font which supports japanes (don't ask me why). If it doesn't find any it throws the error you posted above. I was able to create a new file after I installed ttf-bitstream-cyberbit from AUR (first font supporting japanese I could find).
    You should contact the author and submit a bug report. Even if the program really needs japanese fonts, which I doubt, failing like this is just bad.
    Last edited by Garns (2008-09-27 13:26:05)

  • Generate .PDF file from Oracle Form and print .pdf

    Hello, I am new to oracle form. I need direction on how to create .pdf file on a button click.
    The requirement is when user click a button on a form, I need to write some data to the pdf file and open the .pdf file for print.
    I am using Oracle Form builder 10.1.2.0.2
    Thanks a lot! Please help!

    Dear all,am new to oracle report and oracle forms and i know the
    basics how to generate the report and to create the form, Now my doubt is, like generating report
    from oracle report how to generate the report from oracle from,should i add any command button? and where
    to add the coding and what coding ? when i click that command button the report should be generated like oracle
    report,what should i do?Please help me to learn.
    my table name is 'student' and it has the following columns,
    sid,sname,grade,result.
    Am using oracle from 10.1.2.0.2 version and
    oracle report version is 10.1.2.0.2.
    Please give step by step procss.
    Thank you.

  • Access application hosted on a different machine.

    Hi,
    I've written a simple web application to select an excel file through a jsp and write it's contents to text file. I select the execl file by browsing through the folders in my system. when i submit the form giving the location of the text file to which this excel file contents have to be written i'm getting the expected result. This application is hosted in Tomcat in my system. But when i tried accessing the application from another system my application is unable to find the excel file path selected in that machine. So i'm getting FileNotFoundException. Please suggest a solution.
    Thanks,
    Sudha

    Hi,
    I know that an application is hosted on a particular system. That application's job is to take the excel file selected by me and create a text file out of that. But as that application is hosted in a different machine it is unable to find the path i select. My doubt is like is it possible to have an application like this with actual source code and server on one system and user accessing from a different system and still able to find the path of the excel file the user is selecting?
    Thanks,
    Sudha

  • Report server times out for 3 mb of excel

    I'm using a report viewer control in our application and it is working fine while displaying data and exporting it in different format by clicking export button provided by the report viewer.
    I have another page but there will be a normal asp button to generate same report. so i am using report viewer control and calling the public method .Render exposed by the report viewer.
        byte[] bytes = rptViewver.ServerReport.Render("Excel", deviceInfo, out mimeType, out encoding, out extension, out streamids, out warnings);
    this time i am getting below exception.
        Exception :System.Net.WebException: The request failed with HTTP status 504: Connection Timed Out.
        at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
        at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
        at Microsoft.SqlServer.ReportingServices2005.Execution.ReportExecutionService.Render(String Format, String DeviceInfo, String& Extension, String& MimeType, String& Encoding, Warning[]& Warnings, String[]& StreamIds)
        at Microsoft.SqlServer.ReportingServices2005.Execution.RSExecutionConnection.Render(String Format, String DeviceInfo, String& Extension, String& MimeType, String& Encoding, Warning[]& Warnings, String[]& StreamIds)
        at Microsoft.Reporting.WebForms.ServerReport.Render(String format, String deviceInfo, String& mimeType, String& encoding, String& fileNameExtension, String[]& streams, Warning[]& warnings)
        at Reports_GenerateReport.DisplayReport(Boolean IsExport) in f:\Sunil\View Reports\Login\Reports\GenerateReport.aspx.cs:line 1702
    My doubt is like, why it is getting time outs while leveraging same report viewer control internally.
    any suggestions to get rid of this?

    Hi sGudivada,
    Please check the ExecutionLog view in ReportServer database to learn more information about the report. The report server execution log contains information about the reports that execute on the server or on multiple servers in a scale-out deployment. For
    example:
    TimeDataRetrieval fields. Record number of milliseconds spent retrieving the data.
    TimeProcessing fields. Record number of milliseconds spent processing the report.
    TimeRendering fields. Record number of milliseconds spent rendering the report.
    Reference:
    http://msdn.microsoft.com/en-us/library/ms159110(v=sql.110).aspx
    There is an article about troubleshooting report performance, you can refer to it.
    http://msdn.microsoft.com/en-us/library/bb522806(v=sql.105).aspx
    Thanks,
    Alisa Tang
    Alisa Tang
    TechNet Community Support

  • Best practice for presenting different storage vendors arrays..?

    Hi, can't seem to find a specific answer in writing on this.
    Typical FlexPod already deployed, with different vsans on different n5ks.
    Uplinks from UCS / NetApp are FCoE.
    So I now want to present some normal FC (not FCoE, nexsan) storage to the same blades on the UCS system via the n5ks.
    My main questions are can I use same vsans / vHBAs as for NetApp storage, or should you be creating different vsans and vHBAs for different storage vendors?
    If multiple vsan is recommended, is Trunking multiple vsans over FCoE from UCS to FC fine, I'm sure it is but just want some experience on it.
    Thanks!

    Thanks guys for the input, interesting to see there is a difference of opinion on this topic. Makes me feel happier that I'm not being too stupid and someones posted back a link to a best practice guide on the subject that I've blatantly missed! (still time for that no doubt!)
    Like I've said, I haven't found anything specific in writing on this, but keeping vendors on seperate vsans / hbas feels like the best way to do it anyway with only a little extra config in the grand scheme of things.

  • PC to Mac compatability questions

    This is probably a well aired topic on this forum but I am planning on converting from a Win XP PC to a mac mini in the next couple of weeks but am looking for advice on the following questions
    1. Will I be able to use my flash memory drive on the mac?
    2. Does the Mac OS contain drivers for popular printers (HP and Canon in particular)?
    3. Can I transfer and use my word documents to my mac using my ipod (which is currently formatted for PC)
    4. Should I invest in MS Office for Mac or buy iWork?
    5. Can iWork read and format word files?
    6. I use photoshop elements for basic image editing like cloning etc. Does iPhoto offer similar image editing facilities?
    Any help with the above would be greatly appreciated.
    Sub Sea Sniper

    4. Should I invest in MS Office for Mac or buy iWork?
    Mac OSX comes with "Apple Works" This is a very old
    "Office Suite" dating back to the very beginning.
    Apple keep quiet about "appleworks". They shouldn't.
    Mac OSX also comes with a 30-day trial of iWork. So
    you can test it out. It's really more for making
    presentations and nice looking documants.
    5. Can iWork read and format word files?
    If you click on a Word file it will open but I doubt
    things like embedded macros will work. Simple documents
    seem to just work.
    6. I use photoshop elements for basic image editing like cloning etc. Does iPhoto offer similar image editing facilities?
    I'm not an iPhoto fan. It is not intended for someone who has thousands of images or is into doing more to an image than just crop and adjust overall color. iPhoto does not have the concepts of layers and selections acting as masks.
    You can define a "default editor" in iPhoto. So when you
    click an image to edit it your default editor starts. You
    do not need to use the built-in editor. But starting
    PS is sl_ow.....
    I happen to like "gimp" see www.gimp.org it runs on Macs, Windows and UNIX. It's more like CS than Elements and has a cleaner interface and it's free.
    I hope that iPhoto 6 is much improved over 5. We will know soon.

  • To create report EWA

    Good days
    the motive of my doubt is like to create a report EWA in the solman to extract a few monthly reports and if there is a note sap where I can find realize it like.
    Marcos A. Monzón

    Hi Marcos,
    You can configure satellite systems like ERP, BI etc into Solman and generate EWA report in Solution itself. But these reports are generated on weekly basis .
    I am not very clear on your query where you mention to extract monthly reports
    the motive of my doubt is like to create a report EWA in the solman to extract a few monthly reports
    Could you please elaborate and share relevant note number which you mention in your query.
    Regards,
    Deepak Kori

  • Need solution for SNMP Service on Solaris

    Hi Friends,
    We use the solaris servers. For SNMP we have changed the Default Password of SNMP Service.
    We audited our Servers doing the Penetration Testing (PT). In this activity it was reported the SNMP is using the default password. They had the tool "Getif" for SNMP testing. If the default password are set for SNMP service this toll reads the important information. If defaults passwords are not used it cannot read any information about SNMP.
    When i change the default password for SNMP, should i restart the the service to take changes in effect?
    Pls help

    Hi taher;
    Thanx buddy. You are really helping us out. I just try to share my knowledge wiht forums user i also already learn many thing from forums,as specialy Hussein Sawwan
    I have two more doubts. Like in linux we use which command to see if that executable is in the PATH but in Solaris 10 is whence a replacement for that.I belive You can use which command in solaris too.
    Q2). I dont think i need to go for split architecture as both the DB (11i) and application tier are certified for solaris *10* SPARC (64-bit).You should decide it not me :) you can use split config if your business need it or not. Its just depend your analysis
    I hope; my answer would be answer of your quesition and give you some idea about your issue :)
    Regard
    Helios

  • Printing headers and footers

    I cannot get my printer to print headers & footers.
    Using:
    WinXP Pro SP3
    HP Photosmart D7560
    Firefox v. 3.6.8
    All drivers are up-to-date

    In 1.3 there was no such animal. I made a header and footer object (a one line JLabel) which was inserted into each page. I doubt anything like that was added to 1.4's printing capabilities.

  • [JS CS5.5] Complex Application, want context that current script was called from

    I'm trying to create a slightly sophisticated application that is spread across several script files.  Some functions in these files call either other.  Here is what I want to emulate:
    A.jsx
    if(mainScript=="A.jsx"){
    doA();
    function A(){}
    B.jsx
    #include A.jsx
    if(mainScript=="B.jsx"){
    doB();
    function B(){
    // some stuff
    A();
    //some more stuff
    C.jsx
    #include A.jsx
    #include B.jsx
    #include D.jsx
    main(){
    D();
    A();
    etc...
    Basically, I want a script to act differently depending on if it is the one being called or if it is being called from elsewhere. I thought I could do this pretty easily by using global variables and something like:
    if(mainScript==undefined){
    var mainScript=$.fileName;
    But global variables persist between script calls so this doesn't work. I'm a bit stuck.  Anyone know how to do this?  app.activeScript doesn't work because I am executing through the extendScript toolkit. 
    I'm vexed.

    You're definitely not wrong John, this will resolve the problem.  Sometimes, especially when doing development in a large project with lots of interlocking pieces it's convenient to be able to have some test code within each file that tests the functionality of that specific code.  Even moreso when you are new to a language, so when you think you find a better way to do something you can quicky try it out and see what happens without invoking your monolithic program.  It's not difficult to achieve this approach by splitting into two files, it just means that you have to keep twice as many file tabs open and remember which one to switch to  "Go" instead of doing it with the code you are working  on.  It seems like an extra step for no good reason.
    I do this in Java all the time, most of my complex classes have a main() method so they can be executed standalone to try out a quick snippet or test some corner cases.  Comprehensive unit testing would probably be better but the time investment is much greater plus I doubt something like that would be well supported with ExtendScript.
    Is there any different between a jsx and jsxinc file or is that just a common naming convention that you or a community of people use to differentiate files?

  • Query on system object types??

    Hello,
    Here is the situation.
    O-R table "LocatedEntity392_TAB" was created by oracle during XML schema registration. I could not find the object It has "COCT_MT070001.LocatedEn390_T" type
    "COCT_MT070001.LocatedEn390_T" type have
    SYS_XDBPD$ with XDB.XDB$RAW_LIST_T
    id with id391_COLL
    How do we query on SYS_XDBPD$ and id in this situation?
    How do we find the structure of XDB.XDB$RAW_LIST_T and id391_COLL
    I appreciate your help. Thanks in advance.
    Ram

    hi Arun ,
                thanks for ur reply,well i have done the user mapping in the same way as u told.but my doubt is like for suppose i have a user named p1 on my portal side & two users named r1 & r2 on the R/3 side .now i have created a system object named sys1 and assigned it to p1 specifying
    username:r1
    pwd:*******
    in the user mapping.
    now i want want the same p1 to connect from the portal to R/3 using
    username:r2
    pwd:*******
    now can i use the same system object or should i create another system object.
    regards,
    tilak.

  • Query on system object

    hi everyone ,
                         i have a query regarding this system object. I have created a system object and assigned it to a user to log on to sap R/3 .its working fine.now my question is i have another user on the R/3 side .now i want to log on to the R/3 from the portal using this second user can i use the same system object created for the first user or should i create a new system object."can a system object be assigned to 2 or more users?"
    Thanks in advance,
    regards,
    Tilak

    hi Arun ,
                thanks for ur reply,well i have done the user mapping in the same way as u told.but my doubt is like for suppose i have a user named p1 on my portal side & two users named r1 & r2 on the R/3 side .now i have created a system object named sys1 and assigned it to p1 specifying
    username:r1
    pwd:*******
    in the user mapping.
    now i want want the same p1 to connect from the portal to R/3 using
    username:r2
    pwd:*******
    now can i use the same system object or should i create another system object.
    regards,
    tilak.

Maybe you are looking for