0

Hi, I need help with gridview?

actually the gridview is supposed to show a view(aka join) consisting of two tables .

In my case I have (userid) , (money depositted) fields in table 1; userid can also be left as null.


I have another table I have first_name, last_name,phone numbers( fields) in table2

I want to display first_ name ,money depositted.
in the gridview.

It has to show all the enteries made in table 1 either it is null or has some userid; if it becomes null , then a space should appear instead of displaying null.


can anyone please guide me how to do this?

thanks

3
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by JuhaW
0

perhaps create a stored procedure that will select the data after the join?...im a newb, so i apologize if this is wrong

0

With sql server you can use query like this.

select t1.first_ name ,t2.money depositted from table1 t1 left join table2 t2 on t1.userid=t2.userid

left join should help for null values. If you like to hide null values you should use instead inner join.

C# can not create update statement by it self for joined queries 2.0 at least.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.