Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error converting nvarchar to float

Status
Not open for further replies.
Jun 19, 2008
19
US
I am trying to update a table with the following sql:

update f_quoteItem
set ql_batchNumber = qt_number
from f_quote
where ql_qt_fk = qt_pk

When executed I get error converting nvarchar to float.

f_quoteitem.ql_batchnumber is a float that allows nulls
the values in ql_batchnumber are all currently null


f_quote.qt_number is nvarchar(13) that does not allow nulls
the values in qt_number are as follows:
QU-100000
QU-1
QU-2
QU-4000
QU-4001
QU-3
RQ-2004
RQ-2005
RQ-2006
RQ-2007
QU-2
QU-3
RQ-2008
QU-3
QU-4003
QU-4
QU-5
1245
95468
1
7
2
3
230877

Can anyone help in working the kinks out of this update statement.

Thanks in advance for any help provided.
 
Qu- is not a number, and so cannot be converted to a float.
You are either going to have to come up with a different process for updating these, strip off the value, or else just not update those.

If [blue]you have problems[/blue], I want [green]source code[/green] AND [green]error messages[/green], none of this [red]"there was an error crap"[/red]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top