[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.axapta.programming

query add range with like and or ?

Marcin Krzyzanowski

11/25/2005 3:22:00 PM

How to create query for Form like this:

select Table where ((Table.field1 like "*foo*") || (Table.field2 like
"*foo*")

I can't do this "||", I'm cofused, please help.

Regards.
4 Answers

Vishal

11/28/2005 5:08:00 AM

0

Hi Marcin...
U can use || operator...
static void testJobQuery(Args _args)
{
SalesTable lSalesTable;
;
WHILE SELECT lSalesTable
WHERE lSalesTable.SalesId == '00741_036'
|| lSalesTable.SalesId == '00740_036'
{
Print lSalesTable.SalesId;
}
Pause;
}

Also, u can do this using Query, QueryBuildDataSource, QueryRange and
QueryValue.
--
Vishal
Technical consultant Microsoft Axapta


"Marcin Krzyzanowski" wrote:

> How to create query for Form like this:
>
> select Table where ((Table.field1 like "*foo*") || (Table.field2 like
> "*foo*")
>
> I can't do this "||", I'm cofused, please help.
>
> Regards.
>

Mike Frank

11/28/2005 7:50:00 AM

0

You have to use "Expressions in query ranges". There is an article on that on Axaptapedia

http://www.axaptapedia.com/index.php/Expressions_in_qu...

Mike

Marcin Krzyzanowski

11/28/2005 10:05:00 AM

0

Mike Frank napisa3(a):
> You have to use "Expressions in query ranges". There is an article on
> that on Axaptapedia
>
> http://www.axaptapedia.com/index.php/Expressions_in_qu...


Yeap, I've check it, but seems my case is exactly like the one in
"Limitations" section ;)


Regards.

Marcin Krzyzanowski

11/28/2005 10:08:00 AM

0

Vishal napisa3(a):
> Hi Marcin...
> U can use || operator...
> static void testJobQuery(Args _args)
> {
> SalesTable lSalesTable;
> ;
> WHILE SELECT lSalesTable
> WHERE lSalesTable.SalesId == '00741_036'
> || lSalesTable.SalesId == '00740_036'
> {
> Print lSalesTable.SalesId;
> }
> Pause;
> }

Thanks, I know I can build long range using values from select but

>
> Also, u can do this using Query, QueryBuildDataSource, QueryRange and
> QueryValue.

this is what is problem for me now, how to build using with Query....
how to use || and "like" on two or more columns with query, at the same
time.