after inserting XML into SQl table and parsing it getting "???" insted of text



I want to get text instead of "???" result I all ready try collate and it didn't work



truncate table EPGXML
INSERT INTO EPGXML
( Data
)
SELECT CONVERT(XML,BulkColumn,2)
FROM OPENROWSET(BULK N'C:\test\test.xml', SINGLE_BLOB) O;

DECLARE @Data XML;
SELECT @Data = Data FROM EPGXML ;

select distinct filenode.value('category[1]', 'VARCHAR(300)')
FROM @Data.nodes('tv/programme ') files ( filenode )
where filenode.value('category[1]', 'VARCHAR(300)') is not null

No comments:

Post a Comment