declare @JSON varchar (max ) declare @cmd varchar (100 ) declare @cmd1 varchar (8000) declare @deletefile varchar (20 ) set @deletefile='LastScore.txt' set @cmd= 'xp_cmdshell ''del "d:\Freak\' + @deletefile + '"'''; set @cmd1 = ' ren d:\Freak\*.txt LastScore.txt' set nocount on exec master..xp_cmdshell @cmd1 waitfor delay '00:00:01'; select @JSON = BulkColumn from openrowset (bulk 'D:\Freak\LastScore.txt', single_clob) as j select * from openjson (@JSON) with ( LeaderboardName varchar (20) ,LeaderboardNameFull varchar (20) ,PlayerCount varchar (20) ,PlayerName varchar (20) ,Score nvarchar (20) ,ZombiesKilled varchar (15) '$.ScoreDetails.ZombiesKilled' ,Accuracy varchar (50) '$.ScoreDetails.Accuracy' ,DamageTaken varchar (20) '$.ScoreDetails.DamageTaken' ,SecondsInLevel varchar (30) '$.ScoreDetails.SecondsInLevel' ,Deaths varchar (50) '$.ScoreDetails.Deaths' ) waitfor delay '00:00:01'; set nocount on exec (@cmd) go
Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.
When asked, what has been your best career decision?
Deciding to stick with EE.
Being involved with EE helped me to grow personally and professionally.
An Experts Exchange subscription includes unlimited access to online courses.Get Started
Connect with Certified Experts to gain insight and support on specific technology challenges including:
We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE