Click here to Skip to main content
16,015,679 members
Home / Discussions / Database
   

Database

 
AnswerRe: Querying on null datetime Pin
Peace ON26-Apr-10 4:17
Peace ON26-Apr-10 4:17 
AnswerRe: Querying on null datetime Pin
PIEBALDconsult26-Apr-10 4:24
mvePIEBALDconsult26-Apr-10 4:24 
GeneralRe: Querying on null datetime Pin
www.Developerof.NET26-Apr-10 20:41
www.Developerof.NET26-Apr-10 20:41 
AnswerRe: Querying on null datetime Pin
Peace ON26-Apr-10 4:26
Peace ON26-Apr-10 4:26 
QuestionDatabase Mail AS Exchange? Pin
Jassim Rahma24-Apr-10 23:08
Jassim Rahma24-Apr-10 23:08 
AnswerRe: Database Mail AS Exchange? Pin
Mycroft Holmes24-Apr-10 23:40
professionalMycroft Holmes24-Apr-10 23:40 
AnswerRe: Database Mail AS Exchange? Pin
Md. Marufuzzaman24-Apr-10 23:56
professionalMd. Marufuzzaman24-Apr-10 23:56 
QuestionCan't Query with = ISNULL? Pin
#realJSOP23-Apr-10 5:16
professional#realJSOP23-Apr-10 5:16 
When I try to run this query, I get a message saying "Syntax error near '='" on the 2nd line (actually, any line that has the ISNULL check in it):

SELECT	o.ID
	,o.[Name]        = ISNULL([Name],       'NO VALUE')
	,o.Abbreviation  = ISNULL(Abbreviation, 'NO VALUE')
	,o.OrgTypeID     = ISNULL(OrgTypeID,    'NO VALUE')
	,o.DisplayOrder  = ISNULL(DisplayOrder, 999)
	,s.MetricNumber
	,s.Status        = ISNULL(Status, 'U')
	,s.Command
FROM		 [dashboard].[tblSLOrganizations] o 
RIGHT OUTER JOIN [dashboard].[tblMetricStatus] s
ON		 (s.Base = o.Abbreviation)
ORDER BY DisplayOrder, MetricNumber


If I comment out all of the "= ISNULL..." instances, the query works.

What am I doing wrong?
.45 ACP - because shooting twice is just silly
-----
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

AnswerRe: Can't Query with = ISNULL? Pin
Simon_Whale23-Apr-10 5:26
Simon_Whale23-Apr-10 5:26 
GeneralRe: Can't Query with = ISNULL? Pin
Luc Pattyn23-Apr-10 5:28
sitebuilderLuc Pattyn23-Apr-10 5:28 
GeneralRe: Can't Query with = ISNULL? Pin
Simon_Whale23-Apr-10 5:30
Simon_Whale23-Apr-10 5:30 
GeneralRe: Can't Query with = ISNULL? Pin
Md. Marufuzzaman24-Apr-10 1:52
professionalMd. Marufuzzaman24-Apr-10 1:52 
GeneralRe: Can't Query with = ISNULL? Pin
Mycroft Holmes24-Apr-10 13:16
professionalMycroft Holmes24-Apr-10 13:16 
GeneralRe: Can't Query with = ISNULL? Pin
Md. Marufuzzaman24-Apr-10 18:40
professionalMd. Marufuzzaman24-Apr-10 18:40 
AnswerRe: Can't Query with = ISNULL? Pin
Luc Pattyn23-Apr-10 5:27
sitebuilderLuc Pattyn23-Apr-10 5:27 
GeneralRe: Can't Query with = ISNULL? Pin
Corporal Agarn23-Apr-10 8:55
professionalCorporal Agarn23-Apr-10 8:55 
QuestionADO.NET almost nullable column Pin
Yoyosch23-Apr-10 4:36
Yoyosch23-Apr-10 4:36 
AnswerRe: ADO.NET almost nullable column PinPopular
J4amieC23-Apr-10 4:43
J4amieC23-Apr-10 4:43 
AnswerRe: ADO.NET almost nullable column Pin
Mycroft Holmes24-Apr-10 13:23
professionalMycroft Holmes24-Apr-10 13:23 
GeneralRe: ADO.NET almost nullable column Pin
Yoyosch25-Apr-10 21:48
Yoyosch25-Apr-10 21:48 
GeneralRe: ADO.NET almost nullable column Pin
Mycroft Holmes25-Apr-10 22:26
professionalMycroft Holmes25-Apr-10 22:26 
QuestionCLR stored procedure cross base access Pin
Yoyosch23-Apr-10 4:12
Yoyosch23-Apr-10 4:12 
AnswerRe: CLR stored procedure cross base access Pin
Mycroft Holmes24-Apr-10 13:27
professionalMycroft Holmes24-Apr-10 13:27 
QuestionSunday first last in week? Pin
Stanciu Vlad23-Apr-10 0:04
Stanciu Vlad23-Apr-10 0:04 
AnswerRe: Sunday first last in week? Pin
Stanciu Vlad23-Apr-10 0:15
Stanciu Vlad23-Apr-10 0:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.