ERROR :(

  • INSERT INTO ClnPdoScl ( Codigo, CodigoPrd, Prd_Qnt, Prd_Prc_Unit, Vl_Frete, Vl_Total ) VALUES ( '000001', '10299457-BR', 002, '51,00', '0', '102,00' )

    error

    -->

    Disallowed implicit conversion from data type varchar to data type money, table 'compexnet2_1.dbo.ClnPdoScl', column 'Prd_Prc_Unit'. Use the CONVERT function to run this query. Disallowed implicit conversion from data type varchar to data type money, table 'compexnet2_1.dbo.ClnPdoScl', column 'Vl_Frete'. Use the CONVERT function to run this query. Disallowed implicit conversion from data type varchar to data type money, table 'compexnet2_1.dbo.ClnPdoScl', column 'Vl_Total'. Use the CONVERT function to run this query.

  • HELP ME PLEASE.. XD

    I'm noob...

  • The columns that you are trying to write '51,00', '0', '102,00' are set-up as MONEY.  They will not auto-change '51,00' from a CHARACTER into MONEY.

    You can either do 51, 0, 102 OR

    CONVERT(MONEY, '51'), CONVERT(MONEY, '0'), CONVERT(MONEY, '102')

    See example:

    DECLARE @VAR CHAR(10)

    SET @VAR = '51'

    SELECT @VAR, CONVERT(MONEY, @VAR)



    Good Hunting!

    AJ Ahrens


    webmaster@kritter.net

  • very obliged Ten Centuries

    I go to test this now

  • a new error happened

    sql --> INSERT INTO ClnPdoScl ( Codigo, CodigoPrd, Prd_Qnt, Prd_Prc_Unit, Vl_Frete, Vl_Total ) VALUES ( '000001', '10299457-BR', 002, CONVERT(MONEY, '51'), CONVERT(MONEY, '0'), CONVERT(MONEY, '102') )

    error printed --> String or binary data would be truncated. The statement has been terminated.

  • Check the string fields. Some data you are trying to insert is too large for the column.

  • ours as I am lay. very obliged.

    it forgives for my English.

    I am Brazilian XD

  • Alright. Sorry to ask but do you still need help (not too sure from your last post)?

  • Congrats on the big K AJ ... and I see this one is not about loops so that's cool .

  • vlw galera... IUpiiiiiiiii

    gostei desse forum.. XD

  • I'll take that as a no .

Viewing 11 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic. Login to reply