Hello All!
I have this SELECT statement.
SELECT pref.value('(caseNo/text())[1]', 'varchar(20)') as CaseNumber, pref.value('(countyNo/text())[1]', 'int') as CountyNumber, pref.value('(histSeqNo/text())[1]', 'int') as HistorySequenceNumber, pref.value('(eventType/text())[1]', 'varchar(20)') as EventType, pref.value('(eventDate/text())[1]', 'datetime') as EventDate, pref.value('(tag/text())[1]', 'varchar(50)') as Tag FROM dbo.CaseHistoryRawData_10 CROSS APPLY RawData.nodes('//CourtRecordEventCaseHist') AS CourtRec(pref)
I'm using this in a INSERT, but I'm getting NULL with the Tag column. I'm trying to write in the ISNULL or COALESE , but I can't get the syntax right.
Thanks!
Rudy