Wednesday, March 21, 2012
number of errorlogs in mssql 7.0
Is there any setting in mssql 7.0 to change the number of
sqlserver error logs from the default value of 6?
I know for sure - we can change a registry setting for
mssql2000. IS there anything for mssql7.0?
regards,
bharathbharath wrote:
> hi,
> Is there any setting in mssql 7.0 to change the number of
> sqlserver error logs from the default value of 6?
> I know for sure - we can change a registry setting for
> mssql2000. IS there anything for mssql7.0?
> regards,
> bharath
You need to change the registry entry:
HKLM\SOFTWARE\Microsoft\MSSQLServer\MSSQ
LServer
DWORD NumErrorLogs = <xx>
(answered previously by Neil Pike, MVP)
http://groups.google.pl/groups?hl=p...&rnu
m=4
sincerely,
--
Sebastian K. Zaklada
Skilled Software
http://www.skilledsoftware.com
This posting is provided "AS IS" with no warranties, and confers no rights.sql
Monday, March 19, 2012
Number limit of table columns in transactional replication
following error message:
The article cannot be created on table 'TEST' because it has more than 255
columns
Is that the limit of replication in SQL Server 2000? If yes, Is there any
way to increase the limit, or it can be configured?
Thanks!
This is the limit and it isn't configurable
partition the table into smaller tables and replicate each one separately.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
Monday, March 12, 2012
Number Format
When setting the format property for a textbox containing a number the first parameter relates to a positive number, the second negative and the third to zero.
eg #,###; (#,###); 0
Is there a way of also formatting Null values in the same way without writing custom code?
Could you do an isnull in your query so that you don't get NULL showing on your report?
Jarret
|||I could. Just means I have to either type this in for every column in my dataset or every textbox (instead of doing a multi-select). Sounds a bit lazy I know but I have a lot of reports and columns to go through.
Mark
|||Sorry Mark, I can't seem to find anything that will replace NULL with a 0 just by changing using the format code.
I think you're best bet is using the ISNULL or an expression, but either way, you'd have to change each field.
Jarret
Friday, March 9, 2012
NULL+ x = NULL problem
Is there any setting in SQL that can disable this silly logic.
For example, in a number cleaning query I want to combine the Code and the Number
The problem is that I either the code or the number is null, I lose the number:
update tbl
set Teleh = CodeH + TeleH
I know that I can split this and check if one is null, both null, both non-null but i am sure there must be an easier way such as Accesses & operator
The way that I am using now does this, but i'm not sure if this is the best approach
update tbl
set Teleh = isnull(Codeh,'') + isnull(Teleh,'')
The problem with this is that the result is not stored as null, but as '' length 0The problem with this is that the result is not stored as null, but as '' length 0but that's exactly what you wanted!!
or are you saying that if they are both null then you want the result null?
in that case (pun intended),update tbl
set Teleh = case when CodeH is null
and TeleH is null
then null
else coalesce(CodeH,'')
+coalesce(TeleH,'')
end|||Sorry
Often, the entire number is stored in CodeH and Teleh is empty
So if a update it to Codeh + Teleh, I loose the correct number in Codeh
NULL vs. empty strings, SQL Server setting
right thing to do, is there a switch or flag for SQL Server 2005 to
make NULL strings be the same as empty string?
Thanks,
K Galanga
No such switch...
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Kat" <galangkk@.sverdrup.com> wrote in message
news:1160335879.054188.203150@.i3g2000cwc.googlegro ups.com...
> Without getting into a theoretical discussion about whether it is the
> right thing to do, is there a switch or flag for SQL Server 2005 to
> make NULL strings be the same as empty string?
> Thanks,
> K Galanga
>
|||Kat wrote:
> Without getting into a theoretical discussion about whether it is the
> right thing to do, is there a switch or flag for SQL Server 2005 to
> make NULL strings be the same as empty string?
> Thanks,
> K Galanga
Depending on what your intention is, maybe you could make a column NOT
NULL and add a default:
ALTER TABLE tbl ADD CONSTRAINT df_tbl_col DEFAULT ('') FOR col;
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
|||Hello David,
What do you mean by "the same", you can get a NULL to act as a '' in concatenation
,however comparisions i.e. NULL = '' will always be inconclusive.
set concat_null_yields_null off
is what you want to achieve the former
Simon Sabin
SQL Server MVP
http://sqlblogcasts.com/blogs/simons
> Kat wrote:
> Depending on what your intention is, maybe you could make a column NOT
> NULL and add a default:
> ALTER TABLE tbl ADD CONSTRAINT df_tbl_col DEFAULT ('') FOR col;
> --
> David Portas, SQL Server MVP
> Whenever possible please post enough code to reproduce your problem.
> Including CREATE TABLE and INSERT statements usually helps.
> State what version of SQL Server you are using and specify the content
> of any error messages.
> SQL Server Books Online:
> http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx --
>
|||Hi Kat
As others have said, there is no server-wide switch.
There are some things you can do in different environments. For the purpose
of concatenation, you can treat NULLs as empty strings with
SET CONCAT_NULL_YIELDS_NULL OFF
However, that is a session setting, and will not affect anything other than
the current connection.
If you have a variable or parameter, and you want to treat NULL as if it is
an empty string, you can use the ISNULL function in your queries. But that
is valid just for a single expression
HTH
Kalen Delaney, SQL Server MVP
http://sqlblog.com
"Kat" <galangkk@.sverdrup.com> wrote in message
news:1160335879.054188.203150@.i3g2000cwc.googlegro ups.com...
> Without getting into a theoretical discussion about whether it is the
> right thing to do, is there a switch or flag for SQL Server 2005 to
> make NULL strings be the same as empty string?
> Thanks,
> K Galanga
>
NULL vs. empty strings, SQL Server setting
right thing to do, is there a switch or flag for SQL Server 2005 to
make NULL strings be the same as empty string?
Thanks,
K GalangaNo such switch...
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Kat" <galangkk@.sverdrup.com> wrote in message
news:1160335879.054188.203150@.i3g2000cwc.googlegroups.com...
> Without getting into a theoretical discussion about whether it is the
> right thing to do, is there a switch or flag for SQL Server 2005 to
> make NULL strings be the same as empty string?
> Thanks,
> K Galanga
>|||Kat wrote:
> Without getting into a theoretical discussion about whether it is the
> right thing to do, is there a switch or flag for SQL Server 2005 to
> make NULL strings be the same as empty string?
> Thanks,
> K Galanga
Depending on what your intention is, maybe you could make a column NOT
NULL and add a default:
ALTER TABLE tbl ADD CONSTRAINT df_tbl_col DEFAULT ('') FOR col;
--
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--|||Hi Kat
As others have said, there is no server-wide switch.
There are some things you can do in different environments. For the purpose
of concatenation, you can treat NULLs as empty strings with
SET CONCAT_NULL_YIELDS_NULL OFF
However, that is a session setting, and will not affect anything other than
the current connection.
If you have a variable or parameter, and you want to treat NULL as if it is
an empty string, you can use the ISNULL function in your queries. But that
is valid just for a single expression
--
HTH
Kalen Delaney, SQL Server MVP
http://sqlblog.com
"Kat" <galangkk@.sverdrup.com> wrote in message
news:1160335879.054188.203150@.i3g2000cwc.googlegroups.com...
> Without getting into a theoretical discussion about whether it is the
> right thing to do, is there a switch or flag for SQL Server 2005 to
> make NULL strings be the same as empty string?
> Thanks,
> K Galanga
>
NULL vs. empty strings, SQL Server setting
right thing to do, is there a switch or flag for SQL Server 2005 to
make NULL strings be the same as empty string?
Thanks,
K GalangaNo such switch...
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Kat" <galangkk@.sverdrup.com> wrote in message
news:1160335879.054188.203150@.i3g2000cwc.googlegroups.com...
> Without getting into a theoretical discussion about whether it is the
> right thing to do, is there a switch or flag for SQL Server 2005 to
> make NULL strings be the same as empty string?
> Thanks,
> K Galanga
>|||Kat wrote:
> Without getting into a theoretical discussion about whether it is the
> right thing to do, is there a switch or flag for SQL Server 2005 to
> make NULL strings be the same as empty string?
> Thanks,
> K Galanga
Depending on what your intention is, maybe you could make a column NOT
NULL and add a default:
ALTER TABLE tbl ADD CONSTRAINT df_tbl_col DEFAULT ('') FOR col;
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--|||Hello David,
What do you mean by "the same", you can get a NULL to act as a '' in concate
nation
,however comparisions i.e. NULL = '' will always be inconclusive.
set concat_null_yields_null off
is what you want to achieve the former
Simon Sabin
SQL Server MVP
http://sqlblogcasts.com/blogs/simons
> Kat wrote:
>
> Depending on what your intention is, maybe you could make a column NOT
> NULL and add a default:
> ALTER TABLE tbl ADD CONSTRAINT df_tbl_col DEFAULT ('') FOR col;
> --
> David Portas, SQL Server MVP
> Whenever possible please post enough code to reproduce your problem.
> Including CREATE TABLE and INSERT statements usually helps.
> State what version of SQL Server you are using and specify the content
> of any error messages.
> SQL Server Books Online:
> http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx --
>|||Hi Kat
As others have said, there is no server-wide switch.
There are some things you can do in different environments. For the purpose
of concatenation, you can treat NULLs as empty strings with
SET CONCAT_NULL_YIELDS_NULL OFF
However, that is a session setting, and will not affect anything other than
the current connection.
If you have a variable or parameter, and you want to treat NULL as if it is
an empty string, you can use the ISNULL function in your queries. But that
is valid just for a single expression
HTH
Kalen Delaney, SQL Server MVP
http://sqlblog.com
"Kat" <galangkk@.sverdrup.com> wrote in message
news:1160335879.054188.203150@.i3g2000cwc.googlegroups.com...
> Without getting into a theoretical discussion about whether it is the
> right thing to do, is there a switch or flag for SQL Server 2005 to
> make NULL strings be the same as empty string?
> Thanks,
> K Galanga
>
Monday, February 20, 2012
Null Hidden Parameter
In my report I have a dataset that is returning an ID field among other things. I am setting a hidden parameter = to that ID field. That parameter is then used to return another dataset.
My problem is that the original dataset with the ID field does not always bring back data (this is expected). If data is not brought back, I get an error when I try to execute the report ("The 'X' parameter is missing a value").
I have the parameter set to "Allow Null Values".
This value is not required in the SQL Server stored procedure that returns values for the new dataset.
The parameter is of type Integer. (So I am not able to set the "Allow Blank Value" property)
This is NOT a multi-value parameter.
Does anyone have any suggestions/ideas/workarounds to solve my problem?
Could you add a UNION to your first dataset to also return a record full of NULL values?Would this mess with the rest of your report?
Something like:
SELECT
Id, Description
FROM X
UNION
SELECT
Null, Null
That way your dataset will always return a value even if there is no data in table X.
|||
That may work, the other option with SQL would be for me to use IF EXISTS
IF EXISTS (select ID, Desc) THEN
select ID, Desc
ELSE
Select null, null
I am more interested in why reporting services gives me that error when I am allowing null values. I suspect it has something to do with trying to assign the parameter value from an empty dataset.