Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Table doubt

Table doubt

Scheduled Pinned Locked Moved ASP.NET
questioncssdatabase
6 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    Hari CodeBlogger
    wrote on last edited by
    #1

    consider i have a two table in Database. if i want to bring first column of both table in the single grid view table that has to be displayed in the user screen, how do i do that..?

    T 1 Reply Last reply
    0
    • H Hari CodeBlogger

      consider i have a two table in Database. if i want to bring first column of both table in the single grid view table that has to be displayed in the user screen, how do i do that..?

      T Offline
      T Offline
      Tom Marvolo Riddle
      wrote on last edited by
      #2

      Simple.Use Joins in Sql to get the values and bind it with gridview Check these to know about joins: Joining Tables in SQL[^] Visual Representation of SQL Joins[^]

      You have to learn to think like a computer or teach him to think like a human. -Kornfeld Eliyahu Peter

      H 2 Replies Last reply
      0
      • T Tom Marvolo Riddle

        Simple.Use Joins in Sql to get the values and bind it with gridview Check these to know about joins: Joining Tables in SQL[^] Visual Representation of SQL Joins[^]

        You have to learn to think like a computer or teach him to think like a human. -Kornfeld Eliyahu Peter

        H Offline
        H Offline
        Hari CodeBlogger
        wrote on last edited by
        #3

        thanq so much

        1 Reply Last reply
        0
        • T Tom Marvolo Riddle

          Simple.Use Joins in Sql to get the values and bind it with gridview Check these to know about joins: Joining Tables in SQL[^] Visual Representation of SQL Joins[^]

          You have to learn to think like a computer or teach him to think like a human. -Kornfeld Eliyahu Peter

          H Offline
          H Offline
          Hari CodeBlogger
          wrote on last edited by
          #4

          consider i have 3 table. the solution i need is T1 C1-T2 C2 = T3 C3 T- Table C- column i tried this but doesnt work SELECT advamt,expamt,balance from [advance],[expense],[details] where (advamt-expamt)=balance;

          T 1 Reply Last reply
          0
          • H Hari CodeBlogger

            consider i have 3 table. the solution i need is T1 C1-T2 C2 = T3 C3 T- Table C- column i tried this but doesnt work SELECT advamt,expamt,balance from [advance],[expense],[details] where (advamt-expamt)=balance;

            T Offline
            T Offline
            Tom Marvolo Riddle
            wrote on last edited by
            #5

            Sorry for the late reply.I didn't get quite clearly but you have to try something like this

            select T1.C1,T2.C2,T3.C3 from Table1 as T1 inner join Table2 as T2
            on T1.id = T2.id inner join Table3 as T3 on T2.id =T3.id

            Use the common columns in between two tables to make joins for your query

            You have to learn to think like a computer or teach him to think like a human. -Kornfeld Eliyahu Peter

            H 1 Reply Last reply
            0
            • T Tom Marvolo Riddle

              Sorry for the late reply.I didn't get quite clearly but you have to try something like this

              select T1.C1,T2.C2,T3.C3 from Table1 as T1 inner join Table2 as T2
              on T1.id = T2.id inner join Table3 as T3 on T2.id =T3.id

              Use the common columns in between two tables to make joins for your query

              You have to learn to think like a computer or teach him to think like a human. -Kornfeld Eliyahu Peter

              H Offline
              H Offline
              Hari CodeBlogger
              wrote on last edited by
              #6

              thanq so much. :)

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups