Search Results

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

Page 17/36 | < Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >

  • mysql select update

    - by Tillebeck
    Got this: Table a ID RelatedBs 1 NULL 2 NULL Table b AID ID 1 1 1 2 1 3 2 4 2 5 2 6 Need Table a to have a comma separated list as given in table b. And then table b will become obsolete: Table a ID RelatedBs 1 1,2,3 2 4,5,6 This does not rund through all records, but just ad one 'b' to 'table a' UPDATE a, b SET relatedbs = CONCAT(relatedbs,',',b.id) WHERE a.id = b.aid

    Read the article

  • how to ignore already checked checkboxes in vb.net / asp.net ?

    - by user559800
    If i have 3 asp.net checkboxes in my asp.net webform namely : CheckBox1, Checkbox2, Checkbox3 and a textbox namely textbox1 If Checkbox1.text ="1" Checkbox2.text ="2" Checkbox3.text ="3" I WANT : if checkbox1 is already checked ... if checkbox is remain checked and even after i check checkbox2 and checkbox3 then the output in textbox would be 2,3 ..... by ignoring already checked checkbox text ... LOGIC I WANT : Ignore already check checkboxes and insert recent checkbox text to textbox1 as comma seperated string ... How to do that ?

    Read the article

  • regular expression help

    - by JPro
    I always get confused using regular expressions. Can anyone please suggest me a tutorial? I need help with checking for a string which, cannot contain any wild characters except colon, comma, full stop. It will be better to replace these if found. Any help? Thanks.

    Read the article

  • Looking for regex to extract email addresses from /etc/passwd

    - by Brent
    Most of my users have email addresses associated with their profile in /etc/passwd. They are always in the 5th field, which I can grab, but they appear at different places within a comma-separated list in the 5th field. Can somebody give me a regex to grab just the email address (delimeted by commas) from a line in this file? (I will be using grep and sed from a bash script) Sample lines from file: user1:x:1147:5005:User One,Department,,,[email protected]:/home/directory:/bin/bash user2:x:1148:5002:User Two,Department2,[email protected],:/home/directory:/bin/bash

    Read the article

  • Why is this c# snippet legal?

    - by Sir Psycho
    Silly question, but why does the following line compile? int[] i = new int[] {1,}; As you can see, I haven't entered in the second element and left a comma there. Still compiles even though you would expect it not to.

    Read the article

  • How to turn a list of tuples into a string?

    - by matt
    I have a list of tuples that I'm trying to incorporate into a SQL query but I can't figure out how to join them together without adding slashes. My like this: list = [('val', 'val'), ('val', 'val'), ('val', 'val')] If I turn each tuple into a string and try to join them with a a comma I'll get something like ' (\'val\, \'val\'), ... ' What's the right way to do this, so I can get the list (without brackets) as a string?

    Read the article

  • Ruby: Is there a way to split a string only with the first x occurrencies?

    - by zxcvbnm
    For example, suppose I have this: 001, "john doe", "male", 37, "programmer", "likes dogs, women, and is lazy" The problem is that the line is only supposed to have 6 fields. But if I separate it with split I get more, due to the comma being used improperly to separate the fields. Right now I'm splitting everything, then when I get to the 5-th index onward I concatenate all the strings. But I was wondering if there was a split(",",6) or something along these lines.

    Read the article

  • string parsing occurrence in c

    - by Dan74
    I have a string as const char *str = "Hello, this is an example of my string"; How could I get everything after the first comma. So for this instance: this is an example of my string I was planing to do something like: // pseudocode char *a, *b; loop { if((a = strchr(l, ',')) == NULL) break; b++; // but not sure here } printf("%s",a); Thanks

    Read the article

  • JavaScript Question for IE6

    - by Lijo
    Hi Team, I have a javascript requirement. I will pass a comma separated string into a function. I need to ensure that it contains only integers (without decimals) and the value is less than 2147483648. Could you please help me ? Note:: I am working on IE 6 Thanks Lijo

    Read the article

  • Any disadvantages to this tagging approach

    - by donpal
    I have a table of tags ID tag --- ------ 1 tagt 2 tagb 3 tagz 4 tagn In my items table, I'm using those tags in serialized format, comma delimited ID field1 tags ---- ------ ----- 1 value1 tagt,tagb 2 value2 tagb 3 value3 tagb,tagn 4 value4 When I need to find items that have this tag, I plan to deserialize the tags. But I'm not actually sure how to do it, and if it's better to have a third table for associations instead between the tags and the items.

    Read the article

  • MySQL - query to return CSV in a field?

    - by StackOverflowNewbie
    Assume I have the following tables: TABLE: foo - foo_id (PK) TABLE: tag - tag_id (PK) - name TABLE: foo_tag - foo_tag_id (PK) - foo_id (FK) - tag_id (FK) How do I query this so that I get a result like this: ========================== | foo_id | tags | ========================== | 1 | foo, bar | | 2 | foo | | 3 | bar | -------------------------- Basically, I need all of foo's tags in one column, comma separated. Possible in MySQL?

    Read the article

  • Using JavaScript's split to chop up a string and put it in two arrays

    - by Pieter
    I can use JavaScript's split to put a comma-separated list of items in an array: var mystring = "a,b,c,d,e"; var myarray = mystring.split(","); What I have in mind is a little more complicated. I have this dictionary-esque string: myvalue=0;othervalue=1;anothervalue=0; How do I split this so that the keys end up in one array and the values end up in another array?

    Read the article

  • mySQL search for a number in VARCHAR field

    - by sea_1987
    Hi There, I have a field in my database that contain comma seperated values these values are numbers, and I am trying to do a search and count the number of times that a number appears in that column throughout the column, $sql = "SELECT sector_id_csv, COUNT(sector_id_csv) as count FROM cv WHERE sector_id_csv LIKE '$sectorId'"; This seems slow and does not return any results, and I know the sector_id it is search exsists in the table.

    Read the article

  • PHP - How to remove the first number in a string?

    - by Dodi300
    Hello. How can I remove the first number in a string? Say if I had these 48 numbers seperated with a ',' (comma): 8,5,8,10,15,20,27,25,60,31,25,39,25,31,26,28,80,28,27,31,27,29,26,35,8,5,8,10,15,20,27,25,60,31,25,39,25,31,26,28,80,28,27,31,27,29,26,35 How would I remove the "8," from the string? Thanks.

    Read the article

  • PHP mySQL - replace some string inside string

    - by apis17
    i want to replace ALL comma , into ,<space> in all address table in my mysql table. For example, +----------------+----------------+ | Name | Address | +----------------+----------------+ | Someone name | A1,Street Name | +----------------+----------------+ Into +----------------+----------------+ | Name | Address | +----------------+----------------+ | Someone name | A1, Street Name| +----------------+----------------+ Thanks in advance.

    Read the article

  • About to migrate :string but I'm thinking :text might be better. Performance/Purpose?

    - by Sam
    class CreateScrapes < ActiveRecord::Migration def self.up create_table :scrapes do |t| t.text :saved_characters t.text :sanitized_characters t.string :href t.timestamps end end def self.down drop_table :scrapes end end I'm about to rake db:migrate and I'm think about the attribute type if I should be using text or string. Since saved_characters and sanitized_characters will be arrays with thousands of unicode values, its basically comma delimited data, I'm not sure if `:text' is really the right way to go here. What would you do?

    Read the article

  • How to get Master and Slave Table data in one row using SQL Server ?

    - by Space Cracker
    I have main table called 'Employee' and another slave table called 'EmployeeTypes' that has a FK from 'Employee'. Each row in 'Employee' can have zero or many rows in 'EmployeeTypes' and I want to make an SQL Query that returns data of all Employees and each employee row should contain its related data in 'EmployeeTypes' (for example column called 'TypeID') as a comma separated list, like this: Meco Beco --- 45 ---- 1,2,3

    Read the article

  • oracle search word in string

    - by Atul
    I want to search a word in string in ORACLE in which string is comma separated. Eg. String is ('MF1,MF2,MF3') and now I want to search whether 'MF' exists in that or not. If I am using instr('MF1,MF2,MF3','MF') it will give wrong result since I want to search Full MF in MF1 or MF2 or MF3.

    Read the article

  • When writing a form submit to a file, strip line breaks and commas

    - by bccarlso
    I have a form with a textarea in it. I log the results to a text file on the server, but I would like to strip out any line breaks a user would put in the textarea, as well as any commas that would interfere with importing the comma-delimited log text file into Excel or something for later use. I think this has to do with regex, but I'm no expert and could use some help. Or maybe there is an easy PHP function that will do it?

    Read the article

  • Add more strings in an object with php

    - by Nakome
    how can I add more strings in this object with php. I have managed to generate strings, but do not add more strings in an objects, nor remove the last comma. like this: Before, { "themes":[ { "name": "Amelia", "description": "Sweet and cheery.", "thumbnail": "http://bootswatch.com/amelia/thumbnail.png" } ] } After, { "themes":[ { "name": "juan", "description": "esto es un ejemplo.", "thumbnail": "http://example.com" }, { "name": "juan2", "description": "esto es un ejemplo2.", "thumbnail": "http://example2.com" }, ] } Thanks and sorry for my english.

    Read the article

  • Passing delimited string to stored procedure to search database

    - by rs
    How can i pass a string delimited by space or comma to stored procedure and filter result? I'm trying to do something like - Parameter Value -------------------------- @keywords key1 key2 key3 Then is stored procedure i want to first find all records with first or last name like key1 filter step 1 with first or last name like key2 filter step 2 with first or last name like key 3

    Read the article

  • How to get N random string from a {a1|a2|a3} format string?

    - by Pentium10
    Take this string as input: string s="planets {Sun|Mercury|Venus|Earth|Mars|Jupiter|Saturn|Uranus|Neptune}" How would I choose randomly N from the set, then join them with comma. The set is defined between {} and options are separated with | pipe. The order is maintained. Some output could be: string output1="planets Sun, Venus"; string output2="planets Neptune"; string output3="planets Earth, Saturn, Uranus, Neptune"; string output4="planets Uranus, Saturn";// bad example, order is not correct Java 1.5

    Read the article

  • Passing multiple parameters of same column to SQL Server select SP

    - by Bill
    I have a string value in the web.config — for example 2 guids seperated by a ",". I need to query the database dynamically (i.e i have no idea how many values could be seperated by a comma in the web.config) and run a select statement on the table passing these values and getting all that is relevant for example: select * from tablename where columnname = string1 string2 string3 etc etc some strings may only contain 1 guid some may contain 10

    Read the article

< Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >