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)
 Inner Join IsNull

Author  Topic 

Zath
Constraint Violating Yak Guru

298 Posts

Posted - 2008-08-13 : 09:36:00

Getting a syntax error here and I need to do an inner join with another table on this sql:

select
a.EventGroupCode,
a.EventGroupName,
IsNull(a.WebDescription, '') a.WebDescription
from EventGroup a
where a.EventGroupCode <> 'ICP'
order by a.EventGroupName


Yes, the error is for the IsNull line.

Need an inner join for this and that line will prevent it.

Thanks,

Zath

elancaster
A very urgent SQL Yakette

1208 Posts

Posted - 2008-08-13 : 09:42:06
i don't understand. what JOIN ?

don't use the table prefix in your column alias.

i.e.

IsNull(a.WebDescription, '') WebDescription


Em
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-08-13 : 09:42:58
quote:
Originally posted by Zath


Getting a syntax error here and I need to do an inner join with another table on this sql:

select
a.EventGroupCode,
a.EventGroupName,
IsNull(a.WebDescription, '') AS a.WebDescription
from EventGroup a
where a.EventGroupCode <> 'ICP'
order by a.EventGroupName


Yes, the error is for the IsNull line.

Need an inner join for this and that line will prevent it.

Thanks,

Zath



remove the alias
Go to Top of Page

Zath
Constraint Violating Yak Guru

298 Posts

Posted - 2008-08-13 : 09:49:03
Ok, thanks.

Zath
Go to Top of Page
   

- Advertisement -