Search Results

Search found 891 results on 36 pages for 'comma'.

Page 7/36 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • sql-server: how can I list distinct value of table in a single row, separated by comma

    - by RedsDevils
    I have the following Table: CREATE TABLE TEMP (ID INT,SEGMENT CHAR(1),SEGOFF INT,CHECKED SMALLDATETIME) INSERT INTO TEMP VALUES (1,'A',0,'2009-05-01') INSERT INTO TEMP VALUES (2,'B',1,'2009-05-01') INSERT INTO TEMP VALUES (3,'C',0,'2009-05-01') INSERT INTO TEMP VALUES (4,'A',0,'2009-05-02') INSERT INTO TEMP VALUES (5,'B',2,'2009-05-02') INSERT INTO TEMP VALUES (6,'C',1,'2009-05-02') INSERT INTO TEMP VALUES (7,'A',1,'2009-05-03') INSERT INTO TEMP VALUES (8,'B',0,'2009-05-03') INSERT INTO TEMP VALUES (9,'C',2,'2009-05-03') I would like to show Distinct SEGEMENT in Single row separated by comma (e.g: A,B,C) I try as Follow: DECLARE @SEGMENTList varchar(100) SELECT @SEGMENTList = COALESCE(@SEGMENTList + ', ', '') + SEGMENT FROM TEST SELECT @SEGMENTList It shows A, B, C, A, B, C, A, B, C What do I need to change my query? Thanks all!

    Read the article

  • asp.net compare validators to allow comma and dot (both!) as decimal separator

    - by DanC
    I am using a compare validator, which validates that the entered number is a valid double and also validates it against a given value (greater than zero). I am validating money amounts. Because of the location where the app is used, the locale sets the comma as the decimal separator. The problem is that when a user enters the value using the numeric keyboard, the number gets written with the dot as decimal separator, and is rejected by the validation. I'd like to have this validation done before triggering a postback (like a customvalidator would) and accepting both separators. Any ideas? Thanks

    Read the article

  • How to make validation for a textbox that accept only comma(,) & digit in c# web application?

    - by prateeksaluja20
    Hello Experts, I am working on a website.I am using C# 2008.I want to make a text box that accept only numbers & comma(,). for example-919981424199,78848817711,47171111747 or there may be a single number like 919981424199. I was able to do one thing My text box only containing number by using this Regular Expression validation.in its property-Validation Expression i wrote "[0-9]+". This is working but now my requirement is to send bulk SMS & each number is separated by (,). I tried a lot but not getting the ans.so please help me to sort out this problem. Thanks in advance.

    Read the article

  • How do I use comma-separated-value file received from a URL query in Objective-c?

    - by chiemekailo
    How do I use comma-separated-value file received from a URL query in Objective-c? when I query the URL I get csv such as "OMRUAH=X",20.741,"3/16/2010","1:52pm",20.7226,20.7594. How do I capture and use this for my application? My problem is creating/initializing that NSString object in the first place. An example is this link "http://download.finance.yahoo.com/d/quotes.csv?s=GBPEUR=X&f=sl1d1t1ba&e=.csv" which returns csv. I dont know how to capture this as an object since I cannot use an NSXMLParser object.

    Read the article

  • Using the "IN" clause with a comma delimited string from the output of a replace() function in Oracle SQL

    - by Thomas
    Hi All, I have an comma delimited string which I want to use in an "IN" clause of the statement. eg: 100,101,102 Since In and "IN" clause I have to quote the individial strings, I use a replace function: eg: select ''''||replace('100,101,102',',',''', ''')||'''' from dual; The above query works, however, when I try to use the output of the above as an input to the "IN" clause, it returns no data. I am restricted by only SQL statements, so I cannot use PL/SQL code. Kindly help. eg: select * from employee where employee_number in ( select ''''||replace('100,101,102',',',''', ''')||'''' from dual); The above does not work. Please let me know what I am missing.

    Read the article

  • PHP: Display comma after each element except the last. Using 'for' statement and no 'implode/explode

    - by Jonathan
    hi, so I have this simple for loop to echo an array: for ($i = 0; $i < count($director); $i++) { echo '<a href="person.php?id='.$director[$i]["id"].'">'.$director[$i]["name"].'</a>'; } The problem here is that when more than one element is in the array then I get everything echoed without any space between. I want to separate each element with a comma except the last one. I cant use 'implode' so I'm looking for another solution... Anyone?

    Read the article

  • How to make validation for a textbox that accept only comma(,) & digit in asp.net application?

    - by prateeksaluja20
    I am working on a website. I am using C# 2008. I want to make a text box that accept only numbers & comma(,). for example-919981424199,78848817711,47171111747 or there may be a single number like 919981424199. I was able to do one thing My text box only containing number by using this Regular Expression validation.in its property-Validation Expression i wrote "[0-9]+". This is working but now my requirement is to send bulk SMS & each number is separated by (,). I tried a lot but not getting the ans. so please help me to sort out this problem.

    Read the article

  • Linking each text word or words divided by comma into an existing URL?

    - by Mezelderz
    I am trying to auto add each word or words divided by comma into an existing url. I have url lets say http://stackoverflow.com/search?q=HERE IS THAT TEXT. I have this function: function movie_cast( $atts, $content = null ) { return '<div class="movie_cast">Cast: '.$content.'</div>'; } add_shortcode( 'movie_cast', 'movie_cast' ); I am using it: [movie_cast]Actor 1, Actor 2[/movie_cast] Output from this is just text: Actor 1, Actor 2 How can I get otput it like this: <a href="http://stackoverflow.com/search?q=Actor 1">Actor 1</a>, <a href="http://stackoverflow.com/search?q=Actor 2">Actor 2</a>

    Read the article

  • How would I go about letting a user add and associate a comma separated list of categories while add

    - by Throlkim
    I've been struggling for quite a while to get this feature working: I want my user to be able to select categories when uploading a photograph, but additionally be able to specify a comma-separated list of categories to create/find and associate with the photograph. I've had this working by using an attr_accessor :new_categories on the photographs model, but having that there without the column existing breaks both Paperclip and Exifr. Obviously, image upload and EXIF data retrieval are pretty important for a photography website, but not being able to add categories while uploading a photograph is a pain in the arse. Methods I've tried so far: Using attr_accessor to add a field for new_categories. Breaks gems. Using an Ajax sub-form to add categories. Formtastic can't handle it. Adding a column for new_categories to the photograph model. It works, but it's horrific. I haven't tried using a nested form, but I'd need to intercept it and stop it from processing it as normal. Here's an example of what I'm trying to accomplish: http://imgur.com/rD0PC.png And the function I use to associate the categories: def process_new_categories unless self.new_categories.nil? for title in self.new_categories.split(",") self.categories << Category.find_or_create_by_title(title.strip.capitalize) end end end Has anyone got any ideas as to how to do this?

    Read the article

  • windows 2003 download utility from command line , http or ftp or any other protocol , from one comma

    - by Michael
    Hello , I need to know if there is anyway utility bult-in windows 2003 that I can use from the command line to download a file using only one command. Basically I know that I can download from ftp using the "ftp" utility but in order to do that I need to do first "ftp open" and then pass the other commands so it doesn't help me because I need to do perform the download only from one command. The download may be performed through http, ftp or any other protocol. OS Name: Microsoft(R) Windows(R) Server 2003 Enterprise x64 Editio OS Version: 5.2.3790 Service Pack 2 Build 379 Thank you in advance for any answer !

    Read the article

  • I have a sheet that has 2 cols; in one is the name, in the other there are one or more emails, separed by comma

    - by Totty
    I have an Excel worksheet that has two columns, in one is the name, in the other there are one or more emails, separated by a comma. Now, I want to get two columns with repeated names but unique emails, so no more than one email address in a single cell, I just want column one to have a name and column two to have an email. Now it is like this: name1 email1, email2, email3 name2 email1 name3 email1, email2 And I want it like this: name1 email1 name1 email2 name1 email3 name2 email1 name3 email1 name3 email2 thanks

    Read the article

  • How can I extract a value from comma separated values in Perl?

    - by Octopus
    I have a log file containing statistics from different servers. I am separating the statistics from this log file using regex only. I am trying to capture the CPU usage from the running process. For SunOS, I have below output: process,10050,user1,218,59,0,1271M,1260M,sleep,58.9H,0.02%,java Here the CPU % is at 11th field if we separate by commas (,). To get this value I am using below regex: regex => q/^process,(?:.*?),((?:\d+)\.(?:\d+))%,java$/, For the linux system I have below output: process,26190,user1,20,0,1236m,43m,6436,S,0.0,1.1,0:00.00,java, Here the CPU usage is at 10th column. What regex pattern should I use to get this value?

    Read the article

  • Grails - How to format a value in a textfield into comma style such that it can be easily read?

    - by WaZ
    Hi there, I want to allow users enter numbers in textfield and once the textbox loses focus. The number is formatted with commas. e.g. User enters 100000 textfield looses focus value displayed: 100,000 How can I achieve this in Grails. I have looked at <g:formatNumber number="${myNumber}" format="\\$###,##0" /> But it doesnt solve my problem as the number is from a textfield. thanks Much appreciated.

    Read the article

  • How to replace empty string with zero in comma-separated string?

    - by dsaccount1
    "8,5,,1,4,7,,,,7,,1,9,3,6,,,8,6,3,9,,2,5,4,,,,,3,2,,,7,4,1,1,,4,,6,9,,5,,,,5,,,1,,6,3,,,6,5,,,,7,4,,1,7,6,,,,8,,5,,,7,1,,3,9," I'm doing a programming challenge where i need to parse this sequence into my sudoku script. Need to get the above sequence into 8,5,0,1,4,7,0,0,0,7,0,1,9,3,6,0,0,8......... I tried re but without success, help is appreciated, thanks.

    Read the article

  • How to read comma separated values from text file in JAVA?

    - by user1425223
    I have got this text file with latitude and longitude values of different points on a map. I want to store these coordinates into a mySQL database using hibernate. I want to know how can I split my string into latitudes and longitudes? What is the general way to do these type of things that is with other delimiters like space, tab etc.? File: 28.515046280572285,77.38258838653564 28.51430151808072,77.38336086273193 28.513566177802456,77.38413333892822 28.512830832397192,77.38490581512451 28.51208605426073,77.3856782913208 28.511341270865113,77.38645076751709 28.510530488025346,77.38720178604126 28.509615992924807,77.38790988922119 28.50875805732363,77.38862872123718 28.507994394490268,77.38943338394165 28.50728729434496,77.39038825035095 28.506674470385246,77.39145040512085 28.506174780521828,77.39260911941528 28.505665660113582,77.39376783370972 28.505156537248446,77.39492654800415 28.50466626846366,77.39608526229858 28.504175997400655,77.39724397659302 28.503685724059455,77.39840269088745 28.503195448440064,77.39956140518188 28.50276174118543,77.4007523059845 28.502309175192945,77.40194320678711 28.50185660725938,77.40313410758972 28.50140403738471,77.40432500839233 28.500951465568985,77.40551590919495 28.500498891812207,77.40670680999756 28.5000463161144,77.40789771080017 28.49959373847559,77.40908861160278 Code I am using to read from file: try { BufferedReader in = new BufferedReader(new FileReader("G:\\RoutePPAdvant2.txt")); String str; str = in.readLine(); while ((str = in.readLine()) != null) { System.out.println(str); } in.close(); } catch (IOException e) { System.out.println("File Read Error"); }

    Read the article

  • Split a string by comma, quote and full-stop.. with a few exceptions

    - by dunc
    I've got a lot of text, similar to the following paragraph, which I'd like to split into words without punctuation (', ", ,, ., newline etc).. with a few exceptions. Initially considered endemic to the Chalakudy River system in Kerala state, southern India, but now recognised to have a wider distribution in surrounding drainages including the Periyar, Manimala, and Pamba river though the Manimala data may be questionable given it seems to be the type locality of P. denisonii. In the Achankovil River basin it occurs sympatrically, and sometimes syntopically, with P. denisonii. Wild stocks may have dwindled by as much as 50% in the last 15 years or so with collection for the aquarium trade largely held responsible although habitats are also being degraded by pollution from agricultural and domestic sources, plus destructive fishing methods involving explosives or organic toxins. The text refers to P. denisonii which is a species of fish. It's an abbreviation of Genus species. I would like this reference to be one word. So, for instance, this is the kind of array I'd like to see: Array ( ... [44] given [45] it [46] seems [47] to [48] be [49] the [50] type [51] locality [52] of [53] P. denisonii [54] In [55] the ... ) The only things that distinguish these species references such as P. denisonii from a new sentence like end. New are: The P (for Puntius, as in the P. in the aforementioned example) is only ever one letter, always a capital the d (as in . denisonii) is always either a lower case letter or an apostrophe (') What regexp can I use with preg_split to give me such an array? I've tried a simple explode( " ", $array ) but it doesn't do the job at all. Thanks in advance,

    Read the article

  • SQL SERVER – Importing CSV File Into Database – SQL in Sixty Seconds #018 – Video

    - by pinaldave
    Importing data into database is one of the most important tasks. I often receive questions regarding what is the quickest way to insert CSV data or how to import CSV Data into SQL Server Table. Honestly the process is very simple and the script is even simpler. In today’s SQL in Sixty Seconds Video we will learn how quickly we can insert CSV data into SQL Server. The steps to import CSV are very simple. Create Table Use Bulk Insert to import the data Verify the data Done! Absolutely it is that simple. More on Importing CSV Data: SQL SERVER – Import CSV File Into SQL Server Using Bulk Insert – Load Comma Delimited File Into SQL Server SQL SERVER – Import CSV File into Database Table Using SSIS SQL SERVER – Create a Comma Delimited List Using SELECT Clause From Table Column SQL SERVER – Comma Separated Values (CSV) from Table Column SQL SERVER – Comma Separated Values (CSV) from Table Column – Part 2 I encourage you to submit your ideas for SQL in Sixty Seconds. We will try to accommodate as many as we can. If we like your idea we promise to share with you educational material. Reference: Pinal Dave (http://blog.sqlauthority.com) Filed under: Database, Pinal Dave, PostADay, SQL, SQL Authority, SQL in Sixty Seconds, SQL Query, SQL Scripts, SQL Server, SQL Server Management Studio, SQL Tips and Tricks, T SQL, Technology, Video

    Read the article

  • how to think like a computer scientist java edition exercise 7.2 [on hold]

    - by James Canfield
    I cannot figure out how to write this program, can someone please help me?! The purpose of this method is to practice manipulating St rings. Create a new program called Name.java. This program will take a name string consisting of EITHER a first name followed by a last name (nonstandar d format) or a last name followed by a comma then a first name (standard format). Ie . “Joe Smith” vs. “Smith, Joe”. This program will convert the string to standard format if it is not already in standard format. Write a method called hasComma that takes a name as an argument and that returns a boolean indicating whether it contains a comma. If i t does, you can assume that it is in last name first format. You can use the indexOf String m ethod to help you. Write a method called convertName that takes a name as an argument. It should check whether it contains a comma by calling your hasComma method. If it does, it should just return the string. If not, then it should assume th at the name is in first name first format, and it should return a new string that contains the name converted to last name comma first format. Uses charAt, length, substring, and indexOf methods. In your main program, loop, asking the user for a n ame string. If the string is not blank, call convertName and print the results. The loop terminat es when the string is blank. HINTS/SUGGESTIONS: Use the charAt, length, substring, and indexOf Str ing methods. Use scanner for your input. To get the full line, complete with spaces, use reader.nextLine()

    Read the article

  • Notepad ++ regular expression

    - by arvindwill
    have javascript file will millions of lines. The problem is IE dont support ','(comma) followed by '}'(curly close bracket) by using notepadd++ need to find all the comma which is followed by curly close bracket. So regular expression \,.*\} works. but the problem between the comma and close bracket many tab space or newline or linefeed can be there . cant able to provide the newline with spaces in regular expression. like below one somestring, }

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >