I sill haven't solved the problem.
Thanks for your reply, but that won't work since the first and third
parameter for strfmt will be blank because it is supplied with blank value
rather than column name. When I change it to colum name -which the same as
the first job I posted- it raises query extended failure.
Regards,
Agus
On 2/6/06, solary_luo <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> Have you resolved? If not, you can try it.
>
> Replace the strRange sentence like below:
>
> strRange = strfmt('(%1 == "%2") || (%3 == "%4")',prodtable.dimension
> [1],'admin',prodtable.dimension[2],'fina');
>
> Regards,
>
>
>
>
> --- In [email protected], "Agus Riyadi"
> <[EMAIL PROTECTED]> wrote:
> >
> > Dear All,
> >
> > There have been a lot of discussion about query with or, but I
> don't
> > find one that address to array field.
> >
> > I have a query like this, which I need to change it to a query
> > object :
> >
> > select prodtable where prodtable.dimension[1] == 'admin'
> > || prodtable.dimension[2] == 'fina';
> >
> > I tried this job to buid a query object :
> >
> > static void job11(Args _args)
> > {
> >
> > ProdTable ProdTable;
> > QueryBuildDataSource ds;
> > Query q;
> > QueryRun qr;
> > QueryBuildRange range;
> > Str strRange;
> > ;
> >
> > q = new Query();
> > ds = q.addDataSource(tablenum(ProdTable));
> > range = ds.addRange(fieldnum(ProdTable,Dimension));
> >
> > strRange = strfmt('(%1 == "%2") || (%3 == "%4")',
> > 'dimension[1]','admin',
> > 'dimension[2]','fina');
> >
> > range.value(strRange);
> >
> > qr = new QueryRun(q);
> >
> > while(qr.next())
> > {
> > PRODTABLE = qr.getNo(1);
> > info(prodTable.ProdId);
> > }
> >
> > }
> >
> > But an error raised :
> >
> > Query extended range failure: Right parenthesis expected near pos
> 0.
> >
> >
> > Can anyone give a clue to correct that code, or there any
> > alternatives ?
> > Thanks for any comments.
> >
> >
> > Regards,
> >
> > Agus
> >
>
>
>
>
>
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
[Non-text portions of this message have been removed]
SPONSORED LINKS
| Computer part | Programming languages | Microsoft axapta |
| Support exchange |
YAHOO! GROUPS LINKS
- Visit your group "development-axapta" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

