Viewing 7 posts - 76 through 82 (of 82 total)
try this and let me know
Line "and Parent.user_type_id =36" is for uniqueidentifier
and
Line "AND Child.is_identity+1=Parent.is_identity"(which is comment in this query) is for column which is
identity column in primary...
October 25, 2012 at 4:51 am
is your Person_Id column is "identity column" in Primary table
October 25, 2012 at 4:16 am
second option for the same requiment
declare @temp table(t varchar(50))
insert into @temp
select * from
(
values
('a.p'),
('y.a.p'),
('k.p')
)a (name)
select *
from @temp
where CHARINDEX('.',t,CHARINDEX('.',t)+1)=0
October 25, 2012 at 4:07 am
can you tell me more in detail whats happening and what is output when you run
few field and few tables means?
if its fine to you can you share some...
October 25, 2012 at 3:43 am
try this one
DECLARE @testtable TABLE (id INT, value INT, NAME CHAR(4));
INSERT INTO @testtable
VALUES
(1, 10, 'test'),
(2, 5, 'prod'),
(3, 10, 'test'),
(4, 4, 'test'),
(5, 4, 'test'),
(6, 4, 'test'),...
October 25, 2012 at 2:50 am
Ok,column which is having identity will be parent table and second one will act as as child
and yes if column name is same both tables then only query will work...
October 25, 2012 at 1:47 am
Hi,
I havnt got your question fully but i assume that you want to find tables that "can have relation
base on the column name"
Like Parent table having USERID as primary...
October 25, 2012 at 1:28 am
Viewing 7 posts - 76 through 82 (of 82 total)