Forum Replies Created

Viewing 15 posts - 3,121 through 3,135 (of 6,036 total)

  • RE: IF (COLUMNS_UPDATED()) ???

    mtassin, you forgot to take care about NULLs.

    Also, your script gonna miss the case when user decides to add a space to a string.

  • RE: IF (COLUMNS_UPDATED()) ???

    Many .NET apps will write values to several fields even if the values have not changed. Am I wrong about that?

    No, you're absolutely right.

    Programming skills of most of developers nowadays...

  • RE: Select Statement Issue?

    Why can't you use ntext?

  • RE: IF (COLUMNS_UPDATED()) ???

    Jeff Moden (3/31/2008)


    SQL ORACLE (3/31/2008)


    We can use BIT MASK concept to implement this task.

    Sure could... now, pretend it's 5PM on a Friday and you have a really hot gig at...

  • RE: Get Scope_Identity after error check

    Yes.

    But you can exclude any doubts by doing this in one go:

    SELECT @myERROR = @@ERROR,

    @myRowCount = @@ROWCOUNT,

    @OrderId = SCOPE_IDENTITY()

    IF @myERROR != 0...

  • RE: SET XACT_ABORT, etc.

    Topic "SET (described)" in BOL has the answer on your question and a lot of other useful information.

  • RE: Comparing Strings......

    Ahmad Osama (3/31/2008)

    this will be a good logic to implement on a smaal list or one shud maintain a table right from the start.

    That's actually the logic you may find...

  • RE: Setting multiple values

    1st you need to assign the variable value correctly.

    Try this:

    use northwind

    declare @ProductList varchar (50)

    set @ProductList = ('Chai','NuNuCa Nuß-Nougat-Creme','Geitost','Wimmers gute Semmelknödel','Original Frankfurter grüne Soße')

    --unchanged so far

    select @ProductList

  • RE: copy "entire" nText column from TableB to TableA

    update tableb set ntextb=ntexta

    from tablea

    where nida = 55

    and nidb = 222

  • RE: IF (COLUMNS_UPDATED()) ???

    And if you put the list of your columns into specially designed table:

    CREATE TABLE dbo.TriggerUpdatedColumns (

    TriggerName sysname,

    ColNo smallint

    )

    You can use simple script :

    IF EXISTS (

    SELECT 1 FROM dbo.TriggerUpdatedColumns

    WHERE TriggerName =...

  • RE: IF (COLUMNS_UPDATED()) ???

    Alex, int value returned by POWER function holds 4 bytes, 32 bits.

    It's more than enough for your 14 columns.

    There is no need for any SUBSTRING.

    Your problem is the way you...

  • RE: Looking for SQLAgent notification when a table is NOT updated with today' date.

    SQL ORACLE (3/19/2008)


    It will be easy if your table has a column with timestamp data type. Here is an example.

    DECLARE @Date DATETIME

    SELECT @Date = MAX(DateUpdated) FROM myTable

    IF @Date > DATEADD(d,...

  • RE: Syntax error converting datetime from character string.?

    rbarryyoung (3/19/2008)


    Huh. Good point Gogula (great name, my compliments to your parents).

    I wonder how Jeff got himself responding to somebody with a nickname like YOURS.

    😀

    Look at his...

  • RE: WHERE CASE

    I would suggest relational database approach.

    Something like this:

    [Code]

    SELECT *

    FROM tblData D

    WHERE EXISTS (select 1 from dbo.Calendar C

    where C.Month = D.MonthID

    AND C.[Quarter] = @Quarter

    )

    [/Code]

  • RE: Removing All Image Data

    Create a new table table_Copy

    Copy all data from table to table_Copy except image.

    Drop table, rename table_Copy to table.

    If you've got some FK or other constraints don't forget to drop and...

Viewing 15 posts - 3,121 through 3,135 (of 6,036 total)