Forum Replies Created

Viewing 15 posts - 2,641 through 2,655 (of 3,233 total)

  • RE: Problems with ldf file

    Read up in BOL on 'Truncating the Transaction Log'.  Also, if you need to physically shrink the ldf file to recover space, read up on dbcc shrinkfile. 

  • RE: msg 4104

    Well, for starters, your UPDATE statement states that you are updating table option, but the SET clause is assigning a value in the providence table.  Which table and value are...

  • RE: INSERT Question (best way to do this)

    You want to insert into TableTwo the values that exist in TableOne, but not yet in TableTwo?  If so, you need an OUTER JOIN like this:

    declare @TableOne table (AcctNo char(1))

    declare...

  • RE: Intersection of two date ranges.

    Great solution Sreejith.  I was just going to post a very similar example using a dates table.  The main difference would be the ANSI join syntax in my version.  My...

  • RE: Convert month number to month names

    Substitute your table name for the @MonthColumns table variable and your column name for MonthNumber.  For example:

    DECLARE @date datetime

    SET @Date = '01/01/01'

    SELECT DATENAME(mm,DATEADD(mm,(<YOUR COLUMN> - 1),@date))

    FROM <YOUR TABLE>

  • RE: Convert month number to month names

     "If you want to use it against the column in the table try this:select DATENAME(mm,ColumnName)"

    This will not work as the original post says that the column only holds the month number...

  • RE: Convert month number to month names

    Add the month number to an arbitrary date and use the DATENAME function.

     

    DECLARE @date datetime

    DECLARE @MonthColumns table (MonthNumber int)

    insert into @MonthColumns

    select 1 union all

    select 2 union all

    select 3 union all

    select...

  • RE: Target Server Memory

    Target Server Memory is the amount of memory available for SQL Server to use.  In the example you show, the Target Server Memory counter should show 1.7 GB (or...

  • RE: Compare values to a mask on table

    "Happy for you, guys, but that solution is wrong."

    Did you test it?  While BOL suggests using the underscore for single character representation, the posted solution still works with % due...

  • RE: Compare values to a mask on table

    Here's an example of something you can work with.  It will return the correct results based off of your example, but you should pay close attention to the execution plan. ...

  • RE: Trouble with triggers

    You say that the wrong ID value is being returned to your app.  Triggers do not return values so how are you returning the ID to your app?  It may...

  • RE: "Bent corner" advertizements

    SQLBill,

    Just for the record, the comments in my post were geared towards another poster's comments that was complaining about advertisements in general.  Your posts contain good constructive feedback that...

  • RE: Query Assistance

    declare @TD_TASK_STEP table (

        in_StepID int,

        in_TaskID int

        )

    insert into @TD_TASK_STEP

    select 2589, 1462 union all

    select 2592, 1466 union all

    select 2680, 1546 union all

    select 2790, 1550 union all

    select 2896, 1462 union...

  • RE: SQL Join Question

    declare @TableA table (

        aid int,

        aname varchar(20),

        acomments varchar(100)

        )

    declare @TableB table (

        bid int,

        aid int,

        acomments varchar(100)

        )

    insert into @tablea

    select 1, 'onea', 'onecomments' union all

    select 2, 'twoa',...

  • RE: Variable quest

    Can you post your script?  Are you just trying to limit the number of rows you update at one time?

Viewing 15 posts - 2,641 through 2,655 (of 3,233 total)