Hmm, that is a great solution, I thought about this actually, but I am
not a good DB person, so I did not come up with the SQL Union solution.
Thanks a lot!
Peter Bromberg [C# MVP] wrote:[color=blue]
> The syntax for a SQL UNION QUERY:
>
> select NetID,Firstname, Lastname from Student
> UNION
> select NetID,Firstname, Lastname from Faculty;
>
> This will return a single resultset which you can bind to your grid.
>
> Peter
>
>
> --
> Co-founder, Eggheadcafe.com developer portal:
>
http://www.eggheadcafe.com
> UnBlog:
>
http://petesbloggerama.blogspot.com
>
>
>
>
> "antonyliu2002@yahoo.com" wrote:
>[color=green]
> > I want to put results from more than 1 sql queries into a signle
> > datagrid,
> >
> > For example, in my web application, I submit this following query to my
> > oracle database:
> >
> > Select NetID, Firstname, Lastname from Student;
> >
> > Then I put the result into my DataGrid. This is successful.
> >
> > Following this, I issue the following query:
> >
> > Select NetID, Firstname, Lastname from Faculty;
> >
> > and I want to append the result to the same DataGrid.
> >
> > Right now, my application is apparently overwriting the previous
> > records inserted into the DataGrid.
> >
> > How can I append the result of the second query to the same DataGrid?
> > Thanks
> >
> >[/color][/color]