Forum Replies Created

Viewing 15 posts - 421 through 435 (of 596 total)

  • RE: Extracting correct week from getdate()

    OLM,

    No, Dec 26-Dec 31 are not week 1. Those are actually week 53 of the year 2004, according to SQL Server.  A SQL Server week number is based on a...

  • RE: extracting text between character 2046 and 4092

    I'm not clear as to what you want to do. I assume you've got data in a table called dbo.ovriga, and you want to look at all the text data.

    First of...

  • RE: SQL login issues

    Was the problem database created on the server, or was it attached after being created elsewhere? Maybe there is a SID mismatched between the sysusers table in the problem database...

  • RE: ''''Chopping'''' up a ntext field

    As I mentioned earlier, you can modify the fGetTokenN function to return NULL instead of the empty string for addresses that are less than 4 lines. Note the bold text near...

  • RE: ''''Chopping'''' up a ntext field

    Hmm..it deletes all the Char(13)'s in my tests. Does it do this for all rows, or just some? 

    Change the last SELECT statement in the example to read:

    SELECT *

     ...

  • RE: ''''Chopping'''' up a ntext field

    James,

    The update method has a problem with single line addresses. Nulls aren't a problem in my testing. However, the UDF method is cleaner looking, and works for all situations. I...

  • RE: Extracting correct week from getdate()

    Look at a calendar for January. The weeks are numbered based on the rows that appear there. Week 1 is Jan 1 only. Week 2 is Jan 2 thru Jan...

  • RE: ''''Chopping'''' up a ntext field

    James,

    Lots of ways to do this in T-SQL. Two quick-and-dirty ways:

    METHOD 1:

    DROP TABLE textaddr

    DROP TABLE addresses

    GO

    CREATE TABLE textaddr

    (

      id int PRIMARY KEY IDENTITY(1,1),

      addr ntext null

    )

    CREATE TABLE addresses...

  • RE: calling xp_cmdshell with an unregistered exe

    Cody,

    My setup is almost identical to yours, and I get no results either. Just one row with the value NULL. (I think blank lines get returned as NULL when using...

  • RE: calling xp_cmdshell with an unregistered exe

    It has to do with the way SETSPN.EXE writes output. Note that even from the command line, you cannot redirect the output to a file. For example, run

    C> SETSPN -L computername >output.txt

    Then,...

  • RE: Find all Databases on my servers

    Did you get it to work? I would try following Remi's advice by doing something like this:

    FETCH NEXT FROM servername_cursor INTO @servername

    WHILE (@@FETCH_STATUS <> -1)

    BEGIN

      IF (@@FETCH_STATUS <> -2)

      BEGIN  

       ...

  • RE: Script to list any user objects??

    Do you mean all user-created objects including dbo, or just all of the non-dbo objects? If you only want non-dbo objects, you could take Frank's idea and do start with...

  • RE: Newletter(s)

    Well, I read the newsletter everyday, and prefer to receive it daily. I think it helps make the forums more responsive.

    Also, you can go to [Resources] [Newsletter Archive] to view...

  • RE: How many platforms Do You Run at Home

    1 XP Home Desktop

    1 XP Prof Laptop

    1 XP Prof Desktop (test environments within Virtual PC 2004)

    1 Windows 2003 Server including SQL Server 2000

    1 Windows 98SE desktop with Internet connection for...

  • RE: Inserting records and appending additonal items to the new record

    Another quick and dirty approach that uses a temporary table instead of a cursor:

    --DROP TABLE letters

    GO

    CREATE TABLE letters

    (

      ref int,

      note varchar(1000)

    )

    SET NOCOUNT ON

    INSERT letters (ref,...

Viewing 15 posts - 421 through 435 (of 596 total)