Posts

Azure Devops - Create Organization and add dotnet project to the Azure Devops repository.

Image
  I n this article, we will cover how to add new Azure Devops Organisation and also how to add the C# project code in the Azure Devops Repository. Go to  https://dev.azure.com /. Sign in with your credentials.  Click on the link New Organization.  Provide the name of the organization. I have given TechGeekGen-Z. Press Continue . This screen will appear for few mins. Devops Organization will be created after this. Create a Project in the newly created Devops Organization.  Click on New Project button in the left. Provide the Project name.  Choose Private if you want your project to be used only by the people you give access to otherwise choose Public. I am choosing  Private  here. Click on  Create Project.  The Project is created successfully. copy the highlighted command for pushing the origin on git as it contains origin url. This origin url will be used further.  Now, we have to add the code in Azure Devops repository. Let'...

Using CTE Recursively to get the hierachy from Parent child stored in same table (Continent-> Country-> State-> City)

In this article I will explain how to write a query to create parent-child hierarchy ( Continent-> Country-> State-> City ) with levels using recursive common table expression (CTE).  While working with database we often store parent and child id in same table. Let's take the example of  Continents, Countries, State/Province and City. They are stored in same table, and we have to get all of them in hierarchy e.g.  Continent-> Country-> State-> City . Let's begin and understand this via an example:  Create a table using the script below:    IF   OBJECT_ID ( 'tempdb.dbo.#tbHierarchy' ,   'U' )   IS   NOT   NULL    DROP   TABLE  #tbHierarchy ;     GO   CREATE   TABLE  #tbHierarchy    (           Id  INT          , [Name]  VARCHAR ( 20 )      ...