Skip to main content

Posts

How to select particular day date from given month in SQL

How to select particular day date from given month in SQL. You can see below example to get some ideas. select dates,to(char(dates,'day-mon-yyyy') from (select to_date(:start_date,'dd-mon-yyyy')+rownum -1 as dates from all_objects where rownum<=to_date(:end_date,'dd-mon-yyyy')- to_date(:start_date,'dd-mon-yyyy')+1) where upper(regexp_substr(to_char(dates,'day-mon-yyyy'),'([[:alpha:]])+'))=upper(:day_name); 02-JUN-17 FRIDAY 09-JUN-17 FRIDAY 16-JUN-17 FRIDAY 23-JUN-17 FRIDAY 30-JUN-17 FRIDAY 07-JUL-17 FRIDAY 14-JUL-17 FRIDAY 21-JUL-17 FRIDAY 28-JUL-17 FRIDAY 04-AUG-17 FRIDAY 11-AUG-17 FRIDAY 18-AUG-17 FRIDAY 25-AUG-17 FRIDAY 01-SEP-17 FRIDAY

How to separate string from email id in SQL

To separate string from email id in SQL you can try below query. seperate ' test' '@' 'xyz'   ' com'   from test@xyz.com SELECT SUBSTR(mailID, 1, INSTR(mailID, '@', 1, 1)-1) String1, SUBSTR(mailID, INSTR(mailID, '@', 1, 1), 1) String2, SUBSTR(mailID, INSTR(mailID, '@', 1, 1)+1, INSTR(mailID, '.', 1, 1)-INSTR(mailID, '@', 1, 1)-1) String3, SUBSTR(mailID, INSTR(mailID, '.', 1, 1)+1) String4 FROM ( SELECT '&MailID' mailID FROM Dual );

How to write query second highest salary in for Employee in SQL

To write query second highest salary in for Employee in SQL there are many way to achieve this I am sharing here some sample examples. Select * from(select deptno,sal,dense_rank() over (partition by deptno order by sal desc)r from emp) where r=2 select empno,ename,sal,deptno, row_number() over(partition by deptno order by sal desc)rn from emp )select * from cte where rn=2 Select max(sal)from emp  Where sal <(select max(sal) from emp) Select deptno, max(salary) from(Select a.deptno,a.salary from employee a, (Select deptno,max(salary) from employee group by deptno) b where a.deptno=b.deptno And a.salary<b.salary) group by deptno;

How to get middle name from full name column in SQL Table

The question is How get middle name from full name column in SQL Table? Full name can be like this. Santosh kumar singh Raj Narayan verma Middle name is Kumar and Narayan etc. Solution. Use instr to get the position of first space and second space.use substr to get the string from first space +1 to 2nd space - 1. I hope you will get solution. Example.  Using substr function it will get the result of middle names. Substr(colname,instr(colname, ' ', 1,1),instr(colname,' ' , -1,1))

Solved: Error during Code Upgrade Ax 2012 from R2 to R3

Getting below Error during Code Upgrade Ax 2012 from R2 to R3 . Can you suggest to resolve these errors. Description The first enabled data source(ProjForecastEmplView_1) in union query cannot have disabled field(Qty). Menu item RETAILLOYALTYCUSTTABLE does not exist. Menu item RETAILLOYALTYCUSTTABLE does not exist. Duty DOCommerceOnlineSalesOrdersMaintain does not exist. The first enabled data source(RetailTransactionTable_1) in union query cannot have disabled field(transactionId). Menu item RETAILLOYALTYMSRCARDTRANS does not exist. Menu item RETAILLOYALTYCUSTTABLE does not exist. Menu item RETAILLOYALTYCUSTTABLE does not exist. Menu item RETAILLOYALTYCUSTTABLE does not exist. Menu item InventAging_CN does not exist. Menu item RETAILLOYALTYMSRCARDTRANS does not exist. The class 'FormRun' does not contain the method 'isRetailAttribute'. The RetailPricingEngine::setRetailDiscountsOnOrder method is obsolete. Use method calculateIndependentPriceDiscounts in

Visual Studio and visual software list with version details

Visio 2010 (Multiple Editions) with Service Pack 1 Visio 2013 Professional Visio 2013 Service Pack 1 Visio Professional 2016 Visio Professional 2019 Visio Standard 2013 Visio Standard 2016 Visio Standard 2019 Visio Tools SDK and DDKs Visual Basic .NET 2003 Visual Basic 2.0 Visual Basic 2.0 Professional Visual Basic 2.0 Standard Visual Basic 3.0 Professional Visual Basic 4.0 Visual Basic 6.0 Code Advisor Visual Basic 6.0 Enterprise Visual Basic for Applications Visual C++ 1.52 Visual C++ 2.0 Visual C++ 2010 Redistributable Package Visual C++ 2010 Service Pack 1 Redistributable Package Visual C++ 2015 Redistributable Visual C++ 2015 Redistributable Update 3 Visual C++ 4.2 Enterprise Visual C++ Browser Toolkit Visual C++ Build Tools 2015 Update 2 Visual C++ Build Tools 2015 Update 3 Visual C++ Redistributable for Visual Studio 2012 Visual C++ Redistributable for Visual Studio 2012 Update 3 Visual C++ Redistributable for Visual Studio 2012 Update 4 Visual C+