Viewing 15 posts - 14,356 through 14,370 (of 14,953 total)
grtn316 (4/3/2008)
April 4, 2008 at 7:27 am
I'd convert the query as follows:
Change the "Not In" part to a left outer join and get rid of the string functions in it.
Change the "In" part to an "exists"...
April 4, 2008 at 7:23 am
Sounds like a job for a set of complex, custom scripts.
April 4, 2008 at 7:17 am
In Management Studio (I assume you're using that since this is the SQL 2005 forum; if it's actually Query Analyzer, it works the same way), click on the button on...
April 3, 2008 at 2:58 pm
vinojsasidharan (4/3/2008)
So if i understand correct the best option is to have it in the FROM clause itself, got confused with the replies.
If it's about the join, it should be...
April 3, 2008 at 2:40 pm
That particular error usually means there is a duplicate column name in the query. It will parse okay, but will give that error when it runs.
April 3, 2008 at 2:32 pm
I'm sure you've checked the execution plan on that long-running query. Does it point up any problems on index/table scans, missing statistics, etc?
April 3, 2008 at 1:57 pm
There's a section in BOL that maps the various 2k system tables to 2k5 system views.
ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/tsqlref9/html/a616fce9-b4c1-49da-87a7-9d6f74911d8f.htm
I've found it very useful.
April 3, 2008 at 1:54 pm
Lynn Pettis (4/3/2008)[/b
Okay, fine. Let's add one more criteria to the mix, in the table definition ID is not null. Wait, wait, I have it! Another QOTD...
April 3, 2008 at 1:51 pm
Of course, to take this to an even more ridiculous level, if ID is the PK (or otherwise not nullable), you don't have to worry about it being null, which...
April 3, 2008 at 1:49 pm
I think openrowset will do what you need.
Otherwise, a simple SSIS package definitely will. Shouldn't take more than a few minutes to build and test.
April 3, 2008 at 1:41 pm
Don't feel stupid. The computer version of "and/or" throws a lot of people. Takes a while to get used to.
April 3, 2008 at 1:39 pm
Do you have to merge data from the two into common tables?
For example, is there a customers table in each database and you have to make it into a single...
April 3, 2008 at 1:37 pm
What you're looking for is Joins. Look those up in BOL and you'll have a good start on how to solve this.
April 3, 2008 at 1:31 pm
"What decides which filter to use when there are more than one filters that contradict each other?"
Since you used "and", it uses both filters at the same time on all...
April 3, 2008 at 1:30 pm
Viewing 15 posts - 14,356 through 14,370 (of 14,953 total)