SQL SERVER2000语句转换成oracle语句

sxlcom 2006-09-25 11:13:40
请问如何将以下SQL SERVER2000下的语句转换成oracle语句,能够起到同样的效果
declare @weijibianma char(10)
set @weijibianma='1000003'
select * from tbkehuxinxi where weijibianma=@weijibianma
...全文
152 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
雨男Mohican 2006-09-26
  • 打赏
  • 举报
回复
mark
allright_flash 2006-09-26
  • 打赏
  • 举报
回复
好久没用sql server了,凑个热闹!
Eric_1999 2006-09-26
  • 打赏
  • 举报
回复
谢谢wxmwxmwxm(毛毛毛毛)执教!
declare
w varchar2(10) := '1000003';
select * from tbkehuxinxi t where t.weijibianma = w
Eric_1999 2006-09-26
  • 打赏
  • 举报
回复
oh,my god~~~我都没看,就直接改了楼主的sql而已。
wxmwxmwxm 2006-09-26
  • 打赏
  • 举报
回复
Eric_1999(╙@^@╜) 犯了低级错误,变量的名称不能与字段名称相同,否则会查出全部的记录,为什么我就不说了,自己想想吧
select * from tbkehuxinxi t where t.weijibianma = weijibianma
sxlcom 2006-09-26
  • 打赏
  • 举报
回复
还是不行呀提示:
ERROR 位于第 2 行:
ORA-06550: 第 2 行, 第 20 列:
PLS-00103: 出现符号 "("在需要下列之一时:
constant exception
<an identifier> <a double-quoted delimited-identifier> table
LONG_ double ref char time timestamp interval date binary
national character nchar
符号 "<an identifier>" 被替换为 "(" 后继续。
ORA-06550: 第 3 行, 第 1 列:
PLS-00103: 出现符号 "SELECT"在需要下列之一时:
begin function package
pragma procedure subtype type use <an identifier>
<a double-quoted delimited-identifier> form current cursor
符号 "begin" 被替换为 "SELECT" 后继续。
ORA-06550: 第 3 行, 第 61 列:
PLS-00103: 出现符号 "end-of-file"在需要下列之一时:
. ( * @ % & - + ; /
at for mod rem <an exponent (**)> and or group having
intersect minus order start union where connect ||
Eric_1999 2006-09-26
  • 打赏
  • 举报
回复
declare
weijibianma varchar2(10) := '1000003';
select * from tbkehuxinxi t where t.weijibianma = weijibianma
sxlcom 2006-09-26
  • 打赏
  • 举报
回复
to: Eric_1999(╙@^@╜) ( )
其实wxmwxmwxm(毛毛毛毛) ( ) 的意见我早己知道,但是我就是在变量名与字段名不同的情况下产生上面的错误,不知是什么原因

17,377

社区成员

发帖
与我相关
我的任务
社区描述
Oracle 基础和管理
社区管理员
  • 基础和管理社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧