一个多表嵌套查询的sql语句
select batch_no "批次号",get_id "分类" from (
select(
select plan1.batch_no from product_plan plan1 where plan1.item_no=(select head1.product_code from wo_head head1 where head1.order_no =bbb)) batch_no,
(select decode(get_id,'BUY','外购件','MAK','自制件','MB','未定') from item where item_no= aaa) get_id
from (select req.item_no aaa,req.order_no bbb from process_req req where req.status_id='C'and req.order_no in(select head.order_no from wo_head head where head.batch_no in (select batch_no from product_plan) or head.product_code in ( select item_no from product_plan )))) order by qty desc
相关文档:
1.select * into [表] from OPENROWSET('MICROSOFT.JET.OLEDB.4.0','Excel 5.0;HDR=YES;DATABASE=D:\VFP\jspg\QuickEval2.5\Export\20092\dgqxps.xls',dgqxps$)
若遇到SQL Server 阻止了对组件 'Ad Hoc Distributed Queries' 的 STATEMENT'OpenRowset/OpenDatasource' 的访问,因为此组件已作为此服务器安全配置的一部分而 ......
PL/SQL Developer使用技巧
1、PL/SQL Developer记住登陆密码
在使用PL/SQL Developer时,为了工作方便希望PL/SQL Developer记住登录Oracle的用户名和密码;
设置方法:PL/SQL Developer 7.1.2 ->tools->Preferences->Oracle->Logon History , "Store history"是默认勾选的,勾上"Store wi ......
为了执行sql语句,我们会在access数据库中执行sql语句,这样方便我们分析。方法如下:
打开access数据库,点击”创建“,在单击“查询设计”,会弹出一个显示表的窗口,关掉。会出现一个sql试图,打开就可以再里面写sql代码了。 ......
通过“添加删除程序”里并不能完全删除SQlL server。
通过下面的命令,完全反安装SQL server 2005
d:\Setup.exe
/
qb REMOVE
=ALL
INSTANCENAME
=<
InstanceName
>
默认实例的名字是MSSQLSERVER
引用文章地址:http://www.cnblogs.com/jvstudio/archive/2010/01/17/1650089.ht ......
给PL/SQL创建账号、密码和付权限
CREATE USER zxd PROFILE "DEFAULT" IDENTIFIED BY zxd DEFAULT TABLESPACE "USERS" TEMPORARY TABLESPACE "TEMP" ACCOUNT UNLOCK
grant dba to "zxd";
F:\oracle\ora92\network\admin 路径下tnsnames.ora
ZXD =
(DESCRIPTION =
&nb ......