Article View: borland.public.interbase.sql
Article #997Re: equivalent of RDB$DB_KEY in MS SQL Server?
From: RB Smissaert
Date: Sun, 18 Feb 2007 20:36
Date: Sun, 18 Feb 2007 20:36
43 lines
2593 bytes
2593 bytes
I tried that and it then is a keyword, but it still doesn't work with a syntax error. Couldn't figure it out from the MS SQL Server help either. I am keen to try this as I know that in Interbase using the rdb$db_key can speed certain queries up enormously, like this particular one. RBS "Wayne Niddery [TeamB]" <wniddery@chaffaci.on.ca> wrote in message news:45d8b10f$1@newsgroups.borland.com... > 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:
<45d8b8ac$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news3.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> <45d8b10f$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 From: "RB Smissaert" <bartsmissaert@blueyonder.co.uk> Newsgroups: borland.public.interbase.sql References: <45d83499$1@newsgroups.borland.com> <45d8835a$1@newsgroups.borland.com> <45d8871b$1@newsgroups.borland.com> <45d8b10f$1@newsgroups.borland.com> Subject: Re: equivalent of RDB$DB_KEY in MS SQL Server? Date: Sun, 18 Feb 2007 20:36:22 -0000 Lines: 44 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response Content-Transfer-Encoding: 7bit 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 NNTP-Posting-Host: 82.37.28.137 Message-ID: <45d8b8ac$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1171830956 82.37.28.137 (18 Feb 2007 12:35:56 -0800) Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news3.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