Forum Replies Created

Viewing 15 posts - 2,491 through 2,505 (of 2,894 total)

  • RE: Help with using mulitple replace in a function

    Jeff Moden (7/20/2010)


    ...

    it would be interesting to have a simple race between the built in REPLACE (T-SQL) and a CLR.

    In a simple race single T-SQL REPLACE outperforms CLR simple byte-by-byte...

  • RE: How to count week number?

    Vaghasiya Nilesh (7/22/2010)


    ...

    and im enter Fromdate - 1/12/2010 and Todate - 21/7/2010 that giving me output will be current week number

    ...

    Your question is not very clear.

    To get number of weeks...

  • RE: TSQL

    Jeff Moden (7/21/2010)


    ...

    Don't you have a column in the table that contatins the date and time that a row was inserted?

    It wouldn't help to track DELETE's...

  • RE: LastUpdate Date/time stamp

    Joe Celko (7/21/2010)


    Get a third party audit tool. If the law catches you keeping audit data in the same table, you can go to jail.

    ...

    .

    Compare prices on amazon :-D...

  • RE: I need to pull one recod per load_id I need the min(A.TMS_EXT_REF_ID ) city,state but

    Without having table defenitions it's not easy to understand what you really want here. DDL with some sample data would help a lot, therefore click the link in my signature...

  • RE: Add dash to data

    You can also learn about another two string T-SQL functions:

    SELECT LEFT(ACCOUNTNUMBER, 3) + '-' + SUBSTRING(ACCOUNTNUMBER, 4,5) + '-' + RIGHT(ACCOUNTNUMBER,2)

    FROM BILLING.ACCOUNT

    However, it looks like you are going to...

  • RE: Select into with a loop

    Ok I assume that your source table has no "anchor" column which can be used to count your inserting progress...

    So, here an example.

    Lets crerate such a table, you will see...

  • RE: Help with bulk random code insert

    You are welcome!

  • RE: “Distinct” column in SQL query results

    Have you tried to use the column from the DataSet used for report to populate the Paramaeter ListBox? Does it works at all?

    I suggets you creating separate DataSet as SELEct...

  • RE: TSQL

    If you perform real DELETE on this table and you count it as activity you will need to do the following:

    1. Create a trigger to log action and its timeinto...

  • RE: TSQL

    To read about SQL Server Agent:

    http://technet.microsoft.com/en-us/library/ms189237.aspx

    As I said before, you will, most likely, need a trigger to log the action. Indeed, UPDATE and INSERT could be tracked just by having...

  • RE: looking for function help

    1. As long as your naming is consistent, use of udf_ prefix is fine, as it helps to identify UDF just from its name. Until you have insomnia, I would...

  • RE: Need help to produce SQL

    That will do what you asked for, but I have doupts that it is what you really want...

    select *

    from @t1 where maintdte != (select MAX(maintdte) from @t1)

  • RE: Best Practice to Track Changes/New Records

    You will need to use change detection triggers or your queries will be quite complex.

    Please follow the link in my signature to see how the case/question should be presented for...

  • RE: Vertical Tables Merge

    What determines "Position" of the row in your tables?

Viewing 15 posts - 2,491 through 2,505 (of 2,894 total)