Özgür Özvarış

Bir yazılımcının kırık dökük dünyası

mssql foreign key list

clock Kasım 28, 2013 16:57 by author OzgurOzvaris

Kaynak : http://stackoverflow.com/questions/483193/how-can-i-list-all-foreign-keys-referencing-a-given-table-in-sql-server-2005

 

select t.name as TableWithForeignKey, fk.constraint_column_id as FK_PartNo , c.name as ForeignKeyColumn 
from sys.foreign_key_columns as fk
inner join sys.tables as t on fk.parent_object_id = t.object_id
inner join sys.columns as c on fk.parent_object_id = c.object_id and fk.parent_column_id = c.column_id
--where fk.referenced_object_id = (select object_id from sys.tables where name = 'TableOthersForeignKeyInto')
order by TableWithForeignKey, FK_PartNo

 yada

select distinct name from sys.objects where object_id in 
(   select fk.constraint_object_id from sys.foreign_key_columns as fk
    --where fk.referenced_object_id =   	(select object_id from sys.tables where name = 'TableOthersForeignKeyInto')
)

ikisini harmanlarsak

select t.name as TableWithForeignKey, fk.constraint_column_id as FK_PartNo , c.name as ForeignKeyColumn , s.name
from sys.foreign_key_columns as fk
inner join sys.objects as s on s.object_id = fk.constraint_object_id
inner join sys.tables as t on fk.parent_object_id = t.object_id
inner join sys.columns as c on fk.parent_object_id = c.object_id and fk.parent_column_id = c.column_id
--where fk.referenced_object_id = (select object_id from sys.tables where name = 'TableOthersForeignKeyInto')
order by TableWithForeignKey, FK_PartNo


jquery noconflict

clock Kasım 19, 2013 16:48 by author OzgurOzvaris

Değerli arkadaşlar,

Yaptığım bir uygulamada daha önce kullanmış prototype.js kütüphanesi ile jquery dialog methodunun çakıştığını tecrübe ettim. Bu nedenle bir türlü dialogbox açılmıyordu.

Eğer sizde böyle bir sorunla karşılaşırsanız bana şu kod parçası yardımcı oldu sizede yardımcı olabilir diye paylaşıyorum.

$(document).ready(function () {
    var J = jQuery.noConflict();
	
	J("#dvMove1").dialog({
        autoOpen: true,
        modal: true,
        width: 690,
        show: { effect: "blind", duration: 1000 },
        hide: { effect: "explode", duration: 1000 },
        open: function () {
            //$('.ui-dialog-titlebar').hide();
            jQuery('.ui-widget-overlay').bind('click', function () {
                jQuery('#dvMove1').dialog('close');
            });
            //window.setInterval('$(\'#dvMove1\').dialog(\'close\');', 10000);
        }
    });
});

Herkese Selamlar. 



Hakkımızda  AboneOl 

Blog Yayınımıza Hoşgeldiniz.

Month List

RecentPosts

Sign In