[lnkForumImage]
TotalShareware - Download Free Software

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


 

qbr

11/14/2005 8:36:00 AM

How can i specify account numbers that start with a specific value
like for 100001, 100002, 100456, 100645 : 100*
I know we use 100* while speciying ranges but how do i actually code this?
if(salesTable.accountNum == '100*') ???


7 Answers

hghrp

11/14/2005 9:20:00 AM

0

if (substr(salesTable.accountNum, 2) == '100')

Hth, harald

"qbr" wrote:

> How can i specify account numbers that start with a specific value
> like for 100001, 100002, 100456, 100645 : 100*
> I know we use 100* while speciying ranges but how do i actually code this?
> if(salesTable.accountNum == '100*') ???
>
>

hghrp

11/14/2005 9:22:00 AM

0

sorry,
if (substr(salesTable.accountNum, 3) == '100')


"hghrp" wrote:

> if (substr(salesTable.accountNum, 2) == '100')
>
> Hth, harald
>
> "qbr" wrote:
>
> > How can i specify account numbers that start with a specific value
> > like for 100001, 100002, 100456, 100645 : 100*
> > I know we use 100* while speciying ranges but how do i actually code this?
> > if(salesTable.accountNum == '100*') ???
> >
> >

qbr

11/14/2005 9:33:00 AM

0

thanks for the reply. But it gives me an error. not sure what is wrong. any
suggestions?

"hghrp" wrote:

> sorry,
> if (substr(salesTable.accountNum, 3) == '100')
>
>
> "hghrp" wrote:
>
> > if (substr(salesTable.accountNum, 2) == '100')
> >
> > Hth, harald
> >
> > "qbr" wrote:
> >
> > > How can i specify account numbers that start with a specific value
> > > like for 100001, 100002, 100456, 100645 : 100*
> > > I know we use 100* while speciying ranges but how do i actually code this?
> > > if(salesTable.accountNum == '100*') ???
> > >
> > >

hghrp

11/14/2005 9:51:00 AM

0

i assume the field accountNum is not defined within salesTable - do you mean
custaccount?

if (substr(salesTable.CustAccount, 1, 3) == '100')

"qbr" wrote:

> thanks for the reply. But it gives me an error. not sure what is wrong. any
> suggestions?
>
> "hghrp" wrote:
>
> > sorry,
> > if (substr(salesTable.accountNum, 3) == '100')
> >
> >
> > "hghrp" wrote:
> >
> > > if (substr(salesTable.accountNum, 2) == '100')
> > >
> > > Hth, harald
> > >
> > > "qbr" wrote:
> > >
> > > > How can i specify account numbers that start with a specific value
> > > > like for 100001, 100002, 100456, 100645 : 100*
> > > > I know we use 100* while speciying ranges but how do i actually code this?
> > > > if(salesTable.accountNum == '100*') ???
> > > >
> > > >

Khue Trinh

11/14/2005 10:15:00 AM

0

hi qbr,

try using
if(strScan(salesTable.accountnum,"100",1,strLen(salesTable.AccountNum))

Hope it helps,
Khue Trinh
--
ERP Dev.


"qbr" wrote:

> How can i specify account numbers that start with a specific value
> like for 100001, 100002, 100456, 100645 : 100*
> I know we use 100* while speciying ranges but how do i actually code this?
> if(salesTable.accountNum == '100*') ???
>
>

Mike Frank

11/14/2005 3:14:00 PM

0

If you need this to query values from the database write

while select salesTable
where salesTable.AccountNum like '100*'
{
...
}

or build a query in code.

Mike

qbr

11/14/2005 11:25:00 PM

0



"Mike Frank" wrote:

> If you need this to query values from the database write
>
> while select salesTable
> where salesTable.AccountNum like '100*'
> {
> ...
> }
>
> or build a query in code.
>
> Mike
>