help help help(sql) :(

ad.hasareli

Well-known member
  • Mar 27, 2010
    5,264
    580
    113
    දකුනේ කොල්ලෙක්
    I want a help abt sql .I am using SQL Server 2008. I have a table like below

    attachment.php



    I want output like below

    [stdId] [stdmarks]
    .1 .........70
    .1 .........20
    .1 .........40
    .1 .........50
    .1 .........60
    .2 .........25
    .2 .........42
    .2 .........53
    .2 .........89




    create query

    CREATE TABLE [dbo].[stddtls](
    [stdId] [int] NULL,
    [stdmarks] [varchar](50) NULL
    ) ON [PRIMARY]
    GO
    SET ANSI_PADDING OFF
    GO
    INSERT [dbo].[ami] ([stdId], [stdmarks]) VALUES (1, N'70,20,40,50,60')
    INSERT [dbo].[ami] ([stdId], [stdmarks]) VALUES (2, N'25,42,53,89')
     

    Attachments

    • 1.JPG
      1.JPG
      14.8 KB · Views: 103
    Last edited: