Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
If i want to pull just the first word (can be of nay length) from a query, what string function can i use?
for ex: select name from... or create table ... or drop table..
so i want to display the first word in a column..from the query column.. how can i do it?
I`m not sure if I understood it.
Do you want to get the first word of a field in a table?
You can try this:
Load subfield( name,' ',1) as firstWord;
select name from ...
The subfield function will segment the string on field name when it finds a space (' ') then, it will return only the first subfield (1 as the last parameter).
Hope I got it right,
Erich
I`m not sure if I understood it.
Do you want to get the first word of a field in a table?
You can try this:
Load subfield( name,' ',1) as firstWord;
select name from ...
The subfield function will segment the string on field name when it finds a space (' ') then, it will return only the first subfield (1 as the last parameter).
Hope I got it right,
Erich
I agree with Erich! Need more explanation if SubField is not what you need. Please explain in detail to get expected answers.
Thanks - DV