由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - SQL question
相关主题
问个SQL的问题关于tcp包头的一个小问题 [图] (转载)
mysql DB - 怎么能很容易地update data? (转载)complexity of a recursive
SQL add some columns into a table from another table (转载请问strcpy()和memcpy()的写法问题  (转载)
SQL fast search in a 10 million records table (转载)哪位帮忙看一个极为简单的 MPI 程序,感谢拉!
请教大家一个LINQ to SQL 的 query一道笔试题
问个小问题3 c++ challenge-and-grill questions
A question about page tableA tough pointer concept
问个简单的memory allocation 的问题。android上几个常用的image处理方法
相关话题的讨论汇总
话题: zip话题: dest话题: state话题: table话题: city
进入Programming版参与讨论
1 (共1页)
m***r
发帖数: 294
1
Table A (org_zip, dest_zip), Table zip(zipcode, city, state)
How to get
orig_city, orig_state, dest_city, dest_state
thanks,
c********g
发帖数: 449
2
just try to give you some ideas.
Maybe wrong.
first get the org_city and org_state then use another select to get des_city
and state
Table A (org_zip, dest_zip), Table zip(zipcode, city, state)
select zip.city as org_city ,zip.state as org_state, A.dest_zip into table C
from A,zip
where A.org_zip=zip.zipcode;
select C.city,C.state,zip.city as des_city, zip.state as des_state
from C ,zip
where c.dest_zip=zip.zipcode;
w******n
发帖数: 120
3
select org_zip,orig_state=state.zip1, dest_city=city.zip2,dest_state=state.
zip2
from A , zip as zip1, zip as zip2
where A.org_zip=zip1.zipcode and A.dest_zip=zip2.zipcode

【在 m***r 的大作中提到】
: Table A (org_zip, dest_zip), Table zip(zipcode, city, state)
: How to get
: orig_city, orig_state, dest_city, dest_state
: thanks,

1 (共1页)
进入Programming版参与讨论
相关主题
android上几个常用的image处理方法请教大家一个LINQ to SQL 的 query
好奇下面的code是什么语言写的,能帮忙识别下吗?文件是 .mm问个小问题
node.js multer: Recursive process.nextTick detectedA question about page table
这段代码花很长时间,为什么?问个简单的memory allocation 的问题。
问个SQL的问题关于tcp包头的一个小问题 [图] (转载)
mysql DB - 怎么能很容易地update data? (转载)complexity of a recursive
SQL add some columns into a table from another table (转载请问strcpy()和memcpy()的写法问题  (转载)
SQL fast search in a 10 million records table (转载)哪位帮忙看一个极为简单的 MPI 程序,感谢拉!
相关话题的讨论汇总
话题: zip话题: dest话题: state话题: table话题: city