Powered By Blogger

Thursday, June 19, 2014

some useful queries in SQL

Query to list all employees except who are joined on 11- Sep-2001, 31-Mar-2001 and 30-Jan-2001(It also compares time).

   SELECT * FROM EMP WHERE HIREDATE NOT IN ( DATE('09-11-2001'),
                                          DATE('03-31-2001'),DATE('01-30-2001') )

 To list all the employees whose names are having ‘O’ as second character
       SELECT * FROM EMP WHERE ENAME LIKE '_O%'

 To list all the employees whose names are having ‘R’ as last character
       SELECT * FROM EMP WHERE ENAME LIKE '%R'

 To list all the employees whose names are having just 5 characters as length.
      SELECT * FROM EMP WHERE LENGTH(ENAME) = 5      

 To list all the employees whose names are starting with  ‘R’ and ending with ‘O’
   SELECT * FROM EMP WHERE ENAME LIKE 'R%O'

Tuesday, June 10, 2014

Some Useful Queries in Sql

-- Write a query to list the employees whose salaries are within the range of 5000 and 10000
   SELECT * FROM EMP WHERE SAL BETWEEN 5000 AND 10000

-- Write a query to list the employees who have joined in the month of March’99
   SELECT * FROM EMP WHERE MONTHNAME(HIREDATE)='March' AND YEAR(HIREDATE)=1999

-- Write a query to list the employees whose salaries are not within the range of 10000 and 13000
   SELECT * FROM EMP WHERE SAL NOT BETWEEN 10000 AND 13000

-- Write a query who are getting 1000, 2000, 3000
   SELECT * FROM EMP WHERE SAL IN (1000,2000,3000)

-- Query to list all employees except who are joined on 11- Sep-2001, 31-Mar-2001 and 30-Jan-2001(It also compares time).
   SELECT * FROM EMP WHERE HIREDATE NOT IN ( DATE('09-11-2001'),
                                          DATE('03-31-2001'),DATE('01-30-2001') )

Development Tools of WCF

Development Tools

WCF application can be developed by the Microsoft Visual Studio. Visual studio is available at different edition. You can use Visual Studio 2008 Expression edition for the development.
Visual Studio 2008 SDK 1.1

Microsoft Visual Studio 2008


Microsoft Visual studio 2008 provides new features for WCF compared to Visual Studio 2005. These are the new features added to VS 2008.

Different Technology Combined to form WCF.

Below figures shows the different technology combined to form WCF.

SMALL AND SOME USEFUL QUERIES


SQL


1)Write a query to list all the employees who are working as clerk
   SELECT * FROM EMP WHERE JOB = 'CLERK'

2) Write a query to list the employees who are working as clerks or managers with        the minimum salary of 4000
   SELECT * FROM EMP WHERE (JOB = 'CLERK' OR JOB = 'MANAGER' ) AND SAL > 4000

3) Write a query to get the current date
   SELECT CURRENT DATE FROM SYSIBM.SYSDUMMY1

4) Write a query o list the employees who are having experience more than 4 years
   SELECT * FROM EMP WHERE YEAR(CURRENT DATE) - YEAR(HIREDATE) > 4

5) Write a query to list the employees who hired in the last seven days
    SELECT * FROM EMP WHERE DAYS(CURRENT DATE) - DAYS(HIREDATE) <= 7

Introduction to WCF

Introduction to WCF

Windows Communication Foundation (Code named Indigo) is a programming platform and runtime system for building, configuring and deploying network-distributed services. It is the latest service oriented technology; Interoperability is the fundamental characteristics of WCF. It is unified programming model provided in .Net Framework 3.0. WCF is a combined features of Web Service, Remoting, MSMQ and COM+. WCF provides a common platform for all .NET communication.

Advantage


  • WCF is interoperable with other services when compared to .Net Remoting,where the client and service have to be .Net.
  • WCF services provide better reliability and security in compared to ASMX web services.
  • In WCF, there is no need to make much change in code for implementing the security model and changing the binding. Small changes in the configuration will make your requirements.
  • WCF has integrated logging mechanism, changing the configuration file settings will provide this functionality. In other technology developer has to write the code.