hoverinc — 2011-02-03T08:23:06-05:00 — #1
Hello everybody, I am trying to insert in the letter field the first letter of the FILEDX's content, How can i do it???
Any ideas is most appreciated, thanks
rguy84 — 2011-02-03T08:26:53-05:00 — #2
hoverinc — 2011-02-03T08:29:25-05:00 — #3
Thanks for your swift reply rguy84, i will check it now
rguy84 — 2011-02-03T08:34:02-05:00 — #4
this will chop the strings up, you'll still have to insert them.
hoverinc — 2011-02-03T08:55:13-05:00 — #5
you are right, but when i chop the characters and get, how can i deal with it to insert it in the second field, please if you have idea
hoverinc — 2011-02-03T08:59:32-05:00 — #6
SELECT SUBSTRING('artist_name',1,1) this is it what i was looking, now i will try to find out how to insert it into the second field, if you have any idea while mine goes well its most appreciated, with lots of thanks
rguy84 — 2011-02-03T09:06:14-05:00 — #7
INSERT INTO tabl_name('firstLetter')
hoverinc — 2011-02-03T09:16:03-05:00 — #8
Thanks,Yes infact this worked with me too
insert into tbl1 (letter)
But now i will do compare using where field's ID = same ID to be inserted respectively
hoverinc — 2011-02-03T09:19:19-05:00 — #9
And also i want to use UPDATE instead of insert because some fields contains some data, hope if you have any suggestions, with my infinite thanks
guido2004 — 2011-02-03T09:22:42-05:00 — #10
SET letter = SUBSTRING(field, 1, 1)
r937 — 2011-02-03T09:29:53-05:00 — #11
i should think that a relatively germane question is why would you want to do that?
hoverinc — 2011-02-03T09:32:19-05:00 — #12
Also i have checked this one it works
SELECT LEFT(FIELD, 1)FROM TABLE
hoverinc — 2011-02-03T09:37:35-05:00 — #13
SET letter = SUBSTRING(FIELD, 1, 1)
With this we did it, same thanks to all of you guys for today we have solved our problem and we achieved our duty... thanks AGAIN
hoverinc — 2011-02-03T10:01:48-05:00 — #14
Thanks so much, that helped me lot
hoverinc — 2011-02-03T10:03:25-05:00 — #15
Yes because I was in a need to put that first letter in a field that was requesting the letter:)
r937 — 2011-02-03T10:17:38-05:00 — #16
why would you want to have a separate column containing the first letter only?
guido2004 — 2011-02-03T10:25:44-05:00 — #17
hoverinc — 2011-02-03T10:50:12-05:00 — #18
Well you're right, this letter appears when its categorized by letters
rguy84 — 2011-02-03T11:05:46-05:00 — #19
So why don't you group them by distinct values of the results dynamically.
Ex: You have the results Ryan, Rudy, Guido. I am assuming you want like a a-z list. Currently you'd get R,R,G, which R, G would be cleaner.
hoverinc — 2011-02-03T11:15:43-05:00 — #20
It's not working in this manner, only this field should appear with a letter, that was the aim;)
next page →