Home > Archive > microsoft.public.sqlserver.server > November 2002 > CONCAT_NULL_YIELDS_NULL





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author CONCAT_NULL_YIELDS_NULL
Swapnil Parab

2002-11-27, 5:23 am

I am using ODBC to get a connection to SQL Server 7.0 ODBC
overrides the above db_option to ON. Thus I am forced to
put the command in the client, to run after getting a
connection. If I put the command in the stored procedure,
it recompiles everytime it is executed. Is there a way to
avoid recompilation?
Because of this, I am being forced to send the command
from C++ client. Any help is welcome!

THanks, Swapnil
Guillermo Licon

2002-11-27, 9:23 am

in your stored procedure.

SET CONCAT_NULL_YIELDS_NULL OFF

and Use

IsNull(Field1,'') + IsNull(Field2,'') + ...IsNull(Fieldn,'')




"Swapnil Parab" <swapnil.parab@citicorp.com> wrote in message
news:19e5c01c29606$f329ac80$89
f82ecf@TK2MSFTNGXA01...
> I am using ODBC to get a connection to SQL Server 7.0 ODBC
> overrides the above db_option to ON. Thus I am forced to
> put the command in the client, to run after getting a
> connection. If I put the command in the stored procedure,
> it recompiles everytime it is executed. Is there a way to
> avoid recompilation?
> Because of this, I am being forced to send the command
> from C++ client. Any help is welcome!
>
> THanks, Swapnil



Swapnil Parab

2002-11-28, 12:23 am

Thanks. Using IsNull() definitely circumvents the issue. Is there any
one time switch that can be used - similar to SET
CONCAT_NULL_YIELDS_NULL OFF - and still avoids recompilation?

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Tibor Karaszi

2002-11-28, 4:23 am

There's a database option, but AFAIK, a log of programming APIs will execute some SET at
beginning, making the database option worthless. I suggest you use ISNULL or COALESCE to handle
this "properly".

--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=...ublic.sqlserver


"Swapnil Parab" <swapnil.parab@citicorp.com> wrote in message
news:eO8bgHqlCHA.1928@tkmsftngp07...
> Thanks. Using IsNull() definitely circumvents the issue. Is there any
> one time switch that can be used - similar to SET
> CONCAT_NULL_YIELDS_NULL OFF - and still avoids recompilation?
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!
>



Swapnil Parab

2002-11-28, 9:23 pm

Thanks.

--Swapnil

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Sponsored Links





Free Braindumps | MCSE braindumps software forum

Copyright 2003 - 2008 examnotes.net