Selasa, 10 April 2012

RE: [MS_AccessPros] Extracting left most number through query

 

Hello Abdul

From your example, I think you mean the *right*-most number, not left-most.
Furthermore, from your last example I think you want to extract *everything
after the last space*.

If so, then this expression should work:

Mid( [ProductName], InStrRev( [ProductName], " " ) + 1 )

Best wishes,
Graham

> From: MS_Access_Professionals@yahoogroups.com
[mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of Abdul Shakeel
> Sent: Tuesday, 10 April 2012 18:15
> To: MS_Access_Professionals@yahoogroups.com
> Subject: [MS_AccessPros] Extracting left most number through query
>
>  
> Dear All
>
> I have a product table with product name like following in it
>
> EM1 udr 3
> C1/2 HW dr 4 C1 MM udr 5/0 C1 UM udr 10/0 H2 dr 10
> C1 SEL udr 18/0
> C1/2 EL udr 18/0
> EL1 F 16/0
>
> I am trying to create a query to extract the left most number from product
> name let say
>
> from EM1 udr 3 I want to extract 3
> from C1/2 HW dr 4 I want to extract 4
> from C1 MM udr 5/0 I want to extract 5/0 and so on...
>
> any idea??


__._,_.___
.

__,_._,___

Tidak ada komentar:

Posting Komentar