Error DBRW

  • Thread starter Thread starter David8
  • Start date Start date
D

David8

Hi from Barcelona,
First, sorry for my sintax !!
I've a query i want show in my page, but i can't find the problem !!!!.

SELECT MY_TABLE.Id, MY_TABLE.DIFER, MY_TABLE.fecha, MY_TABLE.TIPODIA,
MY_TABLE.dias, MY_TABLE.mes, [DIFER]*[dias] AS Multiply,
DSum("[dias]*[DIFER]","[MY_TABLE]","[Id] <=" & [Id]) AS CONTINUO,
MY_TABLE.TOTALREAL, MY_TABLE.total FROM MY_TABLE GROUP BY MY_TABLE.Id,
MY_TABLE.DIFER, MY_TABLE.fecha, MY_TABLE.TIPODIA, MY_TABLE.dias,
MY_TABLE.mes, [DIFER]*[dias], MY_TABLE.TOTALREAL, MY_TABLE.total
HAVING (((MY_TABLE.mes)="JAN"));

Help me, thanks.
David8
 
Web VBscript in ASP does not support
DSum("[dias]*[DIFER]","[MY_TABLE]","[Id] <=" & [Id])

And since you are using joined tables the reference to [DIFER]*[dias] can not resolved
- probably should be [MY_TABLE.DIFER]*[dias]

HAVING (((MY_TABLE.mes)="JAN"));
should be
WHERE MY_TABLE.mes="'JAN'"

See http://www.w3schools.com/asp/default.asp and http://www.w3schools.com/ado/default.asp

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
_____________________________________________


| Hi from Barcelona,
| First, sorry for my sintax !!
| I've a query i want show in my page, but i can't find the problem !!!!.
|
| SELECT MY_TABLE.Id, MY_TABLE.DIFER, MY_TABLE.fecha, MY_TABLE.TIPODIA,
| MY_TABLE.dias, MY_TABLE.mes, [DIFER]*[dias] AS Multiply,
| DSum("[dias]*[DIFER]","[MY_TABLE]","[Id] <=" & [Id]) AS CONTINUO,
| MY_TABLE.TOTALREAL, MY_TABLE.total FROM MY_TABLE GROUP BY MY_TABLE.Id,
| MY_TABLE.DIFER, MY_TABLE.fecha, MY_TABLE.TIPODIA, MY_TABLE.dias,
| MY_TABLE.mes, [DIFER]*[dias], MY_TABLE.TOTALREAL, MY_TABLE.total
| HAVING (((MY_TABLE.mes)="JAN"));
|
| Help me, thanks.
| David8
 
Back
Top