CREATE OR REPLACE FUNCTION flength (
location_in IN VARCHAR2,
file_in IN VARCHAR2
)
RETURN PLS_INTEGER
IS
TYPE fgetattr_t IS RECORD (
fexists BOOLEAN,
file_length PLS_INTEGER,
block_size PLS_INTEGER
);
fgetattr_rec fgetattr_t;
BEGIN
UTL_FILE.fgetattr (
location => location_in,
filename => file_in,
fexists => fgetattr_rec.fexists,
file_length => fgetattr_rec.file_length,
block_size => fgetattr_rec.block_size
);
RETURN fgetattr_rec.file_length;
END flength;
/
oracle etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster
oracle etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster
22 Ocak 2008 Salı
14 Ağustos 2007 Salı
Oracle DB de tekrarlanan kayitlari silme
Asagidaki örnekde TestTable da min rowid ye sahip olan kayit saklanacak geri kalan tekrarlanan kayitlar silinecek.
Delete from TestTable t1
where t1.rowid >
(Select min(t2.rowID) from TestTable t2
where t1.col1 = t2.col1
and t1.col2 = t2.col2)
Benzer bir cözüm sql server icin söyle olabilir:
Oracle daki "rowid" yerine tablomuzun birincil anahtarini (PK) kullanabiliriz.
PK: sysID
Delete from TestTable where sysID IN (
Select sysID from TestTable t1
where t1.sysID > (Select min(t2.sysID) from TestTable t2
where t1.col1 = t2.col1
and t1.col2 = t2.col2))
Delete from TestTable t1
where t1.rowid >
(Select min(t2.rowID) from TestTable t2
where t1.col1 = t2.col1
and t1.col2 = t2.col2)
Benzer bir cözüm sql server icin söyle olabilir:
Oracle daki "rowid" yerine tablomuzun birincil anahtarini (PK) kullanabiliriz.
PK: sysID
Delete from TestTable where sysID IN (
Select sysID from TestTable t1
where t1.sysID > (Select min(t2.sysID) from TestTable t2
where t1.col1 = t2.col1
and t1.col2 = t2.col2))
10 Ağustos 2007 Cuma
Debugging Oracle PL/SQL from Visual Studio
PL/SQL kodlarini VS.NET icerisinde debug etmek ile ilgili güzel bir makale.
http://www.oracle.com/technology/obe/net11gobe/debugging/debugging.htm?msgid=5794223
Kaydol:
Kayıtlar (Atom)