query problem | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

query problem

hi all
i have a query which returns 1.6 lakhs records and there are some null values in some fields and the data is with "" for example test is firstname and that is stored in firstname field as "test" i have to update these kind of records with test how to do it please tell me
see the query
SELECT COUNT(*) AS Amount, FirstName, LastName, Address1,
Address2
FROM test_NCOA
where firstname is null and lastname is null
and salutation is not null GROUP BY FirstName,LastName,Address1,Address2
1NULLNULLNULLNULL
1NULLNULL1511 K Street Northwest Suite NULL
1NULLNULL2000 West 1st Street Suite 509NULL
1NULLNULL215 Back Creek Church RoadNULL
1NULLNULL2275 Research Boulevard Suite NULL
1NULLNULL300 North Greene Street Suite NULL
1NULLNULL3600 New York Avenue NortheastNULL
1NULLNULL5703 S. New Hope Rd.NULL
1NULLNULL6512 Six Forks Road Suite 201BNULL
1NULLNULLPO Box 12391NULL
1NULLNULLPO Box 29517NULL
1NULLNULLPO Box 363NULL
1NULLNULLPO Box 84NULL
1NULLNULLPO Box 314484600 Marriott Drive
1NULLNULLPO Box 26666Ojrp 20 sql server
update table_name set firstname=’test’
where isnull(firstname,”)=”
hi ranjitjain
its working. thanks sql server
Why did you design the table to have first and last names to be of NULL? Madhivanan Failing to plan is Planning to fail
]]>