Click here to Skip to main content
15,881,882 members
Home / Discussions / Database
   

Database

 
GeneralRe: Remove a noise word in a SQL Server 2008 database Pin
Fernando A. Gomez F.13-Jun-12 5:05
Fernando A. Gomez F.13-Jun-12 5:05 
AnswerRe: Remove a noise word in a SQL Server 2008 database Pin
Eddy Vluggen13-Jun-12 1:24
professionalEddy Vluggen13-Jun-12 1:24 
GeneralRe: Remove a noise word in a SQL Server 2008 database Pin
Fernando A. Gomez F.13-Jun-12 5:06
Fernando A. Gomez F.13-Jun-12 5:06 
GeneralRe: Remove a noise word in a SQL Server 2008 database Pin
Eddy Vluggen13-Jun-12 5:48
professionalEddy Vluggen13-Jun-12 5:48 
AnswerRe: Remove a noise word in a SQL Server 2008 database Pin
Bernhard Hiller13-Jun-12 4:40
Bernhard Hiller13-Jun-12 4:40 
GeneralRe: Remove a noise word in a SQL Server 2008 database Pin
Fernando A. Gomez F.13-Jun-12 5:07
Fernando A. Gomez F.13-Jun-12 5:07 
GeneralRe: Remove a noise word in a SQL Server 2008 database Pin
Fernando A. Gomez F.13-Jun-12 5:08
Fernando A. Gomez F.13-Jun-12 5:08 
QuestionSQL Compound Primary Keys Pin
Kevin Marois12-Jun-12 11:36
professionalKevin Marois12-Jun-12 11:36 
I have an application where the client is working against a local DB, and each night will upload its data to the server, so I need Id's that are unique in the server's DB. The server and client DB's are identical.

Here's the tables:

CREATE TABLE tblOperators
	(OperatorId		INT	IDENTITY		NOT NULL,
	 AccountNo		VARCHAR(10)			NULL,
	 [Name]			VARCHAR(100)		NOT NULL,
	 Address1		VARCHAR(100)		NOT NULL,
	 Address2		VARCHAR(100)		NULL,
	 City			VARCHAR(100)		NOT NULL,
	 [State]		VARCHAR(2)			NOT NULL,
	 ZipCode		VARCHAR(10)			NOT NULL,
	 Phone			VARCHAR(10)			NOT NULL,
	 Email			VARCHAR(100)		NULL,
	 IsActive		BIT					NULL)


CREATE TABLE tblFacilities
	(FacilityId			INT	IDENTITY		NOT NULL,
	 OperatorId			INT					NOT NULL,
	 FormOfPaymentId	INT					NULL,
	 SaleTypeId			INT					NULL,
	 FacilityName		VARCHAR(100)		NULL,
	 FacilityAddress1	VARCHAR(100)		NULL,
	 FacilityAddress2	VARCHAR(100)		NULL,
	 FacilityCity		VARCHAR(100)		NULL,
	 FacilityState		VARCHAR(02)			NULL,
	 FacilityZip		VARCHAR(10)			NULL,
	 FacilityPhone		VARCHAR(10)			NULL,
	 BankName			VARCHAR(100)		NULL,
	 ManagerName		VARCHAR(100)		NULL,
	 ManagerPhone		VARCHAR(10)			NULL,
	 ManagerEmail		VARCHAR(100)		NULL,
	 PickupDays			VARCHAR(100)		NULL,
	 IsActive			BIT					NULL)


You can see the Operator and Facility Id's. They won't work once sent to the server.

I'm not sure how to define compound keys. Can someone point me in the right direction?

Thanks
If it's not broken, fix it until it is

AnswerRe: SQL Compound Primary Keys Pin
PIEBALDconsult12-Jun-12 16:45
mvePIEBALDconsult12-Jun-12 16:45 
GeneralRe: SQL Compound Primary Keys Pin
Kevin Marois12-Jun-12 18:13
professionalKevin Marois12-Jun-12 18:13 
GeneralRe: SQL Compound Primary Keys Pin
PIEBALDconsult13-Jun-12 4:10
mvePIEBALDconsult13-Jun-12 4:10 
GeneralRe: SQL Compound Primary Keys Pin
Kevin Marois13-Jun-12 6:33
professionalKevin Marois13-Jun-12 6:33 
JokeRe: SQL Compound Primary Keys Pin
Eddy Vluggen13-Jun-12 1:21
professionalEddy Vluggen13-Jun-12 1:21 
AnswerRe: SQL Compound Primary Keys Pin
Jörgen Andersson12-Jun-12 21:56
professionalJörgen Andersson12-Jun-12 21:56 
GeneralRe: SQL Compound Primary Keys Pin
Kevin Marois13-Jun-12 6:34
professionalKevin Marois13-Jun-12 6:34 
AnswerRe: SQL Compound Primary Keys Pin
Eddy Vluggen13-Jun-12 1:19
professionalEddy Vluggen13-Jun-12 1:19 
AnswerMaybe look at Set IDENTITY_INSERT On/Off Pin
David Mujica13-Jun-12 2:56
David Mujica13-Jun-12 2:56 
QuestionAccessing Oracle database Pin
Dangermouse9912-Jun-12 3:37
Dangermouse9912-Jun-12 3:37 
AnswerRe: Accessing Oracle database Pin
Pete O'Hanlon12-Jun-12 3:49
mvePete O'Hanlon12-Jun-12 3:49 
GeneralRe: Accessing Oracle database Pin
Dangermouse9912-Jun-12 4:08
Dangermouse9912-Jun-12 4:08 
GeneralRe: Accessing Oracle database Pin
Pete O'Hanlon12-Jun-12 5:34
mvePete O'Hanlon12-Jun-12 5:34 
AnswerRe: Accessing Oracle database Pin
PIEBALDconsult12-Jun-12 7:49
mvePIEBALDconsult12-Jun-12 7:49 
AnswerRe: Accessing Oracle database Pin
Jörgen Andersson12-Jun-12 21:33
professionalJörgen Andersson12-Jun-12 21:33 
QuestionSQL Server (image) data type Pin
Midnight Ahri10-Jun-12 20:33
Midnight Ahri10-Jun-12 20:33 
AnswerRe: SQL Server (image) data type Pin
Eddy Vluggen11-Jun-12 0:07
professionalEddy Vluggen11-Jun-12 0:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.