Forum Replies Created

Viewing 15 posts - 1,111 through 1,125 (of 1,554 total)

  • RE: How to detect changes in the data using T-SQL

    pmfji, but there are a few things I'm not quite clear about..

    What is the end purpose of all this? It seems to me much like reinventing the wheel, by triggers...

  • RE: Can anyone spot the mistake????

    Not necessarily. This behaviour is controlled by SET CONCAT_NULL_YIELDS_NULL ON|OFF

    Depending on if this setting is on or off,

    string + null may be:

    string

    or

    null

    /Kenneth

  • RE: Writing to a text file using t-sql

    In this case, the sp_OAxxx procs are overkill.

    imo, they are to be avoided if possible. There are way too many issues with sp_OAxxx procs for me to consider them as...

  • RE: Parsing Data

    Parsename works just fine for this (and actually would be perfect for the title-part, since that may make it a four-part name)

    ...and yeah,...

  • RE: Parsing Data

    Just for diversity, here's one way to do it the Transact SQL way (ie setbased)

    ..assumptions: three columns output - first, middle and last...

  • RE: Trigger Question

    If you have the same phonenumber several times, only with different dates, and you want to find then 'newest', then...

    select  phonenum, MAX(date) as maxDate

    from myTable

    group by phonenum

    ...will find the...

  • RE: Trigger Question

    Is it necessary to have this reflected in real time? If it is, perhaps replication would be more suitable. If real-time isn't required, a batch solution, run at some convenient...

  • RE: Query for displaying second highest value from a table.

    ..it's not the first, I assure you

    The thing with cursors is just that they shouldn't be anyones first choice - they do however...

  • RE: REPLACE() within a TEXT column gives error

    If the URL to be updated is guranteed to be found within the first 8000 chars, this will work. If the text column may be larger, you might need to...

  • RE: Four-part names

    Must confess I don't use openquery that much, but from what it looks like, openquery doesn't support four part naming..?

    -- snip BOL --

    Syntax

    OPENQUERY ( linked_server , 'query' )

    Arguments

    linked_server

    Is...

  • RE: How Do I insert into a table on linked server?

    There are a few different ways and techniques to have two servers exchange data. Which one is 'best' largely depends on the particular requirements.

    You may want to read some in...

  • RE: Limiting records joined with a JOIN

    Perhaps a small example of the two tables, a few rows data and the desired output, illustrating the problem would clear things up then.

  • RE: Limiting records joined with a JOIN

    Why not just do it plain and simple?

    SELECT TOP 1 b.column1, b.column2, ....

    FROM  tableA a

    JOIN  tableB b

    ON    a.PK = b.PK

    /Kenneth

     

  • RE: Error while renaming Database.

    You probably have one or more users in the database.

    Make sure that noone is using the database, then try again.

    sp_who2 is an easy way to see in which db's users...

  • RE: Query for displaying second highest value from a table.

    This is one way to do it:

    use northwind

    select top 1

           x.employeeId

    from  (

            select  top 2

                    employeeId

              from  employees

              order by employeeId desc

          ) x

    order by x.employeeId...

Viewing 15 posts - 1,111 through 1,125 (of 1,554 total)