Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 SQL Query Problem

Author  Topic 

gvvardhan
Starting Member

2 Posts

Posted - 2010-07-06 : 10:38:32
Fieldname Abbyy Omni ABBYYPREACE OMNIPREACE

HCFA01a 938736124 NULL NULL NULL
HCFA01a NULL NULL 938736124 NULL
HCFA01a NULL 938736124 NULL NULL
HCFA01a NULL NULL NULL 938736124



This my table I need to fetch the values in a single row ie need to omit the null values and get the all the values in a single row

Fieldname Abbyy Omni ABBYYPREACE OMNIPREACE

HCFA01a 938736124 938736124 938736124 938736124

Please anyone can help me






Thanks & Regards
Vardhan

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2010-07-06 : 11:10:11
SELECT FieldName, MAX(Abbyy), MAX(Omni), MAX(ABBYPREACE), MAX(OMNIPREACE)
FROM YourTableNameHere
GROUP BY FieldName



N 56°04'39.26"
E 12°55'05.63"
Go to Top of Page

gvvardhan
Starting Member

2 Posts

Posted - 2010-07-07 : 04:02:36
Thanks buddy,
Its working...

quote:
Originally posted by Peso

SELECT FieldName, MAX(Abbyy), MAX(Omni), MAX(ABBYPREACE), MAX(OMNIPREACE)
FROM YourTableNameHere
GROUP BY FieldName



N 56°04'39.26"
E 12°55'05.63"




Thanks & Regards
Vardhan
Go to Top of Page
   

- Advertisement -