[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: [sqr-users] dynamic array size



I think u can use substitution variables

Instead of giving the count variable directly in array
size param u can give sub variable.

#define Count #count
select count(*) &cnt
 let #count = &cnt
 from abc_table
   show 'count : ' #count
 
 create-array name=BUs size={Count}
      field=legal_entity:char

This will solve the problem.

--- Sony Dada <sony_dada@hotmail.com> wrote:

> Hi,
> 
> I need some advice from sqr experts. Thought it
> would be simple but having 
> hardtime to resolve it.
> 
> Issue:
> 
> create-array name=BUs size=100
>      field=legal_entity:char
> 
> I have to set above 100 as dynamic and I know the
> count before I create this 
> array. So, I changed the above code as below:-
> 
> select count(*) &cnt
> let #count = &cnt
> from abc_table
>   show 'count : ' #count
> 
> create-array name=BUs size=#count
>      field=legal_entity:char
> 
> After I changed the program, it is not recognizing
> the #count. I replaced 
> with {#count} but not working. I looked at the old
> postings and looks like 
> it can be resolved. Could you send some suggestions
> on this.
> 
> Thanks in advance.
> Sony
> 
> 
> 
> _______________________________________________
> sqr-users mailing list
> sqr-users@sqrug.org
> http://www.sqrug.org/mailman/listinfo/sqr-users
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users