Posts

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                

Difference between var and let and const keywords in JavaScript - ES6

var - this is function scoped variable. This variable will attach to window object so it is available for the whole page. Same variable name can be re declared every time with different values let - this is blocked scoped ( if, while, for loop) variable. const - this is same as let. Difference is variable values cannot be changed. The name implies it also the same. But we can change properties values of an object declared as const

Understanding callback functions in Javascript - ES6

Callback functions - A callback is a function passed as an argument to another function.  This technique allows a function to call another function.  A callback function can run after another function has finished. we need to understand in JavaScript functions are executed in the order which they are called and not in the order defined. function myFirst () {     console . log ( "Hello" );   }   function mySecond () {     console . log ( "Goodbye" );   }   mySecond ();   myFirst (); /*expected output:   Goodbye   Hello   */ Sometimes you would like to have better control over when to execute a function. Suppose you want to do a calculation, and then display the result. or take the input from the user, process it and then only display the result.   function greeting ( name ) {     console . log ( `Hello, ${ name } ` );   }   function processUserInput ( callback ) {     const name ...

Understanding Function Expression in Javascript - ES6

Image
  Functions - It can be written in three ways in JavaScript. we developers always think of writing it in old ways which is called as 'Function Declaration way' ex :      -It can be also written in variable assignment way. This is called 'Function expression'    ex:                                           The main difference between a function expression and a function declaration is the function name, which can be omitted in function expressions to create anonymous functions. Function expressions in JavaScript are not hoisted, unlike function declarations. You can't use function expressions before you create them: - Naming functions is useful if they need to reference themselves (e.g. for recursive calls). Indeed, if you are passing a literal function expression as an argument directly to another function, that function express...