[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

microsoft.public.axapta.programming

Is there a equivalence to SQL command IN?

Henke

12/28/2005 12:15:00 PM

Hi
Is there a way to add a range or something else to a DataSource (in a form)
that correspondence to the SQL IN-command? Like this:
select * from TableA where TableA.number IN (select number from TableB)

Thanks in advance!
/henke


3 Answers

rheu

12/29/2005 9:29:00 AM

0

Hi Henke,

As far as I know there is no equivalence for IN in Axapta.
However you might use the following trick:
Loop through TableB and concatenate all the values in a string seperated by
comma's. Use this string in your range on TableA.
--
Regards,
Rob

hghrp

12/29/2005 11:02:00 AM

0

Hi Henke,

use the "exists join" clause of the select command.

Hth,
harald

"Henke" wrote:

> Hi
> Is there a way to add a range or something else to a DataSource (in a form)
> that correspondence to the SQL IN-command? Like this:
> select * from TableA where TableA.number IN (select number from TableB)
>
> Thanks in advance!
> /henke
>
>
>

Henke

12/29/2005 8:26:00 PM

0

Thanks Rob, that was one way of doing it.
/Henke

"rheu" <rob.van.den.heuvel@ictopus.com(no.spam.please)> skrev i meddelandet
news:91BDE3EF-E7B1-4152-B904-7A0715710AF5@microsoft.com...
> Hi Henke,
>
> As far as I know there is no equivalence for IN in Axapta.
> However you might use the following trick:
> Loop through TableB and concatenate all the values in a string seperated
> by
> comma's. Use this string in your range on TableA.
> --
> Regards,
> Rob
>