在oracle中怎么通過字段名查詢其所在的表


ora = //連接描述符名:ora
(description = //描述
(address = //網絡地址之一
(protocol = tcp) //網絡協議(tcp表示TCP/IP協議)
(host = 129.9.114.22) //服務器IP地址:129.9.114.22
(port = 1251) //服務器端口號:1251
)
(connect_data = //連接數據
(sid = ora7) //數據庫標識名:ora7
(SERVER = DEDICATED)
(SERVICE_NAME = ora9i)
)
)

1、ORACLE備份數據到新表
create table poor.orderrequest_20171108 as select * from poor.orderrequest r WHERE r.ORDERREQUESTID=18859735;

select listagg(sickbedid, ',') within group(order by sickbedid) from concept.sickbed where ORGANIZATIONID=836248;

select wmsys.wm_concat(ii.EXTENSION) INTO v_sickbedids from concept.sickbed s, CONCEPT.SICKBEDII ii WHERE s.SICKBEDID=ii.SICKBEDID

2、在oracle中怎么通過字段名查詢其所在的表
select c.owner, c.table_name, c.* from dba_tab_columns c where c.column_name like '%PROVIDE%';

3、Timestamp類型字段更新范例:
update POOR.OrderRequest set RowVersion = systimestamp, NumberVersion = NumberVersion + 1 where OrderRequestId in (83634);
update POOR.OrderRequest set RowVersion = to_timestamp('2018-04-08 21:20:42.439', 'yyyy-mm-dd hh24:mi:ss:ff'), NumberVersion = NumberVersion + 1 where OrderRequestId in (77133) and EncounterId in (12117);
commit;

USE JX_T30_DXS

select distinct OBJECT_SCHEMA_NAME(id) + '.' + object_name(id) from syscomments
where text like '%rowversion%' and text like '%OPENQUERY%' and text like '%POOR.ORDERREQUEST%' AND object_name(id) NOT LIKE '%刪除%';

CREATE TABLE #tmpTable
(
OrderRequestID INT, NumberVersion INT, [RowVersion] DATETIME NULL
)

INSERT INTO #tmpTable(OrderRequestID, NumberVersion, [RowVersion])
SELECT * FROM OPENQUERY(syorcl, 'select r.orderrequestid, r.numberversion, r.rowversion from POOR.ORDERREQUEST r where OrderRequestId in (83634)');
select * from #tmpTable;
drop table #tmpTable;

3、更新事件內容調試時要注意清空ContentData為Null才會生效(調度會先把EventData序列化到ContentData):
update ixs.Event set eventdata='<ArrayOfEmp_Result ... </ArrayOfEmp_Result>'
, ContentData=null where Id = 17644781;

--判斷字段是否全數字:
SELECT max(to_number(EXTENSION)) FROM PRPA.ENCOUNTERII where REGEXP_LIKE(EXTENSION, '(^[+-]?\d{0,}\.?\d{0,}$)');

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM