My PL/SQL practice 8/2/10
SQLPlus :http://www.orafaq.com/wiki/SQL*Plus_FAQ
http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14261/sqloperations.htm
1. Transfer values from a sql scripts:
CNT=`sqlplus -s username/password1@dbname @getUVQuery_NULLCNT`;
Note : Remeber to use option "-s" (-s or -silent -- start sqlplus in silent mode. Not recommended for beginners!)
if not use "-s" , will return something as below :
SQL*Plus: Release 10.2.0.3.0 - Production on Tue Feb 9 11:03:08 2010
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
0
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
2.getUVQuery_NULLCNT.sql
set term off
column cnt noprint new_value total
SELECT count(inquiry_id) cnt
from inquire_all_current a
WHERE FORM_COMPLETE_STATUS = 'Y'
and ITEM_POPULATE_STATUS = 'N'
and expand_type='uvall'
and uv_query is null
ORDER BY INQUIRY_ID ASC;
set term on
prompt &total
exit
3. Define cursor and use cursor:
DECLARE
CURSOR cur IS
SELECT inquiry_id
from inquire_all_current a
WHERE FORM_COMPLETE
相关文档:
Last login: Mon Feb 8 14:13:19 2010 from 192.168.1.249
ipnet
-bash-3.00$
-bash-3.00$ ipnet
-bash: ipnet: command not found
-bash-3.00$ su - oracle
Password:
eastcsu: incorrect password
-bash-3.00$ eastcom
-bash: eastcom: command not found
-bash-3.00$ su - oracle
Password:
[oracl ......
由于代码过于简单,直接贴出:
SqlDataSourceEnumerator SseInstance = SqlDataSourceEnumerator.Instance;
//ServerName:服务器名;
//InstanceName:实例名;
//IsClustered:是否为群集服务器的一部分;
//Version:版本,8.*是SQL 2000,9.*是SQL 2005
DataTable DtSqlInstance = SseInstance.GetDataSources();
注: ......
/*
原表:
thid other
a 1
a 1
b 0
b 0
......
UrlScan的3.1是一个安全的工具,限制了IIS的HTTP请求将处理类型。 通过阻止特定的HTTP请求,在URLScan 3.1安全工具有助于防止对服务器应用程序可能有害的请求。 UrlScan的3.1是URLScan 2.5的更新版本。支持IIS 5.1中,IIS 6.0和IIS 7.0在Windows Vista和Windows Server 2008。下载地址http://download.csdn.net ......