2uzhan.com
Advertisement
Now Place:2uzhan.com » Tomar datos de un campo de forma parcial

Tomar datos de un campo de forma parcial

MySQL @ September 24, 2009   Views:0

Que tal?

Estoy haciendo una vista de una tabla, el tema es que tengo que tomar de forma parical los datos de un campo de la tabla.

el campo es: aaa:11111111:bbb

Solo me interesa tomar 111111111 dejando afuera aaa y bbb.

No recuerdo como se hacia esto.

gracias.

--------------Solutions-------------

>How do I extract a substring from a string field. The field is of the type 'aaa:bbbb:ccccc'. I just want to take 'bbbb', leaving out 'aaa ccccc'.

Is this a fair translation? If so, there must be a hundred ways to do this. Here's one:

SET @string = 'aaa:bbbb:ccccc';

SELECT SUBSTR(@string,LOCATE(':',@string)+1,LENGTH(@string)-LOCATE(':',REVERSE(@string))-LOCATE(':',@string))x;

That's a better translation than the one I came up with -

"That such? I am doing a view of a board, the theme is that I have to take of form parical the data of a field of the board. the field is: aaa:11111111:bbb Alone it interests me to take 111111111 leaving outside aaa and bbb. I do not remember as itself toward this." JAJAJAJJAJJAJAJ!!!!

I'm really SORRY! I made a mistake! I thought I was in spanish forum!

Thanks both of you..

and laptop, you made a fantastic translation!
(Or I should say "you did a fantastic translation".. jajajaa)

cheers!

Edited 2 time(s). Last edit at 09/25/2009 09:35AM by sadzas sadzas.

Tags:
© 2018 2uzhan.com Contact