Insert space before the capital letter in a word

Hi,
I have a column with list of names like
reports
admissionPage
topHighCost
requestedReports
Like this there will be many rows. I want to add space before the capital letter.
This is a rdl query. Is it is possible to do in SSRS? Or we should do in Tsql? Please help me in this issue.
Thanks in advance..
BALUSUSRIHARSHA

Its going to be pretty complicated, in my opinion, to do this in SSRS.
For t-sql, I developed a function for you.
CREATE FUNCTION fn_text_with_space(@STRING VARCHAR(MAX))
RETURNS
VARCHAR(MAX)
AS
BEGIN
DECLARE @NEWSTRING VARCHAR(MAX) = '';
declare @count int = 1;
WHILE @COUNT <= LEN(@STRING)
BEGIN
IF SUBSTRING(@STRING, @COUNT, 1) COLLATE Latin1_general_CS_AS = UPPER(SUBSTRING(@STRING, @COUNT, 1)) COLLATE Latin1_general_CS_AS
BEGIN
SET @NEWSTRING = @NEWSTRING + ' ' + SUBSTRING(@STRING, @COUNT, 1);
END
ELSE
BEGIN
SET @NEWSTRING = @NEWSTRING + SUBSTRING(@STRING, @COUNT, 1);
END
SET @COUNT = @COUNT + 1;
END
RETURN @NEWSTRING;
END

Similar Messages

  • Making the first letter of every word a capital

    hello CF oracles
    could you guys please advise me the best way to make the
    first letter in every word of a string a capital letter. (and make
    all the other letters lower case).
    eg. convert "the quick brown fox" into "The Quick Brown Fox"
    or convert "THE QUICK BROWN FOX" into "The Quick Brown Fox"
    I am taking form data and inserting it into my table, so i
    want to get it right as the data is inserted.
    i found a "UDF" on CFLIb.org that proports to do this, but i
    don't know how to set up a UDF, are there other ways or is this
    considered the best approach.
    http://www.cflib.org/udf.cfm?id=9&enable=1
    thanks for any help you can give me

    found it, here's the top info, Titlecase is what you want for
    this.:
    changecase.cfm
    Rev 1.01
    cf_changecase is a simple custom tag to format case in given
    string.
    (c) 2001, Rizal Firmansyah, [email protected]
    Input var:
    * case (mandatory)
    possible inputs are
    - sentencecase: Sentence case (default)
    - titlecase: Title Case
    - lowercase: lowercase
    - uppercase: UPPER CASE
    "happysailingdude" <[email protected]> wrote
    in message
    news:e46tjv$e30$[email protected]..
    > hi Dan thanks very much. I have made an executive
    decision to do a bit of
    > a
    > hack for now as my site is only small so if a user
    enters something in the
    > wrong way i can quickly manually update it myself.
    >
    > so now i have this which works 9 times out of ten if the
    user enters a one
    > word name eg "bill" or "fred" of "jane" then it works
    just fine
    >
    > the only time it doesnt work is if the user's name is
    more than 1 word (or
    > is
    > hyphenated) eg "mary anne" or "anne-marie" hence the
    first cfif line - in
    > these
    > cases i can manually update
    >
    > i put this here in case it is of use to anyone else
    >
    > cheers
    >
    > <cfif not (FORM.firstName contains " " or
    FORM.firstname contains "-")>
    > '#Left( UCase( "#FORM.firstName#" ), 1 )##Right( LCase(
    > "#FORM.firstName#" ), Len("#FORM.firstName#" ) - 1 )#'
    > <cfelse>
    > '#FORM.firstName#'
    > </cfif>
    >

  • White space before the doctype

    you have white space before the doctype is declared
    link www.healthhokkaido.com
    Can someone give me a simple explanation of this in respect
    to the above link
    Not exactly sure what to do to fix this or really where to
    begin
    Please give me some help

    I'm sure that he is sure about the xml declaration! But I
    think he's wrong
    about the whitespace - check my page that reports the
    compatability mode for
    the render -
    http://murraytestsite.com/whitespace.html
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "Thierry" <[email protected]> wrote in message
    news:fqh4is$jq$[email protected]..
    > "Gary White" <[email protected]> wrote in
    message
    > news:[email protected]..
    >> On Mon, 3 Mar 2008 06:56:35 -0500, "Murray *ACE*"
    >> <[email protected]> wrote:
    >>
    >>>Whitespace above the doctype is of no
    consequence, as long as it is
    >>>really
    >>>whitespace.
    >>
    >> Whitespace above the doctype with cause IE to render
    in quirks mode. The
    >> referenced page also has an XML declaration above
    the doctype that will
    >> do the same thing. To get IE into standards mode,
    you'd need to remove
    >> both the whitespace and the XML declaration.
    >
    > Hi Gary,
    > Are you sure about the whitespace?
    >
    > --
    > Thierry
    > Articles and Tutorials:
    http://www.TJKDesign.com/go/?0
    > --
    > Keep your markup *clean* with these DW extensions and
    scripts:
    >
    http://www.divahtml.com/products/scripts_dreamweaver_extensions.php

  • How to capitalize the first letter of each  word in a sentence?

    Can anyone please explain how to split a sentence at a comma, or space or hyphen in to words and capitalize the first letter of each word. But I don't know how many words the sentence contains.

    HI,
    data : begin of itab occurs 0,
             words(40),
             end of itab.
    data : v_sentence(1000).
    data : lv_firstchar.
    split v_sentence at ',' into table itab.
    loop at itab.
    translate itab-words+0(1) to upper case.
    modify itab index sy-tabix.
    endloop.

  • Is there a way to auto capitalize the first letter of every word?

    I Like To Type In This Way. I Was Wondering If There Is A Setting That Will Automatically Capitalize The First Letter Of Each Word So That I Don't Have To Keep Hitting Shift Before Each First Letter.
    Thank You

    AdamMarshall wrote:
    Nice to see so many 'helpful' responses.
    This casing is useful for example, on an Address field. It would be good if the OS had this option for developers.
    I'm pretty sure it does as I've certainly had apps that, in certain fields, do use title case.

  • Is there a command to capitalize the first letter of each word?

    That is to say, can you capitalize the first letter of each word in a document like say, word? Or using the net?
    Thanks guys.
    (hope that makes sense.)

    Select the text, then Format->Change Case->Title Case (Word 2004).

  • How to Capitalize the First Letter in Every Word in Mysql

    Hi,
    I have been trying to tidy up a massive database where visitors have been sloppy when entering text. The main thing I want to do is to Capitalize The First Letter In Every Word In Mysql.
    I have found the code below in PHP but it keeps finding an error on the WHILE line:
    <?php ini_set('display_errors', '1'); ?>
    <?php require_once('Connections/maison_connection.php'); ?>
    <?php
    $result = mysql_query ("SELECT column, id FROM table");
    while ($row = mysql_fetch_array($result)) {
    $id = $row["id"];
    $column2 = ucwords($row["column"]);
    $query2 = "UPDATE table SET column = '$column2′ WHERE id = '$id'";
    mysql_query($query2);
    ?>
    My table is called MailingList and the Column is called Name, so I have altered the script to this: but it still shows the same WHILE error:
    <?php ini_set('display_errors', '1'); ?>
    <?php require_once('Connections/maison_connection.php'); ?>
    <?php
    $result = mysql_query ("SELECT Name, id FROM MailingList");
    while ($row = mysql_fetch_array($result)) {
    $id = $row["id"];
    $Name2 = ucwords($row["Name"]);
    $query2 = "UPDATE MailingList SET Name = '$Name2′ WHERE id = '$id'";
    mysql_query($query2);
    ?>
    Any ideas??

    I got it to work this way in SQL: I am SURE there is an abbreviated way to do it, but at least it works
    UPDATE MailingList SET Name = replace(Name," a"," A");
    UPDATE MailingList SET Name = replace(Name," b"," B");
    UPDATE MailingList SET Name = replace(Name," c"," C");
    UPDATE MailingList SET Name = replace(Name," d"," D");
    UPDATE MailingList SET Name = replace(Name," e"," E");
    UPDATE MailingList SET Name = replace(Name," f"," F");
    UPDATE MailingList SET Name = replace(Name," g"," G");
    UPDATE MailingList SET Name = replace(Name," h"," H");
    UPDATE MailingList SET Name = replace(Name," i"," I");
    UPDATE MailingList SET Name = replace(Name," j"," J");
    UPDATE MailingList SET Name = replace(Name," k"," K");
    UPDATE MailingList SET Name = replace(Name," l"," L");
    UPDATE MailingList SET Name = replace(Name," m"," M");
    UPDATE MailingList SET Name = replace(Name," n"," N");
    UPDATE MailingList SET Name = replace(Name," o"," O");
    UPDATE MailingList SET Name = replace(Name," p"," P");
    UPDATE MailingList SET Name = replace(Name," q"," Q");
    UPDATE MailingList SET Name = replace(Name," r"," R");
    UPDATE MailingList SET Name = replace(Name," s"," S");
    UPDATE MailingList SET Name = replace(Name," t"," T");
    UPDATE MailingList SET Name = replace(Name," u"," U");
    UPDATE MailingList SET Name = replace(Name," v"," V");
    UPDATE MailingList SET Name = replace(Name," w"," W");
    UPDATE MailingList SET Name = replace(Name," x"," X");
    UPDATE MailingList SET Name = replace(Name," y"," Y");
    UPDATE MailingList SET Name = replace(Name," z"," Z");

  • Why RandomAccessFile inserts space before each character while writing?

    Ater running the following code, the file test.txt contain:
    a b c d e f g h i j k l m n o p q r s t u v w x y z
    Why writeChars() inserted a space before each charecter?
    How to avoid this unwanted insertion?
    try {
    RandomAccessFile raf = new RandomAccessFile ("c:/test.txt", "rw");
    raf.writeChars("abcdefghijklmnopqrstuvwxyz");
    raf.close();
    catch(Exception e) {
    System.out.println(e.getMessage());
    }

    a char in java is a 16 bit datatype. (Allowing special chars like Norwegian ��� ���, German �� and many more from many languages). The ASCII system uses bytes for characters. (Allowing only 256 different chars). If you reed the file as byte you must write it as bytes as well. If you write the file as chars (16 bit cars) you must read the file as (16 bit) chars as well.

  • Calendar weekly view: unwanted nonbreaking spaces before the column link

    Hello,
    I have a column link in a calendar. In the weekly view, before the link text appears (specifically before the anchor element) multiple nonbreaking spaces are output. The more links I add to the calendar, the more spaces appear, so the links are all over the place in the cells. The HTML looks like
    td class="DefDay" valign="top" ... multiple-nbsp-tags-here ... anchor-element ... link-text
    Any ideas?
    regards,
    Malcolm.

    Hi Denes,
    Thanks for your quick reply. I have mailed you a screenshot of the corruption I am talking about. The whole page template is "application default". In the "Calendar Attributes" tab in that region, I have three options in the template combo-box: calendar, calendar alternative 1, and small calendar. None of those options have any effect on the column link display corruption. In the "Region Definition" tab. the user interface template is "reports region". I have tried a number of different templates there and none affect the corruption in the column-link display either. I'm using Theme "Modern Blue 20" and the template utilization screen off Shared Components says my calendar page is using a calendar template.
    regards,
    Malcolm.

  • How do I remove a space before the first word in a sentence using find and replace or GREP?

    Right, so I am laying out a document in inDesign from a word document and it has a space before every first word in a sentence. It is really annoying and I need a quick way to get rid of them. I wasn't too sure how to do it with find/change but I am sure there is a way in GREP if someone can help me. I have included an image so that people can see exactly what I mean.

    The ^ location works for all paragraphs.
    But a note to the OP, there is a sample script called FindChangeByList that removes leading and trailing spaces as well as extra spaces after punctuation, all in one go. But if you want to continue to use a GREP find/change to remove leading space, I'd modify Joel's suggestion to ^\s+ to get those cases where the user typed multiple spaces as well.
    And don't forget there are actually legitimate places for leading tabs, which both the script and this GREP will find and remove, so be careful.

  • Unwanted space before the footnote reference

    In my document, which has hundreds of footnotes, in some places, in the text, before the superscripted numbers that are the references to the footnotes there is an unwanted space. How can get rid of the spaces in one step? If it's with Find/Change - how do I do this? If not, how is this done?

    find-change grep
    find:   \s(?=~F)
    change: leave empty

  • Getting the autocomplete setting to work by typing the first letter of a word

    Before I installed Firefox 5.0, I had made it so that whenever I visited a website that remembered an account/password of mine, this happened:
    1.- It asked for my master password.
    2.- After entering it, I would click on the form field and then type in the FIRST LETTER of the account.
    3.- When entering that exact first letter, Firefox would suggest in a drop-down menu the account or accounts that started with that letter on that particular site, e.g.: say I have a Twitter account that is "koko999". If I went to twitter.com and entered the letter "k" in the form field (after entering the master password), Firefox would suggest the account "koko999" in the drop-down menu.
    4.- After selecting the account that I desired from the drop-down menu, Firefox would automatically autocomplete the password.
    5.- Then, if I closed Firefox, all my active accounts would close/sign out. So, if afterwards I opened Firefox, I would have to repeat from Step 1 if I wanted to use an account, e.g.: if I closed FF while having my Twitter account logged in, and then opened FF again, I would have to start from Step 1.
    Now, I had this setting for a bunch of different websites. After installing Firefox 5.0, this configuration vanished or something. Now, when entering the master password, Firefox autocompletes EVERYTHING. Say, using the example from before, that I go to twitter.com. Firefox asks for the master password, I enter it and then the ID/password for the twitter account automatically fills in without me entering any letter in the form field. And I do not want Firefox to do that!
    So, I'm asking for help. I know that what I what to do is not impossible, I just can't find the way to do it! I kinda need the exact steps. Thanks a lot!

    See:
    * http://kb.mozillazine.org/Password_only_filled_after_entering_user_name
    * http://kb.mozillazine.org/signon.autofillForms (false)
    If you are in Private Browsing then Firefox wont fill the names and passwords automatically.
    You can set the pref <b>browser.sessionstore.privacy_level</b> to 2 (never) or 1 (non-HTTPS, default in Firefox 3 versions) on the <b>about:config</b> page to disable saving cookies via session restore.
    * http://kb.mozillazine.org/browser.sessionstore.privacy_level
    You can also use [[Clear Recent History]] to clear the "Active Logins" when you close Firefox.
    To open the <i>about:config</i> page, type <b>about:config</b> in the location (address) bar and press the "<i>Enter</i>" key, just like you type the url of a website to open a website.<br />
    If you see a warning then you can confirm that you want to access that page.<br />
    You can use the Filter bar at to top of the about:config page to locate a pref more easily.

  • Is their a way to turn on auto-capitalization of the first letter of every word??

    i want da first letter to be in caps without me pressing caps lock or using shift
    i.e Like This But Without Using Those Two Keys

    There have been some threads here about large-scale deployment, but I don't know whether they would help after Firefox has been installed.
    Random thought:
    I suspect (but haven't checked) that changing the "Clear Recent History" options would add corresponding entries to prefs.js in the user's profile folder. (These usually are added during Firefox shut-down.) That's just a plain text file and you could append to it by a variety of means.
    It might be possible to use a VBScript during logon to update that file before the user starts Firefox. The script would have to detect the random folder name(s) in order to make the update.

  • Creating timeline space before the current start point

    Ok, this is probably a simple answer, but I'm relatively new at FCP:
    After review a sequence, I realize that I want to add clips BEFORE that sequence's current start point. I can do this by grabbing all the clips on the timeline and sliding them to the right, but this is cumbersome. Is there a simpler way of doing this?

    INSERT editing. F9...the YELLOW option.
    Or...press TTTT (T four times) and grab the clip in front of everything and it will highlight everything after it...then move it down to give you some room to work.
    I find that my single most helpful tool...use it a lot.
    Shane

  • Can iTunes capitalize the first letter of every word?

    I know there are id3 tag software for this but they are confusing and all that i have tried have all messed up my music. I like it organized. I just want everythign capitalized and if I look at my music in windows explorer i just want to see...
    Tr# Title
    01 Stairway To Heaven
    I have it all organized in folders so i dont need anything else. But i just want to capitalize everything can itunes do this? thanks.

    Try searching VersionTracker for "tag editor" and perhaps you'll come up with something you can use.
    Oh, and I really don't mean this as a flame, but you waited less than twelve hours, most of those being the wee hours of the morning in the US. So you weren't likely to get a response during those times. Just to set expectations for future posts. Cheers.
    Message was edited by: Dave Sawyer

Maybe you are looking for