Posts

Group by in Sql server

Image
  Group by = merge all such column values that are same and show single row of that merged row.  The columns that are in SELECT list and Group by list should be same. Here any 2 rows[all column] values will be same so when u use group by it will return one row. Note : if any row's single column value is different with other row's single column value [i.e.  if any mismatch. See red round circle] then Groupby will return all rows in this case. It returns all the rows because : Till Resource column both rows has same values but since status/decision columns has different values. Group By will return all rows in such cases

Ranking Functions in Sql server

Image
 

Nvarchar in Sql server

  Declare @val nvarchar(1000) select @val = N'GFG में आपका स्वागत है' select @val as HindiLanguage Declare @val nvarchar(1000) select @val = N'ಮಾಹಿತಿ' select @val as kannadaLanguage

JOIN with Multiple tables

 select A.item_id,A.value as DocID,B.Value as FamilyID,C.value as SDO,D.* from [Item_Detail](nolock) A inner join [Item_Detail](nolock) B on A.item_id = B.item_id inner join [Item_Detail](nolock) C on A.item_id = C.item_id left outer join [Item_Detail](nolock) D  on A.item_id = D.item_id and D.attribute_id='FC0DAAD6-7820-4DA1-AA77-CCF7780038E9' --giving at where clause is ok untill unless there is an existing row in the table, if there is no row --then we wont get the desired result. So better to use 'AND D.attribute_id='FC0DAAD6-7820-4DA1-AA77-CCF7780038E9'' at 'ON CLAUSE' itself even --if there is some performance issue where A.item_id = '68687B00-A22D-48A8-83FF-00000536E871' and A.attribute_id = 'FAA27652-97E8-4FBA-88EB-C77EC82C4109' and C.attribute_id = '5F859754-9FC4-4072-A054-41BF40F21A3B' and B.attribute_id = '925412D0-7574-46A6-B3BA-4C1111549456'

What are Web-Services

  Web Services - The services that are available over the internet/web are called web services. service provider - These are companies or individuals  who develops the web s ervice and makes it available over the internet/web. if there is a service provider then there must be service consumer called as client/consumer. If the client wants to talk to the service provider or the server then we need two things  Medium - Http/internet [like Mobile phone] Format - json/xml [it is English language]

what is Arrow function in JavaScript - ES6

  arrow function - It is nothing but same as function expression but short and sweet.

How to execute Javascript in VS code

Image
S1 : install node software s2 : install VS code software s3 : Open VS code editor. Open the extensions windows. Install two software   JavaScript (ES6) snippets Code Runner - By Jun Han s4 : Open new terminal window and type "npm install prompt-sync" --->This is used to prompt user input s5 : Type the JavaScript code as shown in the below screenshot. s6 : There is Run button on the right side of the window. Click on it to run the program. s7:  Console will ask for input from the user, if it is not allowing to edit then do the following open settings and type code runner and then put a check mark on that option. s8: Re-run the program