Forum Replies Created

Viewing 15 posts - 121 through 135 (of 138 total)

  • RE: User Define Function error

    quote:


    Might be a good idea to handle leap years here ..


    It's not obvious to me...

  • RE: User Define Function error

    Note that the current month only has one digit in it.

    When I run:

    print cast(2003 as char(4)) + '/' + cast(5 as char(2)) + '/' + cast(16 as char(2))

    I get as...

  • RE: the complete of reserved words Q

    With another quick glance through, the only ones that jump out are:

    TRAN for TRANSACTION

    EXEC for EXECUTE

    PROC for PROCEDURE

    RD Francis

  • RE: the complete of reserved words Q

    I you look up "reserved" in SQL Books Online, all keywords are listed, and abbreviations are included. For instance, you can find both TRAN and TRANSACTION.

    Also, the description/syntax page...

  • RE: update of linked server table

    Oh, and

    SET XACT_ABORT OFF

    after you rollback/commit.

    Note: this tells SQL Server to rollback everything if any enclosed transaction fails. I think I have noticed stored procedures running as implicit...

  • RE: update of linked server table

    Try doing:

    SET XACT_ABORT ON

    before BEGIN TRANSACTION in your master procedure (the one that calls the other two). This may help.

    RD Francis

  • RE: set ansi_nulls true for database connection

    I think I had to do something like that earlier today, just for a SQL Server to SQL Server connection, not to Oracle. I added the following:

    SET ANSI_NULLS ON

    GO

    SET ANSI_WARNINGS...

  • RE: Must declare the variable ...

    Try:

    set @sql ='INSERT INTO ##all_logins SELECT name, ''' + @server_name +''' FROM ' + @sys_table + ' WHERE CONTAINS(name,''' + @user_name + ''')'

  • RE: Auto Close and Auto Shrink - Just Don't

    Having read the advice regarding auto_shrink, I checked our database and found that several did indeed have that option on.

    Rather than simply turning it off (we have gobs of space...

  • RE: Renaming columns, stored procs, triggers

    Depending on how many offending columns there are:

    I would be inclined to do this:

    1) Generate SQL for the entire database. Only grab stored procs, triggers, etc; the things...

  • RE: Data converted to Excel file

    Is there a reason you need to do this w/ T-SQL?

    There are two other easy ways to do this:

    If this is something that needs to be done rarely, and if...

  • RE: Computer lazy after error on programming with SQL

    First, I'd look at Task Manager to see what process (if any) is hogging your memory/processor time.

    I assume that IIS is running on the machine in question, and SQL Server...

  • RE: Use Results from a Cross Join for dynamic SQL

    OK, here's my idea. I am still using a cursor to define the product combos. However, once defined, the combo list only needs to be changed if products...

  • RE: HELP! Query not properly displaying data

    I think the problem is here:

    WHERE (b.CARD_NAME = 'FUELMAN' AND ...

    For all of the rows of a that don't have a matching b row, b.CARD_NAME is NULL. So, you...

  • RE: rename a column name

    [Ignore me: too much time on out-of-date servers]

    I think we'll need a better description of what you want to do.

    If you want to change the name of a column...

Viewing 15 posts - 121 through 135 (of 138 total)