 మ్పి న్చలాలాంరిన్ంచి మ్మ్క్ఙ్చి చదింాఠిసింనినింన్చి చ్డిఖనిన్మ్ట్ంన్ంనటోరిసాలంళికిసిరారా. పుఆమిల్చిసాల్చి. మపర్చిసా like one point zero zero zero zero then double one point four times zero then triple one point four times zero like this in the last row we are having values like five times one then dot then four times zero so total length of this row is ten in the output as we can see we are having values like zero zero zero zero one point zero zero zero the length of the output columns for each row is ten if values are not present then we need to add the zero at left side so here as we can see in the second row we are having one one dot four times zero but length is seven so we need to add three zero at left side in the output so how we can write the query forgetting this output so let's move to sequence over management studio where we will write the query and get the output so this is the table we need to create and then we need to insert data on this table so first of all let me execute this create table statement to create the table so command completed successfully so table is created now I just want to insert data on the table so five rows affected so data is successfully inserted into the table now I just want to check the data so we are having same metadata as we seen in the slide so what will be the logic and how we can get it now what we need to do first of all I need to declare a variable so this is declare and it would be going to hold the length that would be the maximum length so it should be integer then we need to set the value on this variable that is at the length now we will get from this so here what we need to do first of all we need to calculate the length of this ip column and we need to get the maximum length so we can use maximum now we can close the brackets now we can check the maximum length that should be 10 now this is at the length execute and this is 10 looks good now what we need to do here we need to write the query and that would be from this table that is our part 54 fix format now ip so we need to combine this ip with the leading zeros so how we can so first of all we need to use the replicate here zero so we just want to replicate this zero at the length now we can use plus sign now we can execute so we are getting this leading zeros up to 10 but we just want to get only 10 characters so we can use write and from this ip then add the length so that is 10 now we can execute and we can compare our output so here we are getting the output as we were expecting so for that first we need to get the maximum length in a variable after that we can add the leading zeros at the left side after that we can extract only 10 characters that is our maximum length so this is the query so this is the first question and let's move to next question so here as we can see how we can find only unmatched values between the tables using join as we can see we have input table that is table one then table two in table one we are having one two three four and seven in table two we are having one two three four and eight so seven and eight so these two values are not going to match with each other so how we can get this in the output by using join so let's move to sequence over to write the query so here as we can see I have already declared the table and insert the data on the table so we can execute this and we can check so we are having same metadata in table one and table two now what we need to do first we need to use the full outer join so we can write the full join or full outer join now as a and let me call this table two as b here we can use the condition a dot id should be equals to b dot id now we can execute and we can check so let me execute so here we are getting the output but what our requirement is our requirement is if values are not going to match with each other there we want so we can use where a dot id is null or b dot id is null so it means if a dot id is null it means data is not in table a and it is in table b if b id is null then data is not in table b and it is present in table a now we can execute so here we are getting two columns first for table a and second for table b but in the output we are having only one column so how we can avoid this so for that we can use is null function and a dot id comma b dot id let me call this as id and now I just want to execute this query and check the output so it's gonna return 7 and 8 so by using full outer join we can achieve this output so these two questions was asked in nid technologies so if you like this video please subscribe our channel to get many more videos don't forget to press the bell icon to get the notification of our newly uploaded videos if you need this script it will be available on the description of this video so you can copy from there thank you so much for watching