Click here to Skip to main content
14,828,868 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i use following code:

SELECT --TOP 3 
       BusinessEntityID,  
       NationalIDNumber, 
       JobTitle,
	   BirthDate,
	   Gender
   FROM pers_test 
  FOR JSON auto , INCLUDE_NULL_VALUES ;


but i want to insert json output in a json file in computer location

What I have tried:

please help me to insert database tables into json file and update it when database has changed
Posted
Updated 26-Aug-20 23:20pm

1 solution

   
Comments
Reza kavian 27-Aug-20 6:17am
   
These links guide to insert database tables into json object,but i want to insert into a physical file
F-ES Sitecore 27-Aug-20 6:39am
   
So save the results of the query into a file. Google "c# save text as file" for examples.
Richard MacCutchan 27-Aug-20 8:13am
   
Then you need to write some code to capture the result and write it to a file.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900