hi thereone more time i need your help i got 2 tables ( info an alias)table infoCREATE TABLE [dbo].[Info]( [int] IDENTITY(1,1) NOT NULL, [name] [varchar](50) NOT NULL, [phonenumber] [int] NOT NULL, CONSTRAINT [PK_Info] PRIMARY KEY CLUSTERED ( ASC)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]) ON [PRIMARY]GOSET ANSI_PADDING OFF
lets put one record on itINSERT INTO [Pruebas].[dbo].[Info] ([name] ,[phonenumber]) VALUES ('john' ,4445555)GO
a top (1) selectcode name phonenumber1 john 4445555
now the second table "alias"CREATE TABLE [dbo].[alias]( [fullname] [varchar](50) NOT NULL, [alias] [varchar](50) NOT NULL, CONSTRAINT [PK_alias] PRIMARY KEY CLUSTERED ( [fullname] ASC)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]) ON [PRIMARY]GO
lets put 3 records on it[code]INSERT INTO [Pruebas].[dbo].[alias] ([fullname] ,[alias]) VALUES ('code' ,'cd')GOINSERT INTO [Pruebas].[dbo].[alias] ([fullname] ,[alias]) VALUES ('name' ,'nm')gOINSERT INTO [Pruebas].[dbo].[alias] ([fullname] ,[alias]) VALUES ('phonenumber' ,'pn')
i need to cross these 2 tables to get this resultRESULT TABLE[code]ALIAS INFOcd 1nm johnpn 4445555
i really need your help, i have no idea how to do itmany thanks in advanced