Milton Smith

Milton Smith

  • NA
  • 84
  • 130.7k

Sql query for multiple values in single field.

Jun 9 2008 8:56 AM

I have a table called vendors which have two field ven_txt_CompanyName and ven_txt_VendorName.
I have always some value for ven_txt_VendorName but ven_txt_CompanyName sometimes has value as NULL ,
or it have no value or sometimes it has value.Something like this.

ven_txt_CompanyName      ven_txt_VendorName

Gift Emporium                     Mcpartland, Sandy
NULL                                Nicholson, Don
Jacks Wholesale                 Varela, Jimmy
                                          Goggins, Jerry
NULL                                Swinson, Billy
                                           Dee, Teresa
NULL                                 Olsen, Ysa


So what I have to do is if ven_txt_VendorName is null or it contains blank value replace it with corresponding
ven_txt_CompanyName value else ven_txt_CompanyName value will remain as it is.


Answers (4)