ninsignares
New member
- Local time
- Today, 05:10
- Joined
- Sep 5, 2008
- Messages
- 9
Hi,
I've been trying to make a query from a field with text info and i want to return all words from the left to one word which is in other table.
How can I get it?... I've been trying with a InStr Command but it doesn't work properly...
Thnx
PD: this is the sql command line that I have
SELECT Left([PBS].[Texto Aviso],(InStr((InStr((InStr([PBS].[Texto Aviso]," ")+1),[PBS].[Texto Aviso]," ")+1),[PBS].[Texto Aviso]," ")-1)) AS OPC
FROM PBS, modelo
WHERE (((PBS.[ID Clasificación])=264))
GROUP BY Left([PBS].[Texto Aviso],(InStr((InStr((InStr([PBS].[Texto Aviso]," ")+1),[PBS].[Texto Aviso]," ")+1),[PBS].[Texto Aviso]," ")-1));
on this, I return 3 words at the beggining of the field but it doesn't work properly because some records have the word that i need to be counted to, after the 3rd or 4th blankspace.
I've been trying to make a query from a field with text info and i want to return all words from the left to one word which is in other table.
How can I get it?... I've been trying with a InStr Command but it doesn't work properly...

Thnx
PD: this is the sql command line that I have
SELECT Left([PBS].[Texto Aviso],(InStr((InStr((InStr([PBS].[Texto Aviso]," ")+1),[PBS].[Texto Aviso]," ")+1),[PBS].[Texto Aviso]," ")-1)) AS OPC
FROM PBS, modelo
WHERE (((PBS.[ID Clasificación])=264))
GROUP BY Left([PBS].[Texto Aviso],(InStr((InStr((InStr([PBS].[Texto Aviso]," ")+1),[PBS].[Texto Aviso]," ")+1),[PBS].[Texto Aviso]," ")-1));
on this, I return 3 words at the beggining of the field but it doesn't work properly because some records have the word that i need to be counted to, after the 3rd or 4th blankspace.