Forum Replies Created

Viewing 15 posts - 1,516 through 1,530 (of 1,553 total)

  • RE: DateTime to Character

    That is correct.

    Those two years are the limits of the T-SQL datetime datatype.

    See BOL for further details on this.

    =;o)

    /Kenneth

  • RE: Date Format 101 question

    Don't forget that BOL (Books On Line) is your best friend!

    No shame in looking things up. =;o)

    Search for CONVERT to see all available styles 'out of the box' and which...

  • RE: DateTime to Character

    Well, there are many ways to skin this cat.

    However, all have their caveats.

    First, you can either convert the datetime to a char/varchar or the chardate + chartime to datetime

    and join...

  • RE: Truncate remote table using link server

    The answer is all there, in the message.

    snip from BOL...

    Syntax

    TRUNCATE TABLE name

    As you can see the syntax does not support four-part naming.

    This also leads to the conclusion that you must...

  • RE: stop time automatically

    That sounds like a good idea..

    Also, I'm wondering - is it impossible for anyone to do over-time?

    (I have no idea what job is...

  • RE: Next Number

    Just to add my .02 to this...

    I feel this is kind of backwards, and not very pretty, handling different parts of the transaction in the client layer (VB)

    What you really...

  • RE: Update and Insert Statement as a Single Statement.

    Oh, just another thing about explicit transactions...

    Do NOTinitiate this kind of code from the client!

    Everything from and including 'BEGIN TRAN' up to 'COMMIT' should be inside a stored proc on...

  • RE: Update and Insert Statement as a Single Statement.

    Yes, you must use an explicit transaction for this.

    BEGIN TRAN

    UPDATE myTab set col1 = .... etc..

    -- check for errors

    if (@err 0) goto errhandler

    -- now do the insert

    INSERT otherTab ....

    --...

  • RE: Get Command Line within Stored Procedure

    ..or use triggers..

    If the requirement is to do 100% audit - no exceptions - by far the easiest and most reliable way to do this is by triggers.

    Profiler is very...

  • RE: Get Command Line within Stored Procedure

    I was more thinking along the lines of imports of data from external sources that may also change the data in some way.

    If that demand pops up, you'll have to...

  • RE: Get Command Line within Stored Procedure

    Just note that this will only cover changes made through the actual proc that has this code in it.

    If it's possible to change data in any other way, and you...

  • RE: Get Command Line within Stored Procedure

    Why not just use Profiler..?

    No need then to mess with each object.

    Thinking about it, I'm not so sure that auditing by implementing the audit in each object to be audited...

  • RE: Switch Case statement in t-sql

    Just a few notes on CASE to avoid confusion..

    Note that T-SQL CASE is not a Switch statement, it is an Expression that only does one of three things.

    It resolves...

  • RE: looking to Convert This PROCEDURE TO Dynamic SQL

    The simplest solution to this is to not have different names on the prod and test databases.

    If you're stuck with both db's on the same server/instance (for whatever reason), do...

  • RE: email validation

    Not that I'm aware of - (that doesn't mean there isn't a way however)

    Thing is I ditched SQL Mail long time ago and...

Viewing 15 posts - 1,516 through 1,530 (of 1,553 total)