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
 Other SQL Server Topics (2005)
 Getting Error while executing the sql query.

Author  Topic 

javedhakim
Starting Member

1 Post

Posted - 2009-12-30 : 01:55:55
I am getting an error while i execute the following query,
SELECT S.[ConsumerNo]
,S.[OwnerName]
,S.[TenentName]
,S.[Address1]
,S.[Address2]
,S.[SiteOffice]
,S.[TarrifCode]
,S.[MeterCode]
,S.[MeterType]
,S.[AreaCode]
,S.[AreaDescription]
,S.[TarrifDescription]
,W.[EC]
,W.[WC]
,W.[GC]
FROM [shaik].[dbo].[Consumers] AS S, [WtrBilling].[dbo].[ConsumptionEWG2009] AS W
WHERE S.[AreaCode]=79 AND W.[ConsumerNo]=S.[ConsumerNo]

The error is

Msg 446, Level 16, State 9, Line 1
Cannot resolve collation conflict for equal to operation.

Javed Ahmed

rajdaksha
Aged Yak Warrior

595 Posts

Posted - 2009-12-30 : 02:17:55
Try this


SELECT S.[ConsumerNo]
,S.[OwnerName]
,S.[TenentName]
,S.[Address1]
,S.[Address2]
,S.[SiteOffice]
,S.[TarrifCode]
,S.[MeterCode]
,S.[MeterType]
,S.[AreaCode]
,S.[AreaDescription]
,S.[TarrifDescription]
,W.[EC]
,W.[WC]
,W.[GC]
FROM [shaik].[dbo].[Consumers] AS S,
[WtrBilling].[dbo].[ConsumptionEWG2009] AS W
WHERE S.[AreaCode] = 79
AND W.[ConsumerNo] = S.[ConsumerNo] COLLATE DATABASE_DEFAULT



-------------------------
R...
Go to Top of Page
   

- Advertisement -