Forum Replies Created

Viewing 15 posts - 1 through 15 (of 192 total)

  • RE: Automated Trigger To Require a WHERE Clause

    Rob Fisk (1/30/2011)


    So for an update statement I may write this initially

    SELECT m.*

    --UPDATE m SET monkey = 'marmosette'

    FROM monkeys m

    WHERE MonkyID=2

    Just make sure you write it like that. I have...

  • RE: Automated Trigger To Require a WHERE Clause

    Slawek Guzek (1/29/2011)


    Dear Jinlye, you are wrong, I'm afraid...

    That's my humble opinion.

    There is nothing humble about your opinion.

    If you read his post, you will see he is correct and...

  • RE: Automated Trigger To Require a WHERE Clause

    Gene Porter (1/25/2011)


    If there's no start transaction specified won't the code fail on the rollback?

    Every INSERT/UPDATE/DELETE statement is it's own implicit transaction. If, for example, that transaction fails 90% through,...

  • RE: Automated Trigger To Require a WHERE Clause

    I'm not in front of a server to test thins, but I wonder how this would perform an a large table. It seems to me the delete or update will...

  • RE: SQL Server Failover solutions

    doobya (7/17/2010)


    My 2 cents

    I never yet saw an automatic failover solution that made a good determination when to failover

    I prefer for a fast manual failover

    All servers are configured to perform...

  • RE: SQL Server Failover solutions

    If the Access front end is an ADP, then you're probably using the native SQL and could expand on the connection string.

    If you're using an MDB and are thinking...

  • RE: SQL Server Failover solutions

    Your connection string would look something like this:

    Data Source=myServerAddress;Failover Partner=myMirrorServerAddress;Initial Catalog=myDataBase;Integrated Security=True;

    The application will connect to whichever one is available, if the primary fails, the application connections will automatically switch...

  • RE: SQL Server Failover solutions

    Rudy Panigas (7/15/2010)


    I looked at database mirroring.

    Here is what I found:

    1) With mirroring, failing over (either way) requires work to be done at the application/workstation to point application to...

  • RE: Horizontal to vertical

    Two options come to mind:

    1. Use the UNPIVOT command (http://msdn.microsoft.com/en-us/library/ms177410.aspx)

    2. Assuming four columns:

    SELECT CASE NUM

    WHEN 1 THEN Col1

    WHEN 2 THEN Col2

    WHEN 3 THEN Col3

    WHEN 4...

  • RE: SQL Server Failover solutions

    I would add that mirroring is pretty good (and fairly easy to set up) with automatic failover.

  • RE: SQL Server Failover solutions

    calvo (7/2/2010)


    Mirroring is an option. But you need to decide what you are trying to protect against.

    If you're worried about OS failure, either will work.

    If you're concerned with disk...

  • RE: How can I use union and for xml in one sql statement?

    I thought that might be where you were going with this. You may find this a more straightforward technique

    DECLARE @Users VARCHAR(MAX)

    select @Users = COALESCE(@Users + ', ') + fullname

    FROM (

    SELECT...

  • RE: How can I use union and for xml in one sql statement?

    You will need to union your two sets inside of a subquery and apply the FOR XML outside the subquery. That will get you your desired result, but what exactly...

  • RE: How to imbed an image into an email sent by dbmail

    Keep in mind that most email clients do not automatically load images in emails for privacy reasons. I expect that isn't the issue, but I wanted to mention it.

    The problem...

  • RE: Error 156 in Stored Procedure

    I'm not sure what an error 156 is, but you've got at least three syntax errors:

    In TSQL, the syntax for IF...ELSE is:

    IF expression

    BEGIN

    ...

    END

    ELSE

    BEGIN

    ...

    END

    There is no then (also...

Viewing 15 posts - 1 through 15 (of 192 total)