Hello,

when i input to database show error cannot convert type varchar to type numeric.. I' m using convert(numeric, quantity). Where my quantity is empty. Please help me. Thanks

Hi,
Below code can helps you..

convert(numeric, ISNULL(quantity, '0'))

Hi,

Maheshsayani is right but dont use the single quote when you r trying to change the varchar to numeric.

convert(numeric, ISNULL(quantity, 0))

Have a nice day
Shailaja


Hi,
Below code can helps you..

convert(numeric, ISNULL(quantity, '0'))

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.