You can cast in SQL server

(CAST(tblsearchlog.maxsize AS int) +  CAST(tblsearchlog.minSize AS int)) /2
> 500

I've sure access has something similar

Justin

> -----Original Message-----
> From: Giles Roadnight [mailto:giles@;roadnight.name]
> Sent: 08 November 2002 12:36
> To: [EMAIL PROTECTED]
> Subject: [ cf-dev ] OT: casting in SQL
>
>
> Hi guys
>
> I have this query:
>
> Select count(searchid) as searches
> from tblsearchlog
> where (tblsearchlog.minsize + tblsearchlog.maxsize) /2 > 500
> and (tblsearchlog.minsize + tblsearchlog.maxsize) /2 < 1000
>
> which should work fine. The thing is that minsize and maxsize (for some
> strange reason) are text fields. Really these should be changed but that
> would be take forever. Can I cast the two fields to numbers so that this
> will work? I did try messing around with the eval function but if
> I use this
> in CF I get an unknown function error (is there any way of using access
> fuinctions in cf).
>
> I'll probably have to change the datatype on the field but I really dont
> want to.
>
> I'm, using CF 4.51 and access 2000.
>
> Thanks
>
> Giles
>
>
> --
> ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
>
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> For human help, e-mail: [EMAIL PROTECTED]
>
>
>
>


-- 
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]

Reply via email to