Error DBRW

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
 
S

Stefan B Rusynko

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top