c# - 从 sql server 2008 中获取/选择数据到数据 gridview

标签 c# sql database visual-studio-2010

任何人都可以帮助我进行数据库查询,以显示从 Sql Server 2008 中提取/选择的数据到 c# 桌面应用程序中。我附上了所需的表格图和数据 GridView ,请尽快答复。我需要在gridview中显示的是:

  1. 仓库编号
  2. 货仓名称
  3. 类型名称
  4. 伯爵姓名
  5. 每袋磅
  6. 总磅数

图表: enter image description here

enter image description here

最佳答案

我有答案:

select 
    g.godown_id, g.godown_name, t.type_name, b.count, r.bags_received,
    b.lb_per_bag, s.supplier_name
from
    tbl_yarn_book b, tbl_godown g, tbl_godown_transaction gt, 
    tbl_yarn_receive r, tbl_yarn_supplier s, tbl_yarn_type t                        
where
    gt.godown_id = g.godown_id 
    and gt.receive_id = r.receive_id
    and r.book_id = b.book_id 
    and b.type_id = t.type_id 
    and b.supplier_id = s.supplier_id

关于c# - 从 sql server 2008 中获取/选择数据到数据 gridview,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11914974/

相关文章:

c# - 从 Python 运行 .NET COM 程序集。程序集 dll 的 Python 路径?

sql - 在没有复合键的情况下规范化为 1NF

c# - Azure AD 身份从网站传递到 azure sql 数据库

php - 有人可以帮助找出这个 PHP 文件中语句的问题吗?

c# - 为什么我需要 "new"来进行锯齿状数组初始化?

c# - 无法更新 Azure 中的 Azure Function

c# - 使用 LINQ 显示时间跨度内每小时的平均值

java - 如何在oracle中获取一个表作为输出参数

sql - 在perl中打开管道进程(sqlplus)并从查询中获取信息?

database - 我如何为人群建模?