Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2005 > SQL Server 2005
SQL Server 2005 General discussion of SQL Server *2005* version only.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old December 6th, 2010, 10:25 PM
Registered User
Join Date: Dec 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default help me create UNIQUE Constraints

I want: on my table (Department_ID nvarchar(2),Possition_ID nvarchar(2))
never occur: exists

SELECT Department_ID FROM MyTable
WHERE Possition_ID = '00'
GROUP BY Department_ID HAVING COUNT(Possition_ID) >= 2

Similar Threads
Thread Thread Starter Forum Replies Last Post
SQL script to create a unique ID for records chubnut SQL Server 2000 1 October 16th, 2006 07:25 AM
Create Unique Id langer123 Classic ASP Basics 0 April 6th, 2005 01:27 PM
create a unique id in asp code langer123 Classic ASP Basics 1 March 15th, 2005 03:55 AM
create unique index junemo MySQL 6 September 22nd, 2004 05:11 PM
Tricks with Constraints ebsutherla SQL Server 2000 3 June 6th, 2004 05:28 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.