本文将介绍OraclePL/SQL未找到数据-非连续的Id值的详细情况,特别是关于oracle未找到任何数据的相关信息。我们将通过案例分析、数据研究等多种方式,帮助您更全面地了解这个主题,同时也将涉及
本文将介绍Oracle PL/SQL 未找到数据 - 非连续的 Id 值的详细情况,特别是关于oracle 未找到任何数据的相关信息。我们将通过案例分析、数据研究等多种方式,帮助您更全面地了解这个主题,同时也将涉及一些关于angular api 数据表:未找到数据、For oracle databases, if the top showing the oracle database, then oracle process is using the top c、NodeJS-Oracle DB - NJS-040 连接超时,在 ICP 中使用带有 Lopback 的 oracle 驱动程序(loopback-connector-oracle)、ORA-01403:找不到数据ORA-06512:在第8行0140300000-“未找到数据”的知识。
本文目录一览:- Oracle PL/SQL 未找到数据 - 非连续的 Id 值(oracle 未找到任何数据)
- angular api 数据表:未找到数据
- For oracle databases, if the top showing the oracle database, then oracle process is using the top c
- NodeJS-Oracle DB - NJS-040 连接超时,在 ICP 中使用带有 Lopback 的 oracle 驱动程序(loopback-connector-oracle)
- ORA-01403:找不到数据ORA-06512:在第8行0140300000-“未找到数据”
Oracle PL/SQL 未找到数据 - 非连续的 Id 值(oracle 未找到任何数据)
如何解决Oracle PL/SQL 未找到数据 - 非连续的 Id 值
我有一份具有以下结构的报告:
列 1 ID、列 2 Approved_Rejected_Status、列 3 Rep_Id
我在运行以下命令时收到未找到数据的错误:
DECLARE
V_REP_ID VARCHAR2(100);
V_ROWS_APPROVED_min NUMBER;
V_ROWS_APPROVED_max NUMBER;
V_STAT VARCHAR2(100);
BEGIN
SELECT min(id) INTO V_ROWS_APPROVED_min FROM MY_TABLE;
SELECT max(id) INTO V_ROWS_APPROVED_max FROM MY_TABLE;
FOR i IN V_ROWS_APPROVED_min..V_ROWS_APPROVED_max LOOP
SELECT APPROVED_REJECTED_STATUS INTO V_STAT
FROM MY_TABLE WHERE MY_TABLE.ID =i;
SELECT REP_ID INTO V_REP_ID
FROM MY_TABLE
WHERE MY_TABLE.ID = i;
END LOOP;
END;
我认为这可能与具有非连续值的 ID 有关? (我不能在报告上有连续的功能值,也不包括我需要根据 type_of_change 执行操作的异常原因)
谢谢
编辑: 感谢 MT0 的评论/建议! 我尝试使用游标 for 循环,但发生了一些非常奇怪的事情:
for cur_m in (select id,approved_rejected_status
from bdc_bench_watchlist_t
order by id)
loop
if cur_m.approved_rejected_status = ''Approved'' then
--Inserting into a test table:
insert into index_test (ID_copY,MY_APPROVED_STATUS)
values (cur_m.id,cur_m.approved_rejected_status);
end if;
end loop;
结果带来了所有 ID 范围(从最小值到最大值),但是! allowed_rejected_status 列是空的(只有标题在行上显示为空数据)。我不知道为什么。 如果我从源表中选择一个基本的选择 id、approved_rejected_status,它会带来一切正常(id 和状态信息正常)。
谢谢
解决方法
假设您需要遍历每个数字并执行某些操作,即使那里没有行,那么只需处理 NO_DATA_FOUND
异常:
DECLARE
V_REP_ID MY_TABLE.REP_ID%TYPE;
V_ROWS_APPROVED_min MY_TABLE.ID%TYPE;
V_ROWS_APPROVED_max MY_TABLE.ID%TYPE;
V_STAT MY_TABLE.APPROVED_REJECTED_STATUS%TYPE;
BEGIN
SELECT min(id),max(id)
INTO V_ROWS_APPROVED_min,V_ROWS_APPROVED_max
FROM MY_TABLE;
FOR i IN V_ROWS_APPROVED_min..V_ROWS_APPROVED_max LOOP
BEGIN
SELECT APPROVED_REJECTED_STATUS,REP_ID
INTO V_STAT,V_REP_ID
FROM MY_TABLE
WHERE MY_TABLE.ID =i;
EXCEPTION
WHEN NO_DATA_FOUND THEN
V_STAT := NULL; -- Or put default values here.
V_REP_ID := NULL;
END;
-- Do stuff with the stat/rep_id
END LOOP;
END;
如果您不想遍历每一行并想跳过缺少的 id 值,那么您可以使用游标并按 id 排序。
angular api 数据表:未找到数据
如何解决angular api 数据表:未找到数据
我正在尝试使用此 API 制作表格: https://run.mocky.io/v3/70e5b0ad-7112-41c5-853e-b382a39e65b7/people 我的表的 html 结构出现了,但没有出现我的 API 的数据,我在控制台中没有错误
你有解决方案吗?
这是我的休息组件的结构(我的表的代码):
people.ts
export class people {
id: string;
firstname: string;
lastname: string;
email: string;
mobile: string;
city: string;
country: string;
constructor(id,firstName,lastName,email,mobile,city,country){
this.id=id;
this.firstname=firstName;
this.lastname=lastName;
this.email=email;
this.mobile=mobile;
this.city=city;
this.country=country;
}
}
rest.component.html
<h1>Employee Dashboard</h1>
<table class="table table-bordered">
<thead>
<tr>
<th>Id</th>
<th>First Name</th>
<th>Last Name</th>
<th>Email</th>
<th>Address</th>
<th>City</th>
<th>Country</th>
</tr>
</thead>
<tbody>
<tr *ngFor= "let user of users">
<td>{{people.id}}</td>
<td>{{people.firstname}}</td>
<td>{{people.lastname}}</td>
<td>{{people.email}}</td>
<td>{{people.address}}</td>
<td>{{people.city}}</td>
<td>{{people.country}}</td>
</tr>
</tbody>
</table>
rest.component.spec.ts
import { Testbed,async } from ''@angular/core/testing'';
import { RouterTestingModule } from ''@angular/router/testing'';
import { AppComponent } from ''./rest.component'';
describe(''AppComponent'',() => {
beforeEach(async(() => {
Testbed.configureTestingModule({
imports: [
RouterTestingModule
],declarations: [
AppComponent
],}).compileComponents();
}));
it(''should create the app'',() => {
const fixture = Testbed.createComponent(AppComponent);
const app = fixture.debugElement.componentInstance;
expect(app).toBeTruthy();
});
it(`should have as title ''project''`,() => {
const fixture = Testbed.createComponent(AppComponent);
const app = fixture.debugElement.componentInstance;
expect(app.title).toEqual(''project'');
});
it(''should render title in a h1 tag'',() => {
const fixture = Testbed.createComponent(AppComponent);
fixture.detectChanges();
const compiled = fixture.debugElement.nativeElement;
expect(compiled.querySelector(''h1'').textContent).toContain(''Welcome to project!'');
});
});
rest.component.ts
import { Component,OnInit } from ''@angular/core'';
import { people } from ''./people'';
import { RestService } from ''./rest.service'';
@Component({
selector: ''app-root'',templateUrl: ''./rest.component.html'',styleUrls: [''./rest.component.css'']
})
export class RestComponent implements OnInit {
people: people[] = [];
constructor(public rs: RestService){
}
ngOnInit():void {
this.rs.getUsers().subscribe((response) => {
this.people=response;
})
}
title = ''project'';
}
rest.service.ts
import { Injectable } from ''@angular/core'';
import { HttpClient } from ''@angular/common/http'';
import { people } from ''./people''
@Injectable({
providedIn: ''root''
})
export class RestService {
constructor(private http:HttpClient){}
url:string= "https://run.mocky.io/v3/70e5b0ad-7112-41c5-853e-b382a39e65b7/people";
getUsers(){
return this.http.get<people[]>(this.url);
}
}
解决方法
实际的 People 对象数组位于 API 响应中名为“people”的属性下。所以,修改服务代码:
,
getUsers(){
return this.http.get<any>(this.url).pipe(
map(response) => {
return response[''people''];
})
);
}
您需要更改的代码将在两个文件中
-
rest.component.html
替换这个
<tr *ngFor= "let user of users">
<td>{{people.id}}</td>
<td>{{people.firstname}}</td>
<td>{{people.lastname}}</td>
<td>{{people.email}}</td>
<td>{{people.address}}</td>
<td>{{people.city}}</td>
<td>{{people.country}}</td>
</tr>
有了这个
<tr *ngFor= "let user of users">
<td>{{user.id}}</td>
<td>{{user.firstname}}</td>
<td>{{user.lastname}}</td>
<td>{{user.email}}</td>
<td>{{user.address}}</td>
<td>{{user.city}}</td>
<td>{{user.country}}</td>
</tr>
-
在 rest.component.ts 中
替换
ngOnInit():void {
this.rs.getUsers().subscribe((response) => {
this.people=response;
})
有了这个
ngOnInit():void {
this.rs.getUsers().subscribe((response) => {
this.users=response.people;
})
应该是 user.id 而不是 people.id
,
<tr *ngFor= "let user of users">
<td>{{user.id}}</td>
<td>{{user.firstname}}</td>
<td>{{user.lastname}}</td>
<td>{{user.email}}</td>
<td>{{user.address}}</td>
<td>{{user.city}}</td>
<td>{{user.country}}</td>
</tr>
代码的问题在于您将数据保存在人员中,而在前端您使用的是未定义的 user
。
<tbody>
<tr *ngFor= "let p of people">
<td>{{p.id}}</td>
<td>{{p.firstname}}</td>
<td>{{p.lastname}}</td>
<td>{{p.email}}</td>
<td>{{p.address}}</td>
<td>{{p.city}}</td>
<td>{{p.country}}</td>
</tr>
</tbody>
For oracle databases, if the top showing the oracle database, then oracle process is using the top c
Note 805586.1 Troubleshooting Session Administration (Doc ID 805586.1) Note 822527.1 How To Find Where The Memory Is Growing For A Process (Doc ID 822527.1) Note 273646.1 How to diagnose the high cpu utilization of ORACLE.EXE in Windows environment Note 728539.1 Find Blocking Sessions In sqlPLUS Note 61552.1 Troubleshooting Oracle Database Hanging Issues for versions from 7 to 9--Exhaustive Note 164760.1 Detecting and Resolving Locking Conflicts using TopSessionsNodeJS-Oracle DB - NJS-040 连接超时,在 ICP 中使用带有 Lopback 的 oracle 驱动程序(loopback-connector-oracle)
如何解决NodeJS-Oracle DB - NJS-040 连接超时,在 ICP 中使用带有 Lopback 的 oracle 驱动程序(loopback-connector-oracle)?
我正在使用 loopback-connector-oracle 4.1.1 版寻求有关我面临的问题的一些信息。分析如下: 我们有 DB 连接配置,可以使用 json 文件格式的 oracle 连接器使用属性连接到 oracle DB 数据源。 "maxConn": 20,“主机”:DB_HOST, “端口”:DB_PORT, “数据库”:DB_NAME, “密码”:DB_PASSWORD, “用户”:DB_USER, "connector": "oracle",
有两个进程/pod 正在运行,每个进程/pod 都有自己的池供oracle 连接器使用。发生的情况是,在一个实例中,oracle 能够连接并处理请求,但在第二个 pod/进程中,我注意到 njs-040 错误连接超时。由于两者都运行在同一个环境中,所以连接性不会成为问题。我正在寻求您的帮助或意见以了解连接池耗尽的原因?正如我所看到的,DB 上的连接/会话数量配置的数量较少。 当我重新启动 pod/进程时,一切都会恢复正常。在我的流程中遇到的一些问题,如果您可以指导并提供宝贵的意见,我正在寻求您的帮助。
- 如果使用连接池(oracle 连接器),它也应该释放对象,耗尽的机会会减少吗?
- 在进程/pod 启动并通过连接器 (oracle) 获取数据源中的连接对象后,发生网络问题并且进程和数据库之间的连接丢失,连接器是否恢复?根据我的观察,我在其他进程中注意到的似乎应该被恢复,当它与范围一起运行时,在一个进程中可能会导致什么?
我非常感谢您的回复。 提前致谢 桑吉夫
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)
ORA-01403:找不到数据ORA-06512:在第8行0140300000-“未找到数据”
如何解决ORA-01403:找不到数据ORA-06512:在第8行0140300000-“未找到数据”
通常,这个基本的If语句应该返回数据,但是我不明白,我在哪里弄错了。 (CustNo是char(8)。)我认为问题是由于V_Id而发生的。在一个通常的带有Custno =''C2388597''的select语句中,我可以得到数据。但是当它在If语句中时,它将给出ORA-01403错误代码。
提前感谢您的支持...
Declare
V_Id Deneme_Customer.Custno%type;
V_Custbal Deneme_Customer.Custbal%Type;
v_situation Deneme_Customer.Custbal_Situation%type;
Begin
Select Custno,Custbal,Custbal_Situation Into V_Id,V_Custbal,V_Situation
From Deneme_Customer Where V_Id =''&no'';
If (V_Custbal>=20 And V_Custbal<=100) Then
V_Situation:=''Es tut mir sehr leid'';
Elsif (V_Custbal>=101 And V_Custbal<=1000) Then
V_Situation:=''Guuuut'';
Elsif (V_Custbal>1000) Then
V_Situation:=''Sehr Guuuut'';
Else Dbms_Output.Put_Line(''Falsche Eingabe'');
End If;
update Deneme_Customer set Custbal_Situation=v_situation where Custno=V_Id;
end;`
解决方法
我想v_id
是局部变量,是Custno
,它是表的第8行。
对于Custno
与''&no''
之类的不匹配值,例如
Begin
Select Custno,Custbal,Custbal_Situation Into V_Id,V_Custbal,V_Situation
From Deneme_Customer
Where Custno = ''&no'';
Exception When no_data_found then null;
End;
,
您无需使用PL / SQL来确定应将 custbal_situation 设置为什么,您可以通过以下简单的更新语句轻松完成此操作:
UPDATE deneme_customer
SET custbal_situation =
CASE
WHEN custbal >= 20 AND custbal <= 100 THEN ''Es tut mir sehr leid''
WHEN custbal >= 101 AND custbal <= 1000 THEN ''Guuuut''
WHEN custbal > 1000 THEN ''Sehr Guuuut''
END
WHERE custbal >= 20;
如果您想对其进行修改以仅影响一位客户,只需将其添加到where子句中即可。
然后要查看没有设置其值的任何客户,可以使用类似这样的查询找到他们
SELECT custno,custbal,custbal_situation
FROM deneme_customer
WHERE custbal < 20;
,
看起来您可能没有任何匹配V_Id =''&no''的行,只是为了对其进行测试,请从其中V_Id =''&no''的表中进行选择计数并检查该计数。
AL_也是V_Id的唯一列,如果不是,那么您需要在错误处理程序中处理对匹配where子句的多行进行罚款的情况。
exception
when no_data_found then
<handle apppropriately>
when TOO_MANY_ROWS then
<handle apppropriately>
WHEN OTHERS THEN
DBMS_OUTPUT.PUT_LINE
(''Unknown error'');
end
今天关于Oracle PL/SQL 未找到数据 - 非连续的 Id 值和oracle 未找到任何数据的讲解已经结束,谢谢您的阅读,如果想了解更多关于angular api 数据表:未找到数据、For oracle databases, if the top showing the oracle database, then oracle process is using the top c、NodeJS-Oracle DB - NJS-040 连接超时,在 ICP 中使用带有 Lopback 的 oracle 驱动程序(loopback-connector-oracle)、ORA-01403:找不到数据ORA-06512:在第8行0140300000-“未找到数据”的相关知识,请在本站搜索。
本文标签: