问题描述:
在使用透明网关建立Oracle与Sqlserver的连接,在Oracle中使用单独一句SQL读Sqlserver表的值可以正常显示,然后我把SQL放到procedure中运行,发现返回来的值为“NULL”,非常困扰!广发英雄帖求救。
在使用透明网关建立Oracle与Sqlserver的连接,在Oracle中使用单独一句SQL读Sqlserver表的值可以正常显示,然后我把SQL放到procedure中运行,发现返回来的值为“NULL”,非常困扰!广发英雄帖求救。
解决方案 »
- oracle存储过程要在异常下删除运行中创建的三个表
- 安装 Oracle Dot net component 后不能连接数据库了
- 读取 blob 数据文件
- oracle DBA是蓝领还是白领啊?
- 求助,想用Oracle SQL developer进行SQL2000至oracle9i的数据迁移,但是oracle SQl developer 连接SQLSERVER总是不成功,请问有什么可以解决的办法
- 求救!! 使用 dbca 创建数据库出错!
- 分区可以多个字段同时分区吗?
- 把table从一个数据库移植到同一版本另一个数据库中的不同表空间中,外加杂七杂八的一堆小麻烦
- VC中怎样调用SVRMGRL指令,比如CONNECT INTERNAL/ORACLE ,请给出代码
- oracle trigger 条件的使用
- 请教,关于ORACLE双机热备共享存储的HBA卡
- Oracle通过ODBC与SQLSERVER连接,访问时hsodbc.exe进程无法释放
cursor checkmeal(s_date date, e_date date) is
select to_number(c."card_sequ"),
c."card_id",
c."sign_time",
c."clock_id",
c."emp_id",
c."card_consume",
c."kind",
c."mealtype",
c."card_balance",
c."card_times"
into t_card_sequ,
t_card_id,
t_sign_time,
t_clock_id,
t_emp_id,
t_card_consume,
t_kind,
t_mealtype,
t_card_balance,
t_card_times
FROM MealRecords@eastriver C,
employee@eastriver E,
Departs@eastriver D
where E."depart_id" = D."depart_id"(+)
and E."emp_id" = C."emp_id"(+)
and c."mealtype" = '0'
and (c."flag" = 0 or c."flag" = 7)
And E."depart_id" Like '%'
And E."emp_id" Like '82%'
and ("transfer_flag" is null or "transfer_flag" = 0)
and c."op_ymd" <= e_date
and C."op_ymd" >= s_date;
begin
for c1 in checkmeal(i_sdate, i_edate) loop
--check this meal has downloaded or not
select count(sn)
into v_cnt
from con_record
where rdatetime = t_sign_time
and sn = t_card_sequ
and cardno = t_card_id
and card_times = t_card_times
and balance = t_card_balance;
if v_cnt = 0 then
begin
--select sysdate into v_sysdate from dual;
insert into con_record
(sn,
cardno,
rdatetime,
clock_id,
personnelid,
conmoney,
kind,
mealtype,
creation_date,
balance,
card_times)
values
(t_card_sequ,
t_card_id,
t_sign_time,
t_clock_id,
t_emp_id,
t_card_consume * 100,
t_kind,
t_mealtype,
sysdate,
t_card_balance,
t_card_times);
exception
when others then
v_except := 2;
end;
v_download_count := v_download_count + 1;
end if;
end loop;
commit;