----------------------------------------------------------- New Message on MumbaiUserGroup
----------------------------------------------------------- From: vbohra Message 4 in Discussion Hi, Here it comes with table stru... CREATE TABLE U ( U_CD int NOT NULL ) go ALTER TABLE U ADD CONSTRAINT U_PK PRIMARY KEY (U_CD) go CREATE TABLE UR ( UR_CD int NOT NULL, R_CD int NOT NULL, -- FK U_CD int NOT NULL -- FK U ) go ALTER TABLE UR ADD CONSTRAINT UR_PK PRIMARY KEY (UR_CD) go CREATE TABLE RR (R_CD int NOT NULL, -- FK RG_CD int NOT NULL, -- FK M_CD varchar(6) NOT NULL -- FK ) go ALTER TABLE RR ADD CONSTRAINT RR_PK PRIMARY KEY (R_CD, RG_CD, M_CD) go ----------- the query for ADO.net follows. SELECT DISTINCT RR.M_CD, RR.RG_CD FROM U, UR, RR WHERE U.U_CD = UR.U_CD AND UR.R_CD = RR.R_CD AND U.U_CD = ? thanks, vivek ----------------------------------------------------------- To stop getting this e-mail, or change how often it arrives, go to your E-mail Settings. http://groups.msn.com/MumbaiUserGroup/_emailsettings.msnw Need help? If you've forgotten your password, please go to Passport Member Services. http://groups.msn.com/_passportredir.msnw?ppmprop=help For other questions or feedback, go to our Contact Us page. http://groups.msn.com/contact If you do not want to receive future e-mail from this MSN group, or if you received this message by mistake, please click the "Remove" link below. On the pre-addressed e-mail message that opens, simply click "Send". Your e-mail address will be deleted from this group's mailing list. mailto:[EMAIL PROTECTED]
