Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sql problem

Status
Not open for further replies.

DannC

Programmer
Apr 5, 2001
75
RO
Hi,
I'm trying to retrive some data from a local view trough a sql statement like

view21
f1 c(5)
f2 c(5)
f3 n(10)

sele f1, sum(f3) from view21 into array thisform.aSum group by 1

but everything i get is thisform.aSum[1,1]=.f.


Manu thanks
 
Hi Nefra,
The into array expects an array name and not any varibale name.
Instead Use this command,
sele f1, sum(f3) from view21 into array aSum group by 1
And then assign these values to your thisform variables like,
thisform.aSum1=asum(1,1)
thisform.aSum2=asum(1,2)


 
Hi Nefra,

Make sure your view is not a filtered view. Otherwise, the select will choose from the View and not the full table. Alternative is to use the Table directly instead of the view in the select from view21. I think your answer lies in this, that the view is carrying only one f1 value.

Hope this helps ramani :-9
(Subramanian.G)
FoxAcc
ramani_g@yahoo.com
LET KNOW IF THIS HELPED. ENOUGH EXPERTS ARE HERE TO HELP YOU OUT! BEST OF LUCK :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top