Professional Documents
Culture Documents
Biennv Cong Cu
Biennv Cong Cu
Hình 1
o Chọn storage\ Configuration storage \ chọn INI file
Hình 2
Hình 3
Cách làm như sau:
o Thêm hostname vào file host của window (c:\Windows\System32\drivers\etc\
hosts)
o Tạo site mới của winscp theo hostname
o Chi tiết hình ảnh:
Hình 6
Hình 8
Hình 12 Thực hiện tìm kiếm nhanh bằng cách gõ chữ (m)
Thực hiện tìm kiếm với tùy chọn filter để lọc kết quả tìm kiếm, nếu muốn hiển thị
lại hết thì xóa ký tự đang tìm kiếm đi
Hình 14
Hình 15
Hình 17
Duplicate this tab: mở thêm 1 tab là thư mục như tab hiện tại
Rename/Lock tab: cho phép đổi tên tab cho dễ nhớ và có thể lock lại
Hình 19
Close this tab (ctrl + W): đóng tab hiện thời
Close all tab (ctrl + shift + W): đóng tất cả tab trừ tab hiện thời
Hình 20
Hình 21
Từ 1 tab bất kỳ gọi tới thư mục đã đánh dấu từ trước
Hình 22
Kết quả sau khi chọn
Hình 23
Hình 24 Copy tên file --> kết quả khi paste: tnsnames.ora
Hình 25 Copy tên file cùng đường dẫn --> kết quả khi paste: c:\ora_soft\dev\dev10gr2\NETWORK\
ADMIN\tnsnames.ora
B2
5.1 Cấu hình context menu để tiện chọn khi chuột phải
context menu là vùng như hình dưới khi chuột phải
Hình 28
Để bẻ khóa trong trường hợp bắt buộc (người lock nghỉ rồi, ...), hạn chế việc này để
tránh mất source
Hình 29
Hình 30 Khả năng nếu không check chọn cái ở trên thì chạy file “c:\ora_soft\dev\dev12c\
forms\common\bin\config_builder.cmd” chắc cũng ok
Hình 32
Hình 33
Điền đường dẫn phù hợp
Hình 34
7.1 Hướng dẫn cài đặt BI Desktop để lập trình template layout (.rtf)
7.1.1 Kiểm tra phiên bản word trên máy là 32bit hay 64bit để cài đặt đúng
version BI desktop
word 2010
word 2016
Hình 36
Hình 37
Hình 39
Nếu cài đặt thành công thì mở word lên sẽ có add-ins như hình dưới
Hình 41
Hình 42
xxx
o Khai báo đầy đủ tham số của báo cáo, viết các function cần dùng của báo cáo
rồi compile package (F8) và lưu lại
Thường là cấp thư mục ngay dưới My Folders sẽ là thư mục của từng môi trường, Ở
đây hướng dẫn làm báo cáo cho môi trường DEV của DMC --> chọn thư mục
DMC_DEV
Khi chạy ra được kết quả Cần phải Savas Sample Data để làm báo cáo
Lưu ý:
o không nên merge dòng, cột trên layout vì khi xuất ra định dạng excel có thể sẽ
bị merge lung tung
o Nếu trên layout cần có nhiều bảng thì số cột trong các bảng nên bằng nhau và
kéo thẳng hàng các cột ở bảng dưới so với bảng trên để khi xuất excel không bị
merge cột
xxx
Tiến hành upload layout tạo ở bước trên cho báo cáo
Xóa template cũ
xxx
xxx
Nếu có form tham số gọi báo cáo thì đến đây là xong, ngược lại chạy theo
concurrent thì làm tiếp
Chọn thêm chế độ chạy và kết xuất
Hình 46
Khai báo đủ các tham số như trên data model
Hình 48
Hình 49
Using the Oracle BI Publisher Template Builder for Word add-in, we are able to construct the
following Pivot Table:
A way around this is to generate a month number alongside the month and use that to sort. We
can do that in the crosstab, sadly its not exposed in the UI yet but its doable.
Go back up and take a look a the initial crosstab command. especially the Rows and Columns
entries. In there you will find the sort criteria.
"ProductsBrand{,o=a,t=t}, PeriodYear{,o=a,t=t}"
Notice those leading commas inside the curly braces? Because there is no field preceding them it
means that the crosstab should sort on the column before the brace ie PeriodYear. But you can
insert another column in the data set to sort by. To get my sort working how I needed.
<?crosstab:c794;"current-
group()";"_Fund_Type_._Fund_Type_Display_{_Fund_Type_._Fund_Type_Sort_,o=a,t=n}";"
_Fiscal_Period__Amount__._Amt_Fm_Disp_Abbr_{_Fiscal_Period__Amount__._Amt_Fiscal
_Month_Sort_,o=a,t=n}";"_Execution_Facts_._Amt_";"sum"?>
Excuse the horribly verbose XML tags, good ol BIEE :0) The emboldened columns are not in the
crosstab but are in the data set. I just opened up the field, dropped them in and changed the type(t)
value to be 'n', for number, instead of the default 'a' and my crosstab started sorting how I wanted
it.
If you find other tips and tricks, please share in the comments.
Hình 50
7.4.2 Dùng giải pháp thứ 4 - Ảnh lưu trong cột Blob
Sử dụng thủ tục Pkg_Perp_Bi_Logo.Get_Bi_Logo_File để lấy ra file ảnh cho báo
cáo
Hình 51
ECHO OFF
- Cắt file shortcut tạo ra ở trên và dán vào thư mục startup
Hình 54
Hình 57
Hình 63
Cách chỉnh sửa file .ahk
o Chuột phải vào file và open with bằng notepad++ hoặc notepad
Hình 65
Hình 66
Các bước cấu hình:
o Tham khảo: https://www.java.com/en/download/help/error_mixedcode.xml
o Vào control panel: nhấn tổ hợp phím tắt: phím cửa sổ + R, nhập vào control và
chọn OK
Hình 67
o Đúp chuột vào Java (32-bit)
11.2 Biến một chuỗi cách nhau bởi dấu phẩy thành các dòng (String to rows)
11.2.1 Cách 1
With t As
(Select 'abc,fdsa,fds' Txt From Dual)
Select Regexp_Substr(Txt, '[^,]+', 1, Level) Data From t Connect By
Level <= Length(Txt) - Length(Replace(Txt, ',')) + 1
11.2.2 Cách 2
Select Regexp_Substr(:Process_Of_Works.Attribute1, '[^#]+', 1, Rn)
As S1
From Dual
,(Select Rownum As Rn From Dual Connect By Level
<= (Select Regexp_Count(:Process_Of_Works.Attribute1, '#', 1, 'i')
From Dual));
11.3.1 Cách 1
Select Ltrim(Sys_Connect_By_Path(Myvalues, ','), ',') Catvalues
From (Select Myvalues
,Row_Number() Over(Order By Myvalues) Rn
,Count(*) Over() Cnt
From (Select t.State Myvalues From Evn.Evn_Report_Setup
t Where t.Report_Code = 'EVN_GL_027')) Data
Where Rn = Cnt
Start With Rn = 1
Connect By Prior Rn = Rn - 1;
11.3.3 Cách 3
select d.dname department,
listagg(e.ename, ', ') within group (order by e.ename)
dept_employee_list
from eba_demo_ir_emp e,
eba_demo_ir_dept d
where d.deptno = e.deptno
group by d.DNAME
Select Id
,min(Diem) Keep(Dense_Rank last Order By Stt) min_last
,max(Diem) Keep(Dense_Rank last Order By Stt) max_lats
,min(Diem) Keep(Dense_Rank first Order By Stt) min_fir
,max(Diem) Keep(Dense_Rank first Order By Stt) max_fir
From (Select 1 Id
,10 Diem
,9 Stt
,'a' Ten
From Dual
Union All
Select 1 Id
,9 Diem
,9 Stt
,'b'
From Dual
Union All
Select 1 Id
,8 Diem
,8 Stt
,'c'
From Dual)
Group By Id
Tham khảo:
https://docs.oracle.com/cd/B14117_01/appdev.101/b10807/13_elems002.htm
pragma autonomous_transaction
11.7 Xác định dòng sinh lỗi trong các thủ tục của DB
https://docs.oracle.com/javadb/10.8.3.0/ref/rrefsqljoffsetfetch.html
Syntax
OFFSET { integer-literal | ? } {ROW | ROWS}
11.9.2.1 Giải pháp 1: Đẩy file vào DB và thực hiện insert thông qua lệnh select
Thêm 1 vài thao tác chuẩn hóa file excel như cách cũ:
o Chỉ để 1 sheet duy nhất chứa dữ liệu cần đưa vào bảng
o Xóa tất cả dòng trống (không có tí dữ liệu trên bất kỳ cột nào), cột trống (không
có tí dữ liệu trên bất kỳ dòng nào).
o Thêm 1 dòng trên cùng và đặt công thức để lấy được STT cột.
o Hiện tại chưa xử lý được cột kiểu date do đó đối với cột kiểu date thì để định
dạng thông thường là kiểu text theo định dạng MM-DD-YYYY và khi insert thì
to_date
- Tìm theo tên bảng dữ liệu cần insert, nếu có thì update, ngược lại thì thêm
mới
Thêm vào bảng cần insert dữ liệu cột line# kiểu số liệu number
insert into customers
Select
Col002,Col003,Col004,Col005,Col006,Col007,Col008,Col009,Col010,Col01
1,Col012,Col013,Col014,Col015,Col016,Col017,Col018,Col019,Col020
,Col021,Col022,Col023,Col024,Col025,sysdate,Col027,sysdate,Col029,Co
l030,Col031,Col032,Col033,Col034,Col035,Col036,Col037,Col038,Col039,
Col040
,Col041,Col042,Col043,Col044,Col045,Col046,Col047,Col048,Col049,Col0
50,Col051,Col052,Col053,Col054,Col055,Col056,Col057,Col058,Col059,Co
l060
,Col061,Col062,Col063,Col064,Col065,Col066,Col067,Col068,Col069,Col0
70,Col071,Col072,Col073,Col074,Col075,Col076,Col077,Col078,Col079,Co
l080
,Col081,Col082,Col083,Col084,Col085,Col086,Col087,Col088,Col089,Col0
90,Col091,Col092,Col093,Col094,Col095,Col096,Col097,Col098,Col099,Co
-- Delete from err$_import_xlsx err where err.ora_err_tag$ =
'CUSTOMERS';
-- select * from err$_import_xlsx err where err.ora_err_tag$ =
'CUSTOMERS';
11.9.2.2 Giải pháp 2: Chạy file bằng lệnh command window của pl/sql developer
Mỗi dòng tạo 1 câu lệnh insert bằng công thức của excel
Copy lệnh insert ra file notepad, thêm begin end và exception backtrace để bắt lỗi tại
dòng nào xảy ra lỗi.
Hình 71