sql语句查询问题 请大侠指点
有两个表
表A
id bigtype
1 2222
2 3333
3 4444
4 5555
表B
id bigtype smalltype
5 2222 8888
6 2222 9999
7 2222 0000
8 4444 0123
9 4444 5252
表B中的bigtype是调用的表A中的
想输出
2222
8888 9999 0000
4444
0123 5252
就是产品大类小类问题
我该怎样输出 写sql语句 请各位大侠帮帮忙
我的QQ:342542470
在线等 谢谢
VBScript code:
<%
Set conn = CreateObject("ADODB.Connection")
conn.Provider = "MSDataShape"
conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\AA.mdb;"
conn.Open
sql = "SHAPE {SELECT DISTINCT bigtype from A} " &_
"APPEND({SELECT bigtype, smalltype from B } AS DE " &_
"RELATE bigtype TO bigtype)"
Set de = Nothing
Set rs = CreateObject("ADODB.Recordset")
rs.Open sql, conn
Do While Not rs.eof
Response.Write rs(0).Value & "<br>"
Set de = rs(&
相关问答:
本人c#新手 可是要求要用c# ,sql2000开发c/s的工作流,一头雾水,请大家帮忙帮忙,给点思路,说的约具体越好,我也好往那个方面去学习
http://www.hxzi.com/view/61402.html
B/S版的,基本思想应该差不多的。。 ......
sql2005
select *from v_ddxx where d_sfsc='0' and (g_ssbm='1001' or g_ssbm='1002') and (xxf>0 and xxfwzf <>0 ),执行速度慢的要死,但是如果把(xxf>0 and ......
表中按datadate,tradeid为主键,也就是说tradeid会重复出现在不同天中,同一天的tradeid是不同的。现在我希望取一段时间范围内不重复的tradeid,且只要每个tradeid的最后一次出现的那条。sql语句该怎么写
: ......
C#如何判断连接sql server数据库成功?
try
{
connection.connect()
return true;
}
catch()
{
return false;
}
楼主很着急,开了几贴了。
引用
try
{
connection.connect( ......
table1
名称 入库数
CT机 3
CT机 5
X光机 4 ......