find fields that contains a space

I'm trying to find a field that contains a space in the data. I have a user_login column where all the user id is stored. User IDs are normally "SMITHJ', 'DOEJ' etc... but I wanted to see if we got one with a space. what the script would look like this get?

Thank you

example of

user_login PK
1 SMITHJ
2 DOEJ
3 OF THE CRUZJ

Hello
Welcome to the forum

SQL> with t as
  2  (
  3    select 1 pk,  'SMITHJ' user_login from dual union all
  4    select 2, 'DOEJ' from dual union all
  5    select 3, 'DE LA CRUZJ' from dual
  6  )
  7  --
  8  select * from t
  9  where instr(user_login, ' ') > 0
 10  /

        PK USER_LOGIN
---------- -----------
         3 DE LA CRUZJ

do a google on string handling Oracle and especially Instr.

Tags: Database

Similar Questions

  • New additional break line when a record has a field that contains characters of new line

    Hello

    I have problems to queue a file without blank lines. I noticed that the problem is THAT SQLPLUS is extra line breaks just after returning from a recording that has the characters of new line in. See screenshot below:

    sqlplus_newline.png

    Note that there is an extra line break after recording that says "multiple multiple line1 & line2".

    Is there a parameter of SQLPLUS that I can use to get rid of the extra line? If not, what are the other options that I can use to get rid of him.

    I can't really use sed UNIX because there could be a field that contains a blank line.

    Note also that I need the data remains the same, in other words, I need to keep the new line characters in the column

    Please notify.

    Thanks in advance

    SQL Plus adds a record separator (default empty line) when the column value is wrapped.

    You can change the default value to observe behavior.

    Here are the test data

    SQL> select rownum, str from test;
    
        ROWNUM STR
    ---------- ----------------------------------------------------------
             1 line1
             2 line2
             3 line3
               line4
    
             4 line5
    

    Now, change us the record separator to dot

    SQL> set recsep wrapped
    SQL> set recsepchar "."
    SQL>
    SQL> select rownum, str from test;
    
        ROWNUM STR
    ---------- ----------------------------------------------------------
             1 line1
             2 line2
             3 line3
               line4
    .....................................................................
             4 line5
    

    And if you do not want a record separator you can just disable

    SQL> set recsep off
    SQL> select rownum, str from test;
    
        ROWNUM STR
    ---------- ----------------------------------------------------------
             1 line1
             2 line2
             3 line3
               line4
             4 line5
    
  • Use of the address bar to search for phrases that contain no spaces?

    When I type the sentences that contain spaces in the search bar, it evokes a search on google as specified by my topic: config under the keyword. URL

    However, when I type something who * do not * contains a space (e.g. potatoes), firefox tries to connect to http://potatoes/, return an "impossible to establish connection to the server to potatoes.

    my key word. Set URL: http://www.google.com/search?ie=UTF-8 & oe = UTF - 8 & q =
    Browser.Fixup.Alternate.Enabled is * wrong *.
    Browser.urlbar.AutoComplete.Enabled is * real * (although I don't think that this has nothing to do with it)

    Hello jywang74, please update firefox version 33.0.2 - here you will see a different behavior (keyword.url is no longer used btw, the address bar uses the same provider of search in the search bar).

    http://msujaws.WordPress.com/2014/08/01/faster-and-snappier-searches-now-in-Firefox-Aurora/

  • Trouble with the pivot and the columns that contain numbers/spaces

    Hello

    I have trouble with the pivot statement.
    How could I do this just for columns that are numbers?
    How could I do this just for columns that contain spaces?

    Can someone please help?


    based on the documentation of Carsten Czarski
    http://SQL-PLSQL-de.blogspot.com/2007/08/kreuztabellen-in-Oracle11g-SQL-pivot.html

    essentially to help:
    --------------------
    Select deptno, sum (clerk), sum (salesman), sum (manager)
    of (emp) pivot
    Sum (SAL) of EMPLOYMENT
    in ("CLERK" as a 'CLERK', 'SELLER' as 'SELLER', 'MANAGER' as 'MANAGER')
    )
    Deptno group
    --------------------
    DEPTNO SUM (CLERK) SUM (SALESMAN) SUM (MANAGER)
    ---------- ---------- ------------- ------------
    30 950 5600 2850
    20 1900 2975
    10-1300-2450



    I tried to run at my own table:

    NAME MONAT WERT
    -------------------------------------------------- ---------- ----------
    5 Antarctica 404,84
    Asia 7 106,41
    Oceana 2 456,96
    4 the Europe 426,23
    9 Antarctic 537,56
    Europe 9 832,58
    The South America 12 662,41
    Europe 4 422,27
    America of the North 7 312,19
    America of the North 10 148,92

    10 selected lines.


    But running:
    --------------------
    SELECT name, sum (1), sum (2), sum (3), sum (4), sum (5), sum (6), sum (7), sum (8), sum (9), sum (10), sum (11), sum (12)
    (pivot) apex_wksp.demo_pivot2
    Sum (Wert) for monat
    in ('1 ', '2', ' 3', '4 ', '5', '6', '7',' 8 ', ' 9',' 10', ' 11 ', ' 12')
    )
    Group by name
    ;
    --------------------
    led to:
    Antarctica 1 2 3 4 5 6 7 8 9 10 11 12
    North America 1 2 3 4 5 6 7 8 9 10 11 12
    Oceana 1 2 3 4 5 6 7 8 9 10 11 12
    The South America 1 2 3 4 5 6 7 8 9 10 11 12
    Europe 1 2 3 4 5 6 7 8 9 10 11 12
    Asia 1 2 3 4 5 6 7 8 9 10 11 12
    6 selected lines.


    not quite what I expected.





    In addition,
    --------------------
    Select monat, sum (Antarctica), sum (North America), sum (Oceana), sum (South America), sum (Europe), sum (Asia)
    (pivot) apex_wksp.demo_pivot2
    Sum (Wert) name
    ("Antarctic", "North America", "Oceana", "South America", "Europe", "Asia")
    )
    Group by name
    ;
    ---------------------
    ORA 907 results



    I know what the problem is - but how do I do it right?


    using double quotes or replace (ing) space with just underscores seems to garble sql for the unreadable.




    Help, please.



    Thanks in advance,
    Michael Weinberger

    Attention to the rotated default column alias:

    SQL> with demo_pivot2 as (
      2                       select 'Antarctica' name,5 monat,404.84 wert from dual union all
      3                       select 'Asia',7,106.41 from dual union all
      4                       select 'Oceana',2,456.96 from dual union all
      5                       select 'Europe',4,426.23 from dual union all
      6                       select 'Antarctica',9,537.56 from dual union all
      7                       select 'Europe',9,832.58 from dual union all
      8                       select 'South America',12,662.41 from dual union all
      9                       select 'Europe',4,422.27 from dual union all
     10                       select 'North America',7,312.19 from dual union all
     11                       select 'North America',10,148.92 from dual
     12                      )
     13  select name, sum("'1'"),sum("'2'"),sum("'3'"),sum("'4'"),sum("'5'"),sum("'6'"),sum("'7'"),sum("'8'"),sum("'9'"),sum("'10'"),sum("'11'"),sum("'12'")
     14  from demo_pivot2 PIVOT (
     15  sum(wert) for monat
     16  in ('1','2','3','4','5','6','7','8','9','10','11','12')
     17  )
     18  group by name
     19  ;
    
    NAME          SUM("'1'") SUM("'2'") SUM("'3'") SUM("'4'") SUM("'5'") SUM("'6'") SUM("'7'") SUM("'8'") SUM("'9'") SUM("'10'") SUM("'11'") SUM("'12'")
    ------------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ----------- ----------- -----------
    Antarctica                                                    404.84                                      537.56
    North America                                                                       312.19                            148.92
    Oceana                       456.96
    South America                                                                                                                                 662.41
    Europe                                              848.5                                                 832.58
    Asia                                                                                106.41
    
    6 rows selected.
    
    SQL> 
    

    SY.

  • [JS CS3] Find paragraphs that contain only one substitution of Style

    Given a document with paragraph styles applied evenly. I need to locate all paragraphs in the document that contains a paragraph style override of the left indent. All other substitutions of style can be ignored.

    I see in the DOM how to clear the replacements, but is it possible to locate the paragraphs with a specific substitution?

    I suspect there is no way to do it, but thought I'd throw it out there.

    if(para.leftIndent != para.appliedParagraphStyle.leftIndent){
      // we have a left indent override...
    }
    

    Substances

  • Find the Document color space & find samples that contain the content of the text block.

    Hello world

    I tried to figure this out for the last three days. I've tried everything I can think and search all over the internet (GitHub, Forums, etc.). I'm not a javascript Wizard, and certainly a Newb Extendscript.

    Try to determine the color space of the document. Last attempt was...

    alert(theDoc.properties.ColorSpace);
    

    Reminder on this:

    I have a datamerge which creates the attached fields from a CSV file. It is an internal reference to a color code. I am able to test cycle using the for loop an enter the color code. But I can't seem to find a way to seek the shades. One thought was to put in a table and sift through them. The color code provided is not swatch set name that makes things interesting. For example, name is 2297R - 19995, where 2297r is the color code for the text frame. Possible?

    main();
    // this is the function
    function main(){
    // setup some variables
    var theDoc = app.activeDocument; // active doc
    var thePage = theDoc.pages.item(0); // first page
    var theSwatches = theDoc.swatches;
    var list_of_swatches = theDoc.swatches.everyItem().getElements();
    var n = theDoc.swatches.length;
    var color;
    var rgbValues;
    var i;
    var     t;
    
    
    //Get all groups for this document:
    var theGroups = theDoc.groups;
    var theLayers = theDoc.layers;
    
    
    // Color Codes
    var primaryColor = thePage.textFrames.item("Primary Color Code"); 
    var secondayColor = thePage.textFrames.item("Secondary Color Code"); 
    var accentColor = thePage.textFrames.item("Accent Color Code"); 
    var matchGarmentColor = thePage.textFrames.item("Match to Garment Color Code"); 
    var lightTonalColor = thePage.textFrames.item("Light Tonal Color Code"); 
    var darkTonalColor = thePage.textFrames.item("Dark Tonal Color Code"); 
    var neutralColor = thePage.textFrames.item("Neutral Color Code"); 
    var greenColor = thePage.textFrames.item("Green Color Code"); 
    
    
    
    // Code Codes
    var primaryColorCode        =   primaryColor.contents;
    // var secondaryColorCode      =   secondaryColor.contents;
    // var accentColorCode         =   accentColor.contents;
    // var matchGarmentColorCode   =   matchGarmentColor.contents;
    // var lightTonalColorCode     =   lightTonalColor.contents;
    // var darkTonalColorCode      =   darkTonalColor.contents;
    // var neutralColorCode        =   neutralColor.contents;
    // var greenColorCode          =   greenColor.contents;
    

    Help or advice is greatly appreciated.

    Thank you.

    Hello

    ... There is a third source eventually:

    -content of the 'PartOfName' examination if there are spaces inside - in this case the search() method returns "-1"thus."

    (i.e. warning (PartOfName.length) ==> is it == 5?)

    Jarek

  • How to clear the inputText field that contains control data to the Web Service data?

    Hello

    I use JDeveloper 12.1.3 and 2.2 of the MAF.

    I created a Web Service data control that offers the feature of the View object on the server side.

    To use this, I created a taskflow with two pages of amx. The first page of the amx contains a button to call the other.

    The second page of the amx contains fields inputText with the values of the parameters of creation out of the data control functions.

    If I call the second page of the amx inputText fields are empty. On the page, I have a button to call the function of creation itself. By pressing the key the inputText field values will be sent to the server. Everything works great! Pressing on the button also calls for action to return to the first page of amx in the taskflow.

    Now, if a next time I call the second page the inputText fields contain the values from the last call.

    I want the inputText empty fields each time. How can I achieve this?

    Thanks in advance.

    Martin

    You can ask this question in the forum of the MAF

    Oracle Mobile Application Framework

  • a field that contains a list of sizes or a table?

    Iain was kind enough to advise on the use of a table instead of a field containing a list of 6 comma separated elements.

    I did, but if I can throw new slope on why I prefer to use a field?

    JEWELRY WEB PAGE

    Select * goods where merchandise.category = 'jewels '.

    THE PRODUCT DETAILS PAGE

    When a user clicks on items by top of the page, the hyperlink sends the unique merchandise_ID in the link, a page of details of the product using a query:

    Select * from goods where merchandise.merchandise_ID = URL.merch_ID'

    This gem is available in different sizes. These sizes are in a list separated by commas in a field called "sizes" in the table of the goods. I had been advised to move to a table instead. If I moved to a separate table sizes, I should add a LEFT JOIN to include the size chart or execute a separate query on the size chart (where sizes.merchandise_ID = URL.merch_ID) - which is a drop in performance.

    What should I do with the sizes is produced a menu drop down, the user can choose to - so isn't better I just put sizes into one field, separated by commas? Then use Coldfusions built-in functions to analyze the list in a drop-down list?

    A thought experiment that might convince you.

    To compare these two data patterns.

    CSV

    Agenda Size
    Shirt Small, medium, large
    Coat Medium, small, large
    Pants Small, large, medium
    Shoes Large, small, medium

    STANDARDIZED

    Size chart

    Key Size
    1 Small
    2 Medium
    3 Large

    Article - size join Table

    ItemKey SizeKey
    1 1
    1 2
    1 3
    2 1
    2 2
    2 3
    3 1
    3 2
    3 3
    4 1
    4 2
    4 3

    Roll of the order of the day

    Point of
    Key
    1 Shirt
    2 Coat
    3 Pants
    4 Shoes

    Imagine now these two systems extended to several thousands of items.

    Then imaging that some type of marketing has decided that 'Big' was an ugly description for this size, so they want to change to "Husky" and | or they want to change the size of the 'Small' to 'small '.

    In the standard version, you do one or two update table of sizes.  I don't even want to try to describe the ugly update that you try and create that involves looping and string manipulation to try to update all the records in the CSV version.

  • Subtract 2 (varchar2) fields that contain time items

    Hello

    I have 2 varchar2 columns, have all two fields contained in this title time (07:30) and (06:00) and I would subtract the two columns. I tried Trunc / to_date / to_char in different orders before the column labels but I either get a 'not one month valid' error or a "number not valid" error. My final output must be decimal time.

    for example start at 08:00 and 16:00 arrival would be the end result is therefore 8 8 hours would be the result if arrival at 15:30, then 7.5 would be output.

    any help would be appreciated... Thanks in advance.

    Ash

    Select

    A.CONTRSTARTTIME - A. CONTRFINISHTIME AS CONTR_HRS

    OF A datalab.timesheet;

    You're wrong.  If they are the varchar2 data type when they contain no time, they contain strings.  This may sound pedantic, but it's an important thing to remember.  Oracle treats strings as strings, nothing more nothing less.  If you want to date/time-related features, then you should be storing your data in an appropriate such as DATE or TIMESTAMP data type even if you want only the time part.

    Thus, the first thing you need to do is convert your strings to an appropriate data type, and then you can use built-in brilliant manipulations date Oracle...

    SQL > ed
    A written file afiedt.buf

    1 with t (t1, t2) as long as)
    2 Select ' 06:30 ', ' 07:30 ' of all the double union
    3 select ' 08:00 ', 16:00 ' Union double all the
    4 Select ' 09:00 ', 15:30 ' of the double
    5        )
    6  --
    7. end of test data
    8  --
    9 select t1, t2
    10, (to_date(t2,'HH24:MI')-to_date(t1,'HH24:MI')) * 24 comme diff_hrs)
    11 * t
    SQL > /.
    T1 T2 DIFF_HRS
    ----- ----- ----------
    06:30 07:30 1
    08:00 16:00 8
    09:00 15:30 6.5

    3 selected lines.

  • Hide the form field based on the name that contains some characters

    I think it's easy.

    We're looking for help with a script that allows you to hide all instances of text fields that contain a certain value. We have a running feature that applies to the same text fields, however, each text field should be labeled with a number at the end also running with this is a custom save button that flattens the page and hides some elements before the record on. The hide feature works pretty simple with "this.getField... = display.hidden; The problem is we do not want to repeat this step for each unique instance of fields that share the same name.

    We must look to each text box that has a similar title, so for example if we had several fields like that...  "my-text-field-01", "my-text-field-02" and "my-text-field-03" we want the script to find the "my-text field" name and hide all instances of that. ' "."

    Hope this makes sense, I'm sorry, our programming skills are still amateur. Thanks in advance for any help.

    You can do if you use a hierarchical naming convention. For example, instead of using something like: my-text - field.1, my-text - field.2, etc..

    You can then hide as well as:

    // Hide all of the "my-text-field" fields
    getField("my-text-field").display = display.hidden;
    
  • Automatic row height resize on text that contains a floating field

    Hi all

    Hope someone can help out me

    I'll explain my scenario with an example simplified to keep things to-the-point:

    I have a Table with 2 rows and 1 columns. The Row1 cell is text (NOT a text field) that contains a floating field. I have a button on my form that populates the field floating with a string. If the string value that is inserted into the floating field is very long, the text overflows outside of the cell.

    Screenie.png

    It seems that the height of the table row adjusted not dynamically to changes in the length of the text in the cell.

    Any ideas?

    Thank you

    Another way is to click on the cell and then click View > Source XML. You will see something like has highlighted. Remove the attribute of height h = "10mm" completely.

    Kyle

  • looking for images that contain keywords and DO not contain any other

    Is there a way to LR to find images that contain keywords and do NOT contain others, all in the same search function? In the past I have had this problem by dumping to a subset of the images in the quick collection and then research within there, using a combination of text and metadata search. But is there a way to do this in one step for the entire collection, for example by using the text / search keyword bar and using the appropriate syntax? Sorry if this question has already been answered elsewhere and do not hesitate to send me to the thread, but I tried to do for a long time and unable to find an answer. See you soon

    Search you using the filter bar for the photos that have the desired keywords and place an exclamation point in front of unwanted keywords.

    Example:

    Ohio! Cleveland

    find all the photos with the keyword Ohio but did not keyword Cleveland

  • cannot record copy that contains "#" using branching

    Hello everyone - I use APEX 4.1 and have implemented a "Record copy" button that copies the selected fields from the folder to the same page to create a new record. This is done by using branching (had the idea of this forum!) and in defining the elements (for example, P2_NAME, P2_ADDRESS1, P2_ADDRESS2, etc.) with these values (by example, & P2_NAME, & P2_ADDRESS1., & P2_ADDRESS2, etc...)

    It has worked perfectly in other APEX applications - up to present. The problem is that the new database contains several fields that contain the character ' # '. When the character ' # ' is detected during the copy process, all data after the # is not copied (but all the data before the # are copied OK).

    Is there a way to get around this? Remove the characters ' # ' is not an option, because it is part of many manufacturer part numbers that follow us.

    Any guidance is appreciated. Thanks in advance for your help - Gail

    Hi Gail, so if they are database columns, I think you must have a DML search process in there to fill in as in page 30 you have to edit the line.
    Fix?

    If this is the case, then I think loaded the items in the collection, then your DML process happens and as 'THIS' line does not exist, the page elements get eliminated from the DML extraction.

    Change to the Source used to load items ONLY when NULL would correct that. You can, of course, that the link from Page 30 to 31 to change also clears the cache on page 31.

    So to change it:
    -Link to page 31 of 30 and clear the cache on page 31.
    -Pass the ID of your line on page 30 to P31_ID?
    -the collection does not exist so nothing happens in the header after process
    -the DML process runs and support items because they are null, and row data exist.
    -make changes, the changes apply
    OR use the copy button, that:
    -Submit page
    -Process captures the fields necessary for collection
    -Creates a branch to 31, clear the page cache
    -Runs in Process, research collection, load the page elements.
    -DML process works but does not affect the page elements because the Source is used only when the page element is null
    -Form appear with elements of pages loaded.

    FWIW, assuming that when you check in a copy and the elements of the page is deleted, your key (P31_ID?) column is also set to NULL, you could put a condition on the process DML to run only if the element of the page P31_ID is NOT NULL, which would cause the LMD to be ignored process and elements of the page to keep their value from the loading of the collection.

    Published by: Bob37 on August 15, 2012 16:39

  • How can I add white space between areas that contain text fields? I use Adobe Acrobat Pro DC 2015.  I'm trying to change an existing PDF. I need to add white space between areas that contain text fields to allow these text fields to be developed and not

    How can I add white space between areas that contain text fields?

    I use Adobe Acrobat Pro DC 2015.

    I'm trying to change an existing PDF. I need to add white space between areas that contain text fields to allow these areas to be developed and do not overlap the text and the text below fields.

    For example:

    1. 1.

    Progress/strategies:

    1. 2.

    Progress/strategies:

    1. 3.

    Progress/strategies:

    1. 4.

    Progress/strategies:

    The space between each 'progress/strategies' increasing needs. A text field is under each of them. If it's a Word doc, I could just press on enter. What is the best way to do this with Adobe Acrobat Pro DC?

    There is no easy way to do it. You need to move the text fields more apart and if there are static elements, then you will need to use the tool edit text & Images to move them, separately.

  • a bug with the structure that contains bit fields?

    using CVI 8.5. I tried to set up a structure that contains bit fields. Although the structure compiles, I encounter strange behavior when you access individual fields, while the value of the overall structure seems ok. Here is the structure:

    typedef struct
    {
    Union
    {
    struct
    {
    unsigned int Flag1: 1;
    unsigned int dummy: 3;
    unsigned int Flag2: 4;
    unsigned int Indicateur3: 4;
    unsigned int dummy2: 4;
    };
    unsigned short;
    } flags;
    } flagset;

    When you set the Member 'all' to a value so that one or more indicators, but not all, are false, I still read the individual like real flags, until all flags are set to false.

    I missed something? This definition is really legal?

    Please find attached a file showing the problem.

    The same issue is at stake with or without the ternary operator. It turns out the problem was not specifically with printf, but rather a bug in the compiler that is related to the evaluation of the members of anonymous internal structures. If several internal anonymous struct members are evaluated before the compiler actually do anything with the result - which is the case when passing arguments to a function-, so they will all be evaluates the value that was evaluated last.

    A. Mert

    National Instruments

Maybe you are looking for