Mike,
>> How can I create a JOIN that excludes records based on two columns? If I
have one rowset that contains two columns that are keyed to another
rowset of the same two columns, how can I get only those rows that are in
the 2nd rowset that are not included in the 1st rowset?
Not really a .NET question, but:
SELECT TableA.*
FROM TableA LEFT OUTER JOIN TableB on TableA.C = TableB.C AND TableA.D =
TableB.D
WHERE TableB.C IS NULL
Seeya
Matthew Wills | Senior Analyst Programmer | Adviser Tools and Services |
Financial Planning and Third Party | NAB Technology
Phone: 02 9957 8183 | Mobile: 0435 002 520 | Email:
[EMAIL PROTECTED]
Mike Andrews
<outdoor.jellyrol
[EMAIL PROTECTED]> To
Sent by: [email protected]
"Discussion of cc
advanced .NET
topics." Subject
<ADVANCED-DOTNET@ Re: [ADVANCED-DOTNET] Cross-Server
DISCUSS.DEVELOP.C Queries
OM>
03/07/2007 08:04
AM
Please respond to
"Discussion of
advanced .NET
topics."
<ADVANCED-DOTNET@
DISCUSS.DEVELOP.C
OM>
Thanks Phil.
Yes this would work, however I won't be able to use this due to security
restrictions with sql server 2005.
I therefore have to come up with something else. More than likely I'll use
the linked server feature.
I do have another question - more or less a SQL question.
How can I create a JOIN that excludes records based on two columns?
If I have one rowset that contains two columns that are keyed to another
rowset of the same two columns, how can I get only those rows that are in
the 2nd rowset that are not included in the 1st rowset?
Thanks,
Mike
On 7/2/07, Phil Sayers <[EMAIL PROTECTED]> wrote:
>
> i think you can specify the connection string to the remote server in the
> text of your query.
> Check sql books online for
>
> OPENDATASOURCE
> and
> OPENROWSET
>
>
> -----Original Message-----
> From: Discussion of advanced .NET topics.
> [mailto:[EMAIL PROTECTED] Behalf Of Mike Andrews
> Sent: Monday, July 02, 2007 2:34 PM
> To: [email protected]
> Subject: [ADVANCED-DOTNET] Cross-Server Queries
>
>
> Guys,
>
> Perhaps I'm being crazy here, but is it possible to execute a cross-sql
> server query without having to set up a linked server in sql server?
> My problem is that I want to execute a sql statement against two
different
> databases located on two different servers but I don't really want a
> linked
> server (or I'd rather not if at all possible).
> Any suggestions?
>
> Thanks,
> Mike
National Australia Bank Ltd - ABN 12 004 044 937
This email may contain confidential information. If you are not the intended
recipient, please immediately notify us at [EMAIL PROTECTED] or by replying to
the sender, and then destroy all copies of this email. Except where this email
indicates otherwise, views expressed in this email are those of the sender and
not of National Australia Bank Ltd. Advice in this email does not take account
of your objectives, financial situation, or needs. It is important for you to
consider these matters and, if the e-mail refers to a product(s), you should
read the relevant Product Disclosure Statement(s)/other disclosure document(s)
before making any decisions. If you do not want email marketing from us in
future, forward this email with "unsubscribe" in the subject line to [EMAIL
PROTECTED] in order to stop marketing emails from this sender. National
Australia Bank Ltd does not represent that this email is free of errors,
viruses or interference.
===================================
This list is hosted by DevelopMentor® http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com