Viewing 15 posts - 31 through 45 (of 178 total)
True. If it was just a CHAR field DATALENGTH would give the declared size and LEN would give the size up to any trailing blanks.
Though if it is meaningful...
January 22, 2009 at 8:20 am
You can use DataLength to get the "real" size including trailing blanks.
Declare @strings varchar(30)
set @strings = 'ABC '
select Len(@strings) length, DataLength(@strings) datalength
Toni
January 22, 2009 at 7:06 am
The ms_foreach.. proc is an unofficial method and can be removed at the will of Bill et al. There are also cursors in the ms_foreach... procs, though...
January 21, 2009 at 12:19 pm
Since it looks like you have the authority to issue xp_startmail, I am going to assume you can also use xp_cmdshell and osql. In that case, here is...
January 19, 2009 at 7:24 pm
Or... you could trace the error event to a table using SQL Profiler then inquire against the table to extract the message? (In 2005 there are actual system...
January 18, 2009 at 8:27 am
You might try looking up the error code in sysmessages and if it's there, use the description column to capture the message.
Toni
January 17, 2009 at 9:07 am
Ok... now for it all in one select (had a bit more time to work it). I was able to remove one of the intermediate holding tables and some...
January 16, 2009 at 12:12 pm
Andy... one more thing. If you set up your test data and tables similar to what I did, you will get an answer much quicker and more completely....
January 16, 2009 at 10:20 am
Now there may be a way to do this in a single query but I did not spend the time investigating it. (Let me know if you get it...
January 16, 2009 at 10:14 am
Andy, one of your problems seems to be that you have not normalized your tables. The tblsd... one has separate columns for each question. You should...
January 16, 2009 at 7:30 am
Um... aren't logins on a server level with access permissions beyond that to a database and then to a table within the database? You are allowed to...
January 13, 2009 at 7:21 am
Hi Dennis. Interesting way to carry the digits. I had done another one that had a fixed length for the string to be increment (e.g. 2...
December 6, 2008 at 8:51 am
How do you plan on handling when you need to increment 'ZZ'?
Toni
December 3, 2008 at 7:53 am
If you are still running some SQL 2K databases, then the following will get you the space usage results from the system tables (no need for cursors or temp tables)....
November 19, 2008 at 9:52 am
Thank you so much! As a working-at-becoming DBA, I find items like this which as you say are not in the typical documentation immensely useful.
Toni
November 18, 2008 at 7:02 am
Viewing 15 posts - 31 through 45 (of 178 total)