D
Diego F.
Hello. I'm trying to make a queries and I'm having problems.
This one works: SELECT SUM(code) as total FROM table.
It returns a Decimal value that I get with ExecuteScalar().
Now I need to use something like:
SELECT SUM(code) as total FROM table WHERE date = '28/08/2004'. If I try to
execute this one I get an error: Specified cast is not valid. What's wrong
with that?
Other question. How can I put a variable to avoid entering by code the date,
what is not very useful.
Regards,
Diego F.
This one works: SELECT SUM(code) as total FROM table.
It returns a Decimal value that I get with ExecuteScalar().
Now I need to use something like:
SELECT SUM(code) as total FROM table WHERE date = '28/08/2004'. If I try to
execute this one I get an error: Specified cast is not valid. What's wrong
with that?
Other question. How can I put a variable to avoid entering by code the date,
what is not very useful.
Regards,
Diego F.