Forum Replies Created

Viewing 15 posts - 31 through 45 (of 178 total)

  • RE: LEN Command

    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...

  • RE: LEN Command

    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

  • RE: Loop Through every table in a DB

    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...

  • RE: Exception Handling in Stored Procedure SQL Server 2000

    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...

  • RE: Exception Handling in Stored Procedure SQL Server 2000

    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...

  • RE: Exception Handling in Stored Procedure SQL Server 2000

    You might try looking up the error code in sysmessages and if it's there, use the description column to capture the message.

    Toni

  • RE: Help with a lookup query

    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...

  • RE: Help with a lookup query

    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....

  • RE: Help with a lookup query

    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...

  • RE: Help with a lookup query

    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...

  • RE: How to log the users login and logout datetime in a table in sql server 2000

    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...

  • RE: Increment a string

    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...

  • RE: Increment a string

    How do you plan on handling when you need to increment 'ZZ'?

    Toni

  • RE: Space used by table

    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)....

  • RE: Tips for New DBAs

    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

Viewing 15 posts - 31 through 45 (of 178 total)