Sunday, July 10, 2016

How to Rename SQL Table Column Name



In our  Timesheet application - in country table - deinfed column name  hoiday_type  defined instead of -Holiday_Type...

Here it is how to correct :

Oracle

To rename  a column in existing oracle  , we can use the below syntx
Again , let us take Scott schema.

In Emp Table if u want to change  Ename to EMP_Name
We use below command
Alter table EMP rename  ename to  EMP_Name


But in SQL 2008 – the  above syntax is not working





The correct  way is ;

SP_RENAME 'TS_METCO_HOLIDAY.metco_hoiday_type' , 'metco_holiday_type', 'COLUMN'

go

Thursday, June 2, 2016

What is Slicer in Excel 2013

 We are having generated output in excel containing employee number , date & total working hours for a month.

Columns
Emp No
EMpName
1st date
2nd date
3rd date,

Till
31st of May 2016

I woul like to serach where value is less than 8.5 .... by values or by formula like "< 8" 


We tried , but not getting  exact option in excel.

Finally today  got an alternative solution yet more  beauty  !!!!

Here  it is  ---SLICER- OPTION





Wednesday, May 18, 2016

How to Make Multiplication Table in C# - Simple Console Application

I just remeber my elementry school days in 1980- we need  to stand up and tell the table -from 1 to 16  for any table. But i checked with my kids before starting this article -they said, nowdays upto ten only for any table.


So here is how write a simple C#  code - to develop table.

----------------------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
// Muitiplication Table by G Selvam
namespace ConsoleApplication27
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Enter the Table Number to Print");
            int tablename = int.Parse(Console.ReadLine());
            int start = 1;

            Console.WriteLine( "Multiplication Table--  " + tablename);
            while (start < 17)
            {
                                Console.WriteLine(start + " * " + tablename  +"=  " + start * tablename);
                start = start + 1;
            }
            Console.ReadLine();
        }
    }
}

--------------------------When Run by Pressing F5--------you will get below output.

User will input the table name : & System will print the table
----------------------------------------------------------------------------------




Tuesday, May 17, 2016

Console Application - To Get input your name and Print on Console

In this below code...

User will be prompted to enter the Name
Then system will print name along with word "Halo"
And Finaly wait for user input to press any key to clear the screen..



Monday, May 16, 2016

How to get Current time in C# & Oracle Forms

It is always  a basic   statament for all oracle developer to get current date
Select sysdate  into a variable from Dual ;

But let us know how to do the same in C# VS2010
Below is the simple command to  get current time and  to display in Console

{
  Console.WriteLine(DateTime.Now.ToLongTimeString().ToString());
  Console.WriteLine(DateTime.Now.ToShortTimeString().ToString());
  Console.ReadLine();
 }
Below is the output for above  code:

Sunday, May 15, 2016

First Console Application - C# -VS 2010

It is long back to document the Dotnet --Let us start now,  and the AIM  is  -to take  a simple Timesheet Web Applicaiton Step by Step.....in this journey

Menu Navigatino :
  1. Start Visual Studio.
  2. On the menu bar, choose FileNewProject.
    The New Project dialog box opens.
  3. Expand Installed, expand Templates, expand Visual C#, and then choose Console Application.
  4. In the Name box, specify a name for your project, and then choose the OK button.
    The new project appears in Solution Explorer.
  5. If Program.cs isn't open in the Code Editor, open the shortcut menu for Program.cs in Solution Explorer, and then choose View Code.
your  codes looks like below :


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication22
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Enter Your Name, Please");
            String sname = Console.ReadLine();
            Console.WriteLine("hello ,"+ sname);
            Console.WriteLine("Please enter a key to continue''''''''");
            Console.Read();



        }
    }
}


-------Press  F5  ---------To Run the Application

You will get first screen something like below :

Now enter your name :  Then you will get below screen

Thats all.....you have done....with your very first application.

C#  --is  case sensitive  not like forms where you can use mixed .
Example : Writeline is wrong and WriteLine  is correct.


--------------------------------------------------------------------------------------
With Divine Blessing....Happy Journey.........