实习中时常需要将写好的SQL语句嵌入到VB.NET的函数中,例如将下列SQL:
-- Get Mother Lot Common Info
<!---->select c.customerlotnumber -- customer lot#
,c.containername --Amkor lot#,
,amk.description
,inh.txndate indate
--s_time
,outh.txndate outdate -- e-time
,rs.resourcename resourcename
,emp.fullname
-- ,outh.qty
from container c,historymainline hml,workflowstep wfs
,operation opt,movehistory outh,moveinhistory inh
,RESOURCEDEF rs
,amkorwwoper amk
,employee emp
where c.splitfromid =(select containerid from container where
containername
='ML6410058461')
and hml.reversalstatus=1
and c.containerid=hml.containerid
and hml.operationid=opt.operationid
and hml.workflowstepid=wfs.workflowstepid
and hml.operationid=opt.operationid
and hml.historymainlineid=inh.historymainlineid(+)
and hml.historymainlineid=outh.historymainlineid(+)
and HMl.RESOURCEID=RS.RESOURCEID(+)
and (outh.historymainlineid is not null or inh.historymainlineid is not null)
and opt.amkorwwoperid=amk.amkorwwoperid
and hml.employeeid=emp.employeeid
order by c.containername,to_number(wfs.sequence),inh.txndate,outh.txndate
转换如下形式为:
String sql in VB.NET
<!---->sql = "select c.customerlotnumber -- customer lot# " & vbCrLf _
& ",c.containername --Amkor lot#, " & vbCrLf _
& ",amk.description " & vbCrLf _
& ",inh.txndate indate--s_time " & vbCrLf _
& ",outh.txndate outdate -- e-time " & vbCrLf _
& ",rs.resourcename resourcename " & vbCrLf _
& ",emp.fullname " & vbCrLf _
& "-- ,outh.qty " & vbCrLf _
& "from container c,historymainline hml,workflowstep wfs " & vbCrLf _
& ",operation opt,movehistory outh,moveinhistory inh " & vbCrLf _
& ",RESOURCEDEF rs " & vbCrLf _
& ",amkorwwoper amk " & vbCrLf _
& ",employee emp " & vbCrLf _
& "where c.splitfromid =(select containerid from container where " & vbCrLf _
& "containername='ML6410058461') " & vbCrLf _
& "and hml.reversalstatus=1 " '..
同事Tracy告诉我一个快速方法,仅仅利用UltraEdit的
查找替换功能(<>号不填,仅为引用号),
查找:< ^p >
替换:< " & vbCrLf _ ^p & " >
替换的第一个"号前不可省去空格,然后填上头尾即可,^p代表回车符,也就是将回车符展开,是不是很有趣的技巧?
分享到:
相关推荐
让你的UE更加强大——识别sql语法,提供关键字亮度! 将wordfile.txt拷贝到您UE的安装目录下,替换原来的,重启就OK了!
SQL Server精华 CHM chm SQL Server 2000菜鸟入门 chm SQL参考手册 chm UltraEdit教程 chm VB NET面向对象的实现 chm vbapi函数手册 chm vbscript语言参考 chm vbscript速查手册 chm VBSCRIP语言参考 CHM VC++ 编程...
UltraEdit中将一竖行数据转换为横行 UltraEdit中将一竖行数据转换为横行 UltraEdit中将一竖行数据转换为横行
代码如下:/// /// 将指定字符串按指定长度进行剪切, /// /// <param xss=removed> 需要截断的字符串 /// <param xss=removed> 字符串的最大长度 /// <param xss=removed> 超过长度的后缀 /// ...
目前该工具只支持英文版本的(Microsoft Query Analyzer, SQL Server 2005 Management Studio, Visual Studio 2005, Visual Studio .NET 2003, SQL Server 2000 Enterprise Manager, UltraEdit32, EditPlus)。...
ultraedit wordfiles all in one collection
ultraedit 语法高亮 多种语言
NULL 博文链接:https://ktc7000.iteye.com/blog/1816636
文件下载后复制到C:\Users\XXXX\AppData\Roaming\IDMComp\UltraEdit\wordfiles文件夹中,其中文件夹AppData文件夹可能被隐藏,然后打开UltraEdit点击高级中的设置,搜索语法高亮,在文档的完整目录名称选项中先任意...
将文件放在 .\UltraEdit\wordfiles 下即可使用
最近在研究Lua脚本语言(个人觉得它是Basic、C、C++的结合体),可是“强大”的UltraEdit默认安装后是不支持Lua语法高亮显示的,满屏幕“黑黑”的鸡肠字符让人感觉编程是那么的索然无味,没有了灵感。 终于有一天...
UltraEdit编辑器的语法着色文件 包括C/C++,VB,Java,C#,MySQL,PHP,perl,HTML,JavaScript,ASP,CSS,Ruby等语言的语法着色.
Ultraedit 32语法着色文件.rar
通过UE菜单栏的 查看->语法着色类型,语言1--语言20。配置文件在UE的安装目录下wordfile.uew, 这个文件路径可以通过“菜单栏 高级->配置->语法着色->语法文件全名”查看和配置。 默认可能已经有九个配置:/L1"C/...
UltraEdit的很多有用的操作技巧,可以很快的编辑文本,实现事半功倍。 注:本文为转载
启动Ultraedit,依次打开:高级(A) --> 配置(C) --> 编辑器显示 --> 语法着色。找到文档的完整目录名称所指示的目录, 然后把objective-c.uew文件放在对应的目录下即可。
UltraEdit语法高亮配置文件 将此文件覆盖安装目录下的该文件
本查看可以使UltraEdit得smali语法高亮. 具体用法: 下载本附件, 并拷贝到UltraEdit安装目录下的wordfiles文件中. 注意: 有可能你把该附件放到wordfiles目录后发现smali语法还是没有高亮. 那一种可能是wordfiles文件...
查看路径,打开UE,查看”语法高亮“选项,得到../WordFiles路径,将需要的语法文件复制到改路径即可,V24以前的老版本可能需要其他修改,请自行搜索使用方法