General information
Category:
Coding, syntax & commands
>>>VFP 3.0b, Win 95. I have the following code:
>>>
>>>dFyr='1998'
>>>SELECT Accounts.account, Accounts.allotment, ;
>>> sum(Transact.amount) as "AMOUNT", ;
>>> sum(Transact.regfee) as "REGFEE", ;
>>> Transact.vouchered, Transact.actid, Transact.fyr ;
>>> FROM travel!transact, travel!accounts ;
>>> WHERE Accounts.actid = Transact.actid ;
>>> AND Accounts.fyr = Transact.fyr ;
>>> AND (Accounts.fyr = ?dFyr) ;
>>> GROUP BY Accounts.account, Transact.vouchered ;
>>> ORDER BY Accounts.account, Transact.vouchered
>>>
>>>Fields (datatype):
>>>
>>>Account (C), Allotment (N), Amount(N), RegFee (N), Vouchered (L),
>>>ActID (N), FYr (C)
>>>
>>>As given above the sql returns the correct information. But when I put "Create Sql View ViewName As" at the beginning of the statement, it returns no rows. ?????
>>>
>>>Any ideas?
>>>
>>>TIA!
>>
>>Try browse. :)
>
>There is nothing to browse, only an empty table. ReQuery() does not resolve the problem either.
>>> AND (Accounts.fyr = ?dFyr) ;
Replace this with constant.
AND (Accounts.fyr = '1998') ;
Isolate. Perhaps the problem is within the parameterized view.
HTH
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only