[AccessD] Converting a string to a double in an SQL query.

Mwp.Reid at Queens-Belfast.AC.UK Mwp.Reid at Queens-Belfast.AC.UK
Tue Jul 1 14:03:41 CDT 2003


LOOKup CAST or CONVERT in Books on lIne for an example

martin

Quoting Michael Tucker <mtucker at myrealbox.com>:

> Hi everyone,
> 
> I'm dealing with an Access Project that is connecting to an SQL Server
> database.  I'm trying to produce a query (and a report that reads this
> query) to totals a billing amount.  Simple stuff, right?  Well, the
> designer
> of the database decided to make the data type of the BillingAmount field
> a
> string (specifically varchar(15)), thus I cannot sum this field.
> 
> I've been trying to create a calculated field in my query that just
> converts
> the BillingAmount field to a number using the function
> "CDbl(dbo.Transactions.BillingAmount)".  When I try to run the query
> however
> I get the "CDbl is not a valid function" error.
> 
> This would be easy stuff if I were messing with native Access tables
> but
> since these are SQL Server tables then I'm a little out of my
> experience.
> Anyone know how I can do what I'd like to do here?
> 
> Thanks.
> 
> _______________________________________________
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 


More information about the AccessD mailing list