Wednesday, April 6, 2016

Closer to Success!

I'm working as programmer and deals mostly with Microsoft Technologies. Having a good experience in various Cliental Solutions from different Industries such as Health Care, Facility Management and Fisheries, Social Networking, Finance and Sports.

Among them, Health Care is the one that gives a great exposure in terms of technical, functional, Managerial Skills and logistics. That was fortunate. It's developed in the Asp.Net MVC at the front end and SQL Server at the back end, with the big support of other technologies such as JQuery, Ajax, HighCharts API, Telerik Controls, LINQ, Resharper Tool (considering this a great tool in improving the Coding Approach). It's almost been 2 years working on this product. And this month, the application has been launched with a great hope of Success.

Now with a bunch of small knowledge that I gain so far, my mind keeps prompting me to have a more challenging and learning work. And so, I start looking for a new freelancing jobs over the wire and so, found one over twitter i.e. toptal. From the tweets and other information on the internet, Toptal looks nice and genuine platform for the freelancers.
Also, it seems toptal is going to be a great future for the individuals who wants to improve themselves at technology level.

Looking forward now...

Thursday, March 3, 2016

Add Days to Specific Date in JQuery

Add Days to Specific Date in JQuery

//Current Date
var specificDate = new Date();

//Next Day of Current Date.
specificDate.setDate(specificDate.getDate() + 1);


Thursday, February 4, 2016

Get the Count of User Defined Objects in SQL

SELECT 
    CASE TYPE 
        WHEN 'U' 
            THEN 'User Defined Tables' 
        WHEN 'S'
            THEN 'System Tables'
        WHEN 'IT'
            THEN 'Internal Tables'
        WHEN 'P'
            THEN 'Stored Procedures'
        WHEN 'PC'
            THEN 'CLR Stored Procedures'
        WHEN 'X'
            THEN 'Extended Stored Procedures'
    END, 
    COUNT(*)     
FROM SYS.OBJECTS
WHERE TYPE IN ('U', 'P', 'PC', 'S', 'IT', 'X')
GROUP BY TYPE

Friday, January 8, 2016

Concatenate values of single column with multiple records into a single string using SQL

DECLARE @Names VARCHAR(8000)
SELECT @Names = COALESCE(@Names + ',', '') + itemRef FROM TableName Where activityRef = '123123'
Select @Names

Thursday, November 26, 2015

SQL Query: find the specific number from the number series stored as record in a Column from the DB Table

//User Defined Function to Split the number series into temp results data
Create FUNCTION [dbo].[Split] (@sep char(1), @s varchar(5000))
RETURNS table
AS
RETURN (
    WITH Pieces(pn, start, stop) AS (
      SELECT 1, 1, CHARINDEX(@sep, @s)
      UNION ALL
      SELECT pn + 1, stop + 1, CHARINDEX(@sep, @s, stop + 1)
      FROM Pieces
      WHERE stop > 0
    )
    SELECT pn AS SerialNumber,
      SUBSTRING(@s, start, CASE WHEN stop > 0 THEN stop-start ELSE 5000 END) AS IDValue
    FROM Pieces
  )


Declare @NumberToFind int= 14

Select T.Id From Table T Where ISNULL(T.ConcatStringColumn ,'') != ''
And Exists (Select IDValue From dbo.Split(',',T.ConcatStringColumn ) Where IDValue =@NumberToFind)

Output:

'Some ID Here If specific number finds from that string'




Wednesday, September 9, 2015

Convert String to Title Case (Proper Case) in .Net C#


C# Code (by default, English Culture):
 


CultureInfo culinfo = Thread.CurrentThread.CurrentCulture;

TextInfo txtinfo = culinfo.TextInfo;
lblResult.Text = txtinfo.ToTitleCase("AMIT JAIN");


OutPut: 
Amit Jain

Thursday, August 6, 2015

Update incremental value in one colum with one update statement in SQL

Declare @CorporateId int = 12, @SortOrder int
Set @SortOrder = 0
Update DashboardIndicators SET @SortOrder = SortOrder = @SortOrder + 1 Where CorporateId = @CorporateId