I see. In the table a1 if you have No field.
So,
select a1.*, a2.* from a1 inner join a2 on a1.Column1 = a2.Column2 and a1.No <= a2.nCount
>i have tables a1 have fields
>no column1 sum1, sum2 total
> 1 1
> 2 1
> 3 1
> 4 1
> 5 1
>1 2
>2 2
>3 2
>4 2
>1 3
>2 3
>3 3
>4 3
>5 3
>6 3
>1 4
>
>2 4
>.
>.
> .
>************************
>another table mas have
>column1 ncount
>1 3
>2 2
>3 4
>
>i need new cursor or table have 3 records from a1 and 2 records where column1=2...etc
>no column1 sum1, sum2 total
> 1 1
> 2 1
> 3 1
>1 2
>2 2
>1 3
>2 3
>3 3
>4 3
>>>122130472 the result after i run
>>>table a1=70439 records
>>>
>>>table mas have 18 records
>>>
>>>
>>
>>Can you explain again what do you want to achieve - may be I misunderstood you. You obviously will not be able to create that many records.
If it's not broken, fix it until it is.
My Blog