pl / sql编码问题 [英] pl/sql coding problem

查看:89
本文介绍了pl / sql编码问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

展开 | 选择 | Wrap | 行号

推荐答案

1。您需要关注的第一件事是减少这么多变量的使用。您可以只使用一个varchar类型的变量并将整个正文消息存储到其中,而不是使用大量变量使代码看起来很乱。


2.我认为你的第三个游标c2取自From和To Date的MAX和MIN,因此在这种情况下,光标将仅包含一个值。因此,即使你的表中有多条记录,它也需要MAX或MIN。
1. The very first thing you need to look at is reducing the usage of so many variables. You can insted use just one variable of type varchar and store the whole body message in to it rather using lots of variables which makes the code look messy.

2. I think your third cursor c2 takes the MAX and MIN of From and To Date, so in that case your cursor will hold only one value in it. So even you have more than one record in your table, it will take the MAX or MIN of it.



1.第一个你需要关注的是减少这么多变量的使用。您可以只使用一个varchar类型的变量并将整个正文消息存储到其中,而不是使用大量变量使代码看起来很乱。


2.我认为你的第三个游标c2取自From和To Date的MAX和MIN,因此在这种情况下,光标将仅包含一个值。因此,即使您的表中有多个记录,也需要MAX或MIN。
1. The very first thing you need to look at is reducing the usage of so many variables. You can insted use just one variable of type varchar and store the whole body message in to it rather using lots of variables which makes the code look messy.

2. I think your third cursor c2 takes the MAX and MIN of From and To Date, so in that case your cursor will hold only one value in it. So even you have more than one record in your table, it will take the MAX or MIN of it.





i我遇到c_main游标问题。

脚本给我正确的结果

当我使用dbms_output.put_line

hi
i am having a problem with c_main cursor.
the script giving me right result
when i am using dbms_output.put_line



hi

i遇到c_main问题光标。

脚本给我正确的结果

当我使用dbms_output.put_line
hi
i am having a problem with c_main cursor.
the script giving me right result
when i am using dbms_output.put_line



如果你看到以下代码正确:

If you see the below code properly:

展开 | 选择 | Wrap | 行号


这篇关于pl / sql编码问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆