SELECT CASE
WHEN ISNUMERIC(t.clnum)=1 THEN
(SELECT CASE
WHEN PropertyAddressOptionCode =
'F' THEN 1
WHEN PropertyAddressOptionCode =
'SZ' THEN 2
ELSE -10
END
FROM TableA (NOLOCK) WHERE Loannumber = cast(t.clnum as int))
ELSE -1
END AS 'PropertyAddressOptionType'
From TableB t where t.lnum='xyz'
The scenarios is that TableA does not having a matching value returned by
TableB.
In such scenario the ideally output should be null.
This is waht we get in 2000 but on sql 7.0 we get -10 as output.
Any ideas as why it that happens like that on 7.0.
I have a solution to handle this, but i'm interested in why that is happenin
g.
The above query returns -10 valueTry adding SET ANSI_NULLS ON to the start of your batch and re-run on both
servers.
It could be that the default setting of ANSI_NULLS differs between v7 and
2000
HTH. Ryan
"Manoj9" <Manoj9@.discussions.microsoft.com> wrote in message
news:24E5D921-3E10-4F8B-91F0-0B35EBDF53C3@.microsoft.com...
> SELECT CASE
> WHEN ISNUMERIC(t.clnum)=1 THEN
> (SELECT CASE
> WHEN PropertyAddressOptionCode =
> 'F' THEN 1
> WHEN PropertyAddressOptionCode =
> 'SZ' THEN 2
> ELSE -10
> END
> FROM TableA (NOLOCK) WHERE Loannumber = cast(t.clnum as int))
> ELSE -1
> END AS 'PropertyAddressOptionType'
> From TableB t where t.lnum='xyz'
> --
> The scenarios is that TableA does not having a matching value returned by
> TableB.
> In such scenario the ideally output should be null.
> This is waht we get in 2000 but on sql 7.0 we get -10 as output.
> Any ideas as why it that happens like that on 7.0.
> I have a solution to handle this, but i'm interested in why that is
> happening.
> The above query returns -10 value
>
Showing posts with label returns. Show all posts
Showing posts with label returns. Show all posts
Wednesday, March 21, 2012
Wednesday, March 7, 2012
Quick Import Wizard Question - Importing XML Data
Hello,
I want to import some XML data from the internet. For example, http://www.somexmldata.com/ returns some well formatted XML data that I want to import into SQL Server 2005.
If I create an Integration Services Project it's easy - I use an 'XML Source' and specify the URL as the 'XML location'. Job done!
However, I want to do it using the Data Import Wizard - how do I accomplish the same thing?
Many thanks,
BenUnfortunately, we were not able to add support for XML sources to the Import Wizard.
That is something that should be part of our upcoming work.
You are welcome to request that at the product feedback site.
Subscribe to:
Posts (Atom)