Kinda weird, but try like so

SELECT          A.Name, B.Cost
FROM             tableA a
INNER JOIN   tableB b
ON (A.ID = B.aID)
WHERE B.aID = 1




Douglas Brown
Email: [EMAIL PROTECTED]
----- Original Message -----
From: "Ye Wang" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, July 16, 2002 10:53 AM
Subject: CFMX & SQL - simple query with weird error message


> We just installed CFMX on a brand new server, W2k with SQL 2000. Most
> CF5 codes worked and no problems with stored procedures so far, except a
> few errors on simple queries. One of them was quite weird.
>
> Name : VARCHAR(128)
> Cost: real
> tableA joins tableB on (tableA.ID = tableB.aID)
>
> Case 1: works
>     <cfquery name="get_a" datasource="myDSN">
>         SELECT ID, Name
>         FROM tableA
>     </cfquery>
>
> Case 2: works
>     <cfquery name="get_b" datasource="myDSN">
>         SELECT aID, Cost
>         FROM tableB
>         WHERE aID = 1
>     </cfquery>
>
> Case 3: NOT working in CFMX but in CF5 and old versions
>     <cfquery name="get_ab" datasource="MyDSN">
>         SELECT A.Name, B.Cost
>        FROM tableA AS A INNER JOIN
>                    tableB AS B ON (A.ID = B.aID)
>         WHERE B.aID = 1
>     </cfquery>
>
> CFMX Error message:
>
>
>
>   Error Executing Database Query.
>
>     [Macromedia][SQLServer JDBC Driver]Value can not be converted     to
> requested type.
>
> Now Case 3 is too simple to cause errors. If CFMX can handle more
> complicated queries and stored procedures but not this one, it's just
> hard to understand. Maybe something too simple?! I've tried many things
> but cannot fix it. Can anyone throw some light on this? Thx
>
> -Ye
>
> 
______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to