Monday 27 August 2012

Before & after items after split a string


Before split string


       string input = TextBox1.Text;
        int index = input.LastIndexOf("@");
               or-  int index = input.IndexOf("@");
        if (index > 0)
        input = input.Substring(0, index);
        resporse.write=input;



After split strings



string input = TextBox1.Text;
        response.write = input.Split('@').Last();

Tuesday 7 August 2012

Second highest salary

1. METHOD

select max(salary) from emp where salary not in (select max(salary) from emp )

 2. METHOD ANY SALARY-- PUT NUMBER OF COUNT IN SUB-QUERY


SELECT TOP 1 Salary FROM ( SELECT TOP 5 Salary FROM emp ORDER BY Salary DESC)TEMP ORDER BY Salary

Excel Sort values in ascending order using function TEXTJOIN

 Excel ::  Text ::  1,3,5,2,9,5,11 Result :: 1,2,3,5,5,9,11 Formula ::     TEXTJOIN ( ",",1,SORT(MID(SUBSTITUTE( A1 ,","...