Results 1 to 3 of 3

Thread: [RESOLVED] Query won't run

  1. #1

    Thread Starter
    Hyperactive Member JMvVliet's Avatar
    Join Date
    May 2001
    Location
    Papendrecht, Netherlands
    Posts
    310

    Resolved [RESOLVED] Query won't run

    Does anyone know why this query won't run? The fields fValue_xxx are all of the type 'nvarchar(50)'. It says that:
    VB Code:
    1. Server: Msg 8114, Level 16, State 5, Line 1
    2. Error converting data type varchar to float.

    on this query:

    VB Code:
    1. UPDATE tBSC
    2. SET fvalue_jan = '728,4',  
    3. fvalue_feb = '769',  
    4. fvalue_mrt = '912',  
    5. fvalue_apr = null,  
    6. fvalue_mei = null,  
    7. fvalue_jun = null,  
    8. fvalue_jul = null,  
    9. fvalue_aug = null,  
    10. fvalue_sep = null,  
    11. fvalue_okt = null,  
    12. fvalue_nov = null,  
    13. fvalue_dec = null  
    14. FROM tSBF_PI  WHERE lDepartmentID = 115 AND tSBF_PI.lPIID = 166 AND tSBF_PI.lSBF_PIID = tBSC.lSBF_PIID
    When I remove the ',4' by fValue_jan, it works, otherwise it won't...

    Anyone?

  2. #2

    Thread Starter
    Hyperactive Member JMvVliet's Avatar
    Join Date
    May 2001
    Location
    Papendrecht, Netherlands
    Posts
    310

    Re: Query won't run

    Got it, query should replace the ',' by a '.' if the value is a float. Looks like a bug in SQL2K

  3. #3
    PowerPoster
    Join Date
    Feb 2006
    Location
    East of NYC, USA
    Posts
    5,691

    Re: [RESOLVED] Query won't run

    It would depend on whether SQL Server recognizes localizations, and whether the computer this is running on is localized to use ',' as the decimal separator.
    The most difficult part of developing a program is understanding the problem.
    The second most difficult part is deciding how you're going to solve the problem.
    Actually writing the program (translating your solution into some computer language) is the easiest part.

    Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.

    Please Help Us To Save Ana

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width