using …

Pure C#

Archive for the ‘Sql Server Join’ Category

“Invalid value 0 for state. Valid range is from 1 to 127.”

Posted by esersahin on 07/04/2009


Nice sql server error messages šŸ™‚

UsingĀ deleteĀ joinĀ statement in stored procedures and sql server return error messages.

Why?

Because,

There are records in related tables.
Need to delete records in related tables andĀ  we should try to delete again.
Change the RaiseError ERROR_STATE() to 1

Posted in Sql Server, Sql Server Error, Sql Server Join, Transact-SQL | Leave a Comment »

SQL Server / T-SQL Tutorial

Posted by esersahin on 20/03/2009


http://www.java2s.com/Tutorial/SQLServer/CatalogSQLServer.htm

Posted in Cast, Common Table Expressions, Cross-Tabs, CTE, Functions, Instead Of, Pivot Tables, Raiserror, ROW_NUMBER, SQL, Sql Server, Sql Server Error, Sql Server Join, SQLCLR, Stored Procedure, Transact-SQL, Trigger, UNION, UNION ALL, Update with Join | Leave a Comment »

SQL Server / T-SQL

Posted by esersahin on 20/03/2009


http://www.java2s.com/Code/SQLServer/CatalogSQLServer.htm

Posted in Cast, Cross-Tabs, CTE, Functions, Pivot Tables, SQL, Sql Server, Sql Server Error, Sql Server Join, Stored Procedure, Transact-SQL, Trigger | Leave a Comment »

How to construct and use SQL OUTER JOINs optimally

Posted by esersahin on 05/01/2009


http://searchsqlserver.techtarget.com/generic/0,295582,sid87_gci1285503,00.html

Posted in SQL, Sql Server, Sql Server Join, Transact-SQL | Leave a Comment »

How to create a SQL inner join and outer join: Basics to get started

Posted by esersahin on 05/01/2009


http://searchsqlserver.techtarget.com/tip/0,289483,sid87_gci1340999,00.html

Posted in SQL, Sql Server, Sql Server Join, Transact-SQL | Leave a Comment »

SQL SERVER – Random Number Generator Script – SQL Query

Posted by esersahin on 25/11/2008


http://blog.sqlauthority.com/2007/04/29/sql-server-random-number-generator-script-sql-query/

Posted in Random Number, SQL, Sql Server, Sql Server Join, Stored Procedure | Leave a Comment »

DATABASE JOURNAL – Featured Database Articles – MSSQL

Posted by esersahin on 23/11/2008


http://www.databasejournal.com/features/mssql/archives.php

Posted in Analysis Services, C#, CTE, Data, Data Mining, Integration Services, Report Builder, Report Designer, Report Server, Reporting Services, Sql Server, Sql Server Join, Transact-SQL | Leave a Comment »

to be or not to be

Posted by esersahin on 16/10/2008


USE AdventureWorks;
GO
SELECT ProductID
FROM Production.Product
WHERE ProductID
NOT IN (
SELECT ProductID
FROM Production.WorkOrder);
GO
SELECT p.ProductID
FROM Production.Product p
LEFT JOIN Production.WorkOrder w ON p.ProductID = w.ProductID
WHERE w.ProductID IS NULL;
GO

SELECT p.ProductID
FROM Production.Product p
LEFT JOIN Production.WorkOrder w ON p.ProductID = w.ProductID
AND w.ProductID IS NULL;

Posted in Sql Server Join | Leave a Comment »