谢谢大家的意见,但是由于公司屏蔽论坛一类的东西,所以大家的留言我无法完整的看到,也无法回复,
谢谢大家的意见和建议 。
祝大家一切顺利 ,工作顺心
- 08:24
- 浏览 (56)
- 评论 (0)
SQL和ORACLE函数比较
2008-01-15 作者:wxinw 来源:CSDN
SQLServer和Oracle是大家经常用到的数据库,在此感谢作者总结出这些常用函数以供大家参考。
数学函数: 1.绝对值 S:SELECT abs(-1) value O:SELECT abs(-1) value from dual
2.取整(大) S:SELECT ceiling(-1.001) value O:SELECT ceil(-1.001) va ...
1。有时候静态SQL很笨,很木馁, 例如: temp_str 是变量=chr(39) || first_str || ''',''' || mid_number || chr(39);
temp_str 的值应该为'A123','A23e'
侧执行下面的静态SQL却达不到实际的效果(select rwt.serial_number , rst.lot_no , from rst, rwt where rwt.serial_number in ('A123','A23e'))不会执行 下面的SQL
select rwt.serial_numbe ...
//列子
p_str:aaaa^1111^sfsdf^
p_flag :^
create or replace function string_split(p_str in out varchar2,
p_flag in varchar2
)
return varchar2 is
v_str varchar(3000);
v_locate integer;
/*
Released by : Jacki ...
Middle Server:把连接数据库的密码放在中间服务器上,让客户端不用装Oracle数据库就可以了,也看不到密码。只连接中间服务器就可以了。
Windows自带Installutil.exe.
把用到的要連接的文件,放在與上面文件同目錄下,
在DOS下,執行
Installutil.exe.routingService.exe啟動服務。
Installutil.exe.routingService.exe /u停服務器。
使用VSS-Microsoft Visual SourceSofe進行同步开发程序,在一個用戶簽出程序後,另一個用戶就不能修改此程序,等到上個用戶籥入此程序後才可 ...
Middle Server:把连接数据库的密码放在中间服务器上,让客户端不用装Oracle数据库就可以了,也看不到密码。只连接中间服务器就可以了。
Windows自带Installutil.exe.
把用到的要連接的文件,放在與上面文件同目錄下,
在DOS下,執行
Installutil.exe.routingService.exe啟動服務。
Installutil.exe.routingService.exe /u停服務器。
使用VSS-Microsoft Visual SourceSofe進行同步編寫程序,在一個用戶簽出程序後,另一個用戶就不能修改此程序,等到上個用戶籥入此程序後才可 ...
- 17:07
- 浏览 (65)
- 评论 (0)
System.Resources.ResourceManager LocRM = new System.Resources.ResourceManager("OBA.MsgBox",typeof(Form1).Assembly);
//MsgBox是工程下的文件MsgBox.resx
labelWIPStatus.Text =LocRM.GetString("messageRoutingOK")+this.textBoxSN.Text;//messageRoutingOK是文件MsgBox.resx的内容
例子:
string culture = System.Threading.Thread.CurrentThread.CurrentUICulture.ToString();
//得到当前windows的版本
string failureGroupColumn;
if (culture.Equals("zh-TW"))//如果为中文台湾版
{
failureGroupColumn = "FAILURE_GROUP_C";//FAILURE_GROUP_C为数据库表里的字段,此字段内容必须是中文繁体。
}
else
{
failureGroupColumn = "FAILURE_GROUP ...
ServiceConfig.ini
文件内容:
[General]
StationLine=DL1
StationGroup=EMKAU
StationId=EMKAU11
Section=Emilie_Connection
Printer=FinePrint
CultureInfo=zh-TW
[Emilie_Connection]
srvAddress = tcp://172.1.5.2:2103/RoutingObject.Routing
主文件读取.ini文件内容[ DllImport ( "kernel32" ) ]
private static extern int Get ...
(1)returning A into B
update work_order wo
set wo.start_qty = nvl(wo.start_qty, 0) + 1
where wo.order_type = 'ATO'
and wo.exception_flag = 0
and wo.order_number = p_work_order
returning wo.start_qty into v_start_qty;
returning A into B:
A is ...
sql 中 sql%rowcount 判断执行SQL受影响的行数
例子:
update work_order
set order_state = '1'
where line_id = p_line_id
and order_state = '0'
and order_type = 'DPY'
and ORDER_PRIORITY = (select min(ORDER_PRIORITY)
from work_order
...
自定义程序的版本号
在应用程序里:
private void Form1_Load(object sender, System.EventArgs e)
{
this.Text+=" "+System.Windows.Forms.Application.ProductVersion;
}
在程序目录下文件AssemblyInfo.cs
里面修改
[assembly: AssemblyVersion("1.0.2")]
里面的版本号
发布程序(安装给客户的东西):
在运行NET程序以发布模式(Release),将程序代码文件Release烤给客户即可。
自定义用户使用启动程序的 ...
static void Main()
{
Process instance = RunningInstance();
if (instance == null)
{
Application.Run(new Form1());
}
}
#region RunningInstance
private static Process RunningInstance()
{
Process current = Process.GetCurrentProcess();
Process[] processes = Process.GetProcessesB ...
//--------------------Check the IMEI's format which Must be 15 figure----------------
Regex reg=new Regex(@"^\d{15}$",RegexOptions.None);
if(!reg.IsMatch(this.textBoxIMEI.Text))
{
labelStatus.Text="IMEI 格式有誤!";
labelStatus.ForeColor=Color.Red;
return;
}
1、创建 Statement 对象
建立了到特定数据库的连接之后,就可用该连接发送 SQL 语句。Statement 对象用 Connection 的方法 createStatement 创建,如下列代码段中所示:
Connection con = DriverManager.getConnection(url, "sunny", "");
Statement stmt = con.createStatement();
为了执行 Statement 对象,被发送到数据库的 SQL 语句将被作为参数提供给 Statement 的方法:
ResultSet rs = st ...
递归调用,10进制转mode= (2-34)进制
char[] bases = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J', 'K', 'L', 'M', 'N', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z' };
public string MyConvert(int value,int mode)
{
if ...
第一种:
很常见一个字符去判断是否為數字。
第二種:
用正則表邊式
using System.Text.RegularExpressions;
Regex reg=new Regex(@"^\d+(\.\d+)?$",RegexOptions.None);
// Match the double data
if(!reg.IsMatch(this.txtRefWeight.Text) || !reg.IsMatch(this.txtWeiRange.Text))
{
labelStatus.Text="重量格式錯誤!";
labelStatus.ForeColor=Co ...
others:
Dim Dtb As New DataTable
Dim myDataRow As DataRow
Dim myDataColumn As New DataColumn
myDataColumn.DataType = System.Type.GetType("System.String")
myDataColumn.ColumnName = "文件名" ...
- 16:57
- 浏览 (70)
- 评论 (0)
- 浏览: 2559 次

- 详细资料
搜索本博客
最近加入圈子
最新评论
-
一个截取字符串的方法
呵呵谢谢各位,我是想让他成为一个通用的东西,以后在编写存储过程时,可以直接用,就 ...
-- by 心似海 -
动态SQL
既然是存储过程,当temp_str的值有很多的时候, 可以考虑把temp_str ...
-- by armorking -
一个截取字符串的方法
用函数跑得会比较慢。。。不如再来个表像二楼说的1:N 想了想,写成下面这样貌视 ...
-- by qiuyuanshan -
一个截取字符串的方法
明明A、B两个字段是1:N关系, 用两张主从关系的表来描述,非常轻松 却偏偏要把 ...
-- by armorking -
NET递归调用10转(2-34) ...
Int32.ToString(34);
-- by deerchao






评论排行榜