selecting records greater than (string)

R

Rodolfo Fontes

Hi group,

I've done the following quey:
SELECT [T Produtos_Itens].[Part#F]
FROM [T Produtos_Itens]
WHERE ((Len("part#F")>"15"));

But it's not selecting the strings greater than 15 caracters.. How can i do
that?

Thanks,
Rodolfo Fontes
 
R

Rodolfo Fontes

Thanks Allen.

I've been more than once on this situation...
Should I change the SQL to the querie make i want?
Or can i use the Structure mode?


Allen Browne said:
Try:
WHERE Len([T Produtos_Itens].[Part#F]) > 15;

Your current WHERE clause is testing the length of the literal string
"part#F" (yields the numeric value 6) with the string value "15" (string,
because you have it in quotes).

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Rodolfo Fontes said:
Hi group,

I've done the following quey:
SELECT [T Produtos_Itens].[Part#F]
FROM [T Produtos_Itens]
WHERE ((Len("part#F")>"15"));

But it's not selecting the strings greater than 15 caracters.. How can i
do that?

Thanks,
Rodolfo Fontes
 
A

Allen Browne

Try:
WHERE Len([T Produtos_Itens].[Part#F]) > 15;

Your current WHERE clause is testing the length of the literal string
"part#F" (yields the numeric value 6) with the string value "15" (string,
because you have it in quotes).
 
A

Allen Browne

Whichever is easiest.

Simplest might be to go into SQL View (View menu, from query design), and
set up the WHERE clause. You can then switch back to Design view, and see
how it would appear there.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Rodolfo Fontes said:
Thanks Allen.

I've been more than once on this situation...
Should I change the SQL to the querie make i want?
Or can i use the Structure mode?


Allen Browne said:
Try:
WHERE Len([T Produtos_Itens].[Part#F]) > 15;

Your current WHERE clause is testing the length of the literal string
"part#F" (yields the numeric value 6) with the string value "15" (string,
because you have it in quotes).


Rodolfo Fontes said:
Hi group,

I've done the following quey:
SELECT [T Produtos_Itens].[Part#F]
FROM [T Produtos_Itens]
WHERE ((Len("part#F")>"15"));

But it's not selecting the strings greater than 15 caracters.. How can i
do that?

Thanks,
Rodolfo Fontes
 
Top