Hello,
My problem should be very easy for any experienced SQL
programmer:
I have got the following structure.
CREATE TABLE [ouioui].[COMPATIBILITE] (
[MIDLET_ID] [int] NOT NULL ,
[MOBILE_ID] [smallint] NOT NULL
) ON [PRIMARY]
CREATE TABLE [ouioui].[MIDLET] (
[MIDLET_ID] [int] IDENTITY (1, 1) NOT NULL ,
[MIDP] [tinyint] NULL
) ON [PRIMARY]
ALTER TABLE [ouioui].[COMPATIBILITE] ADD
CONSTRAINT [FK_COMPATIBILITE_MIDLET] FOREIGN KEY
(
[MIDLET_ID]
) REFERENCES [ouioui].[MIDLET] (
[MIDLET_ID]
)
I have the following data in table MIDLET:
MIDLET:
MIDLET_ID MIDP
---------------------
1 1
2 0
3 0
4 1
5 0
6 1
...
I have no data in table COMPATIBILITE, and here is what I
want to get
(Every Midlet_ID which have 1 in the MIDP column, and a
static value '9' in column MOBILE_ID):
MIDLET_ID MOBILE_ID
-------------------------
1 9
4 9
6 9
...
How can I do?
Thanks in advance
Alex