SQL Server IMKB Döviz Bilgileri Çekmek

CREATE PROC DoviKuruAktar AS DECLARE @URL AS VARCHAR(8000) SET @URL=’http://www.tcmb.gov.tr/kurlar/today.xml’ DECLARE @OBJ AS INT DECLARE @RESULT AS INT EXEC @RESULT=SP_OACreate ‘MSXML2.XMLHttp’,@OBJ OUT EXEC @RESULT=SP_OAMethod @OBJ,’open’,NULL,’GET’,@URL,FALSE EXEC @RESULT=SP_OAMethod @OBJ,SEND,NULL,” CREATE TABLE #XML (STRXML VARCHAR(MAX)) INSERT INTO #XML(STRXML) EXEC @RESULT=SP_OAGetProperty @OBJ,’responseXML.xml’ DECLARE @XML AS XML SELECT @XML=STRXML FROM #XML SELECT @XML –DROP TABLE #XML DECLARE @HDOC AS INT EXEC SP_XML_PREPAREDOCUMENT @HDOC OUTPUT,@XML –select @hdoc SELECT * FROM OPENXML(@HDOC,’Tarih_Date/Currency’) WITH (Unit VARCHAR(50) ‘Unit’,…

30 Mayıs 2019
Read More >>