Find employees have salary greater than maximum salary in 'IT' department
SELECT ENAME, JOB, HIREDATE
FROM EMP
WHERE SAL > (SELECT MAX(SAL)
FROM EMP
WHERE DEPTNO =
(SELECT DEPTNO
FROM DEPT
WHERE DNAME = 'IT'));
Find employees have salary greater than maximum salary in 'IT' department
SELECT ENAME, JOB, HIREDATE
FROM EMP
WHERE SAL > (SELECT MAX(SAL)
FROM EMP
WHERE DEPTNO =
(SELECT DEPTNO
FROM DEPT
WHERE DNAME = 'IT'));
Labels: Oracle, Oracle Query, PL/SQL
Sometimes, you need to query Access database directly in SQL Server. In that case, you can create a linked server between SQL Server and Access by using this query.
EXEC sp_addlinkedserver
@server = 'AccessNorwind',
@provider = 'Microsoft.Jet.OLEDB.4.0',
@srvproduct = 'OLE DB Provider for Jet',
@datasrc = 'D:\AccessDatabase\NWind.mdb'
Labels: Access, SQL Server, SQL Server Tip, T-SQL
Assume that your SQL Server Name is SQL2K5. You allowed your database SQL2K5DB to be in mixed mode: SQL Server and Windows Authentication. In SQL Server Authentication mode, you use user name ABC and Password 123456.
One of the connection strings below you can use in your code with .NET Framework
If you want to use SQL Server Authentication, you can use:
Labels: SQL Server, SQL Server 2005
Click here to read the article.
Maybe you should modify your source code from now on when there're any changes in .NET Framework.
Source: Redmond Developer News
Labels: Oracle
Sometimes, you need to run your Oracle stored procedure in programming language code, such as C#. You can use this query to run:
string strSQL = "BEGIN YourStoredProcedure(Param1, Param2, ...); END;";
ExecuteOracleSQL(OracleConnectionString, strSQL);
Labels: Oracle, Oracle Query
Use this script to verify that the users have enough permissions on your table.
The privileges may be: SELECT, INSERT, UPDATE, DELETE
SELECT *
FROM DBA_TAB_PRIVS
WHERE TABLE_NAME = 'Your table name';
Labels: Oracle, Oracle Query
Read this article on SearchWinNT to know more:
Don't do that with SharePoint
Labels: SharePoint