Forum Replies Created

Viewing 15 posts - 751 through 765 (of 1,156 total)

  • RE: xp_delete_file issues

    check your date format. I you run the code

    select

    CAST(DATEADD(hh, -3, GETDATE()) AS VARCHAR)

    you get

    Jan 30 2008 9:42AM

    When you manually run it above you are using a different...

  • RE: Finding a Current Date

    Cool. Thanks for the feedback. 🙂

  • RE: Tracking current user and current datetime on update.

    I think you are going to have to use triggers for this one. You can get the current user by using SYSTEM_USER and the date/time using GETDATE(). The...

  • RE: xp_delete_file issues

    Your script ran perfectly fine for me. Is the BAK file in the target directory authentic or did you just rename a text file or something?

    I have run into...

  • RE: Query Help

    NP. Thanks for the feedback.

  • RE: Query Help

    Another method:

    SELECT a.NameId,

    MIN(a.Join_Date) AS [Join_Date],

    MIN(b.payment_date) AS [Payment_Date]

    FROM Name a

    INNER JOIN subscriptions b ON a.NameID = b.bt_id

    GROUP BY a.NameId

    HAVING MIN(a.Join_Date) <> MIN(b.payment_date)

  • RE: Query Help

    Something like this?

    SELECT *

    FROM Name a

    INNER JOIN subscriptions b ON a.NameID = b.bt_id AND a.Join_Date <>

    (SELECT MIN(c.payment_date) FROM subscriptions c WHERE c.bt_id = a.NameId)

  • RE: Audit listing of Select Statements

    You could enable C2 auditing. C2 auditing can be detrimental to performance and is not always 100% accurate, but it provides a very robust method for tracking access to...

  • RE: Query Help

    You can use "EXCEPT" do return all rows that exist in Name that do not exist in subscription. Using the following query will return all the Names and Join...

  • RE: Finding a Current Date

    If you want the case to work then you are going to have to derive what the current period is. You can do this by using the same logic...

  • RE: Excel Report

    Since you only want to group by date it may be best to elimate time from the grouping all together. You can convert the date/time to a string, in...

  • RE: Please help

    select Roleid from Roles where Inboxenabled ='y' will return me Admin and Dev roles

    How will this only return Admin and Dev, if networking is 'y' in your test data? ...

  • RE: Excel Report

    Thanks for the Reply. there is still a problem with displaying the Dates and doesnt total them up.

    if the SAlesman have two or more invoices on the same day than...

  • RE: Finding a Current Date

    Your @Period Date will always return in the current period, is this the way you want it, or are you testing the TSQL?

    I response to your question, you didnt speak...

  • RE: Last Field updated

    As a side note, you can join the inserted and deleted tables on your key to get all the values need in a single query.

Viewing 15 posts - 751 through 765 (of 1,156 total)