Article View: borland.public.interbase.sql
Article #996Re: equivalent of RDB$DB_KEY in MS SQL Server?
From: Wayne Niddery [TeamB]
Date: Sun, 18 Feb 2007 20:03
Date: Sun, 18 Feb 2007 20:03
31 lines
2039 bytes
2039 bytes
RB Smissaert wrote: > Thanks, I tried that, but got a syntax error. > How do I use it? This was my query: > > SELECT > EL1.ENTRY_LINK_TYPE, > COUNT(EL1.CHILD_ENTRY_ID) > FROM > ENTRYLINK EL1 INNER JOIN ENTRYLINK EL2 ON > (EL1.PARENT_ENTRY_ID = EL2.PARENT_ENTRY_ID AND > EL2.@Identity > EL1.@Identity) > GROUP BY > EL1.ENTRY_LINK_TYPE Sorry, try doubling it: EL2.@@Identity > EL1.@@Identity) - @Identity gets you a new value, sort of like calling an InterBase generator - @@Identity gets current value for a row. Caveat: I'm not an MSSQL expert, I actually know this only from reading other posts over time, so I *could* still be wrong, but I think I have it straight now. -- Wayne Niddery - Winwright, Inc (www.winwright.ca) "The moment the idea is admitted into society that property is not as sacred as the laws of God and there is not a force of law and public justice to protect it, anarchy and tyranny commence." - John Adams
Technical Details
Message-ID:
<45d8b10f$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<45d83499$1@newsgroups.borland.com> <45d8835a$1@newsgroups.borland.com> <45d8871b$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 114a0e,a44ede0468b45c90 X-Google-Attributes: gid114a0e,public X-Google-Language: ENGLISH,ASCII-7-bit Reply-To: "Wayne Niddery [TeamB]" <wniddery@chaffaci.on.ca> From: "Wayne Niddery [TeamB]" <wniddery@chaffaci.on.ca> Newsgroups: borland.public.interbase.sql References: <45d83499$1@newsgroups.borland.com> <45d8835a$1@newsgroups.borland.com> <45d8871b$1@newsgroups.borland.com> Subject: Re: equivalent of RDB$DB_KEY in MS SQL Server? Date: Sun, 18 Feb 2007 15:03:56 -0500 Lines: 33 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.3028 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028 X-RFC2646: Format=Flowed; Response NNTP-Posting-Host: 69.17.170.228 Message-ID: <45d8b10f$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1171829007 69.17.170.228 (18 Feb 2007 12:03:27 -0800) Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail