4 Replies Latest reply on May 19, 2015 5:54 AM by haxtbh

    Query - Error converting data type varchar to float.

    Cozmo2 Level 1

      The whole pop up error message is

      java.sql.SQLException:[Macromedia][SQLServer JDBC Driver][SQLServer] Error ....

       

      I am using CF10 Report Builder. Here is my query:

      SELECT name.first_name, name.last_name, name.soc_sec, name.name_le1, name.camp_cod, LEFT(MMTemp.term_int, 6) AS Term, MMTemp.st_addr, MMTemp.add_addr, MMTemp.city, MMTemp.state, MMTemp.zip, transact.sch_yr AS SchYr, transact.ref_id AS AwardDesc, transact.offered AS AwdAmt, nmact.act_memo, MMTemp.Operator, rpt_schy.token, nmbudget.nmbudget_tuition AS Tuition, nmbudget_RM_BRD AS RoomBoard,

       

      CASE

          WHEN finaideurekaawdcat.finaidawdcat_cod like 'E%' OR finaideurekaawdcat.finaidawdcat_cod like 'OT' THEN 'Gift aid & schlorships'

          WHEN finaideurekaawdcat.finaidawdcat_cod = 'FG' THEN 'Need based aid'

          WHEN finaideurekaawdcat.finaidawdcat_cod = 'FL' THEN 'Federal Direct Loans'

          ELSE 'Work Study' END AS CatType

      /*CASE WHEN name.camp_cod = 'AdultLearn' THEN '17911' ELSE '20510' END AS Tuition,

      CASE WHEN name.name_le1 = 0 THEN '8835' ELSE '0' END AS RoomBoard */

       

      FROM   name, MMTemp, nmact, transact, finaideurekaawd, finaideurekaawdcat, rpt_schy, nmbudget

      WHERE  (MMTemp.Operator = rpt_schy.token or MMTemp.Operator = Right(MMTemp.Operator,8))

      AND MMTemp.soc_sec=name.soc_sec

      AND MMTemp.soc_sec=nmact.soc_sec

      AND MMTemp.activity_cod=nmact.activity_cod

      AND MMTemp.soc_sec=transact.soc_sec

      AND MMTemp.activity_cod='AM'

      AND MMTemp.soc_sec=nmbudget.soc_sec

      AND transact.tcodes='AW'

      AND transact.accept<>'v'

      AND transact.sch_yr = rpt_schy.sch_yr

      AND rpt_schy.token = '#session.token#'

      AND transact.awd_id=finaideurekaawd.finaidawddesc_cod

      AND finaideurekaawd.finaidawdcat_cod=finaideurekaawdcat.finaidawdcat_cod

       

      UNION

       

      SELECT finaideurekaawddesc.finaideurekaawddesc AS AwardDesc, finaideurekaawd.finaideurekaawdtot AS AwdAmt, name.first_name, name.last_name, name.soc_sec, name.name_le1, name.camp_cod, LEFT(MMTemp.term_int, 6) AS Term, MMTemp.st_addr, MMTemp.add_addr, MMTemp.city, MMTemp.state, MMTemp.zip, MMTemp.activity_cod, MMTemp.Operator, finaideurekaawd.Sch_years AS SchYr, nmact.act_memo, nmbudget.nmbudget_tuition AS Tuition, nmbudget_RM_BRD AS RoomBoard,

       

      CASE

          WHEN finaideurekaawdcat.finaidawdcat_cod like 'E%' OR finaideurekaawdcat.finaidawdcat_cod like 'OT' THEN 'Gift aid & schlorships'

          WHEN finaideurekaawdcat.finaidawdcat_cod = 'FG' THEN 'Need based aid'

          WHEN finaideurekaawdcat.finaidawdcat_cod = 'FL' THEN 'Federal Direct Loans'

          ELSE 'Work Study' END AS CatType

      /*CASE WHEN name.camp_cod = 'AdultLearn' THEN '17911' ELSE '20510' END AS Tuition,

      CASE WHEN name.name_le1 = 0 THEN '8835' ELSE '0' END AS RoomBoard*/

       

      FROM  MMTemp, name, nmact, finaideurekaawd, finaideureka, finaideurekaawddesc, finaideurekaawdcat, rpt_schy, nmbudget

      WHERE (MMTemp.Operator = rpt_schy.token or MMTemp.Operator = Right(MMTemp.Operator,8)) 

      AND MMTemp.activity_cod='AM'

      AND MMTemp.activity_cod=nmact.activity_cod

        AND finaideurekaawd.sch_years=rpt_schy.sch_yr

      AND rpt_schy.token = '#session.token#'

      AND MMTemp.soc_sec=name.soc_sec

      AND MMTemp.soc_sec=nmbudget.soc_sec

      AND name.soc_sec=nmact.soc_sec

      AND name.soc_sec=finaideurekaawd.soc_sec

      AND name.soc_sec=finaideureka.soc_sec

      AND finaideurekaawd.finaidawddesc_cod=finaideurekaawddesc.finaidawddesc_cod

      AND finaideurekaawd.finaidawdcat_cod=finaideurekaawdcat.finaidawdcat_cod

       

      ORDER BY name.soc_sec

       

      I do not see anywhere that I am converting varchar to float.