selecting records greater than (string)

  • Thread starter Thread starter Rodolfo Fontes
  • Start date Start date
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
 
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
 
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).
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top