Forum Replies Created

Viewing 15 posts - 1,081 through 1,095 (of 3,482 total)

  • RE: Is sp_send_dbmail Asynchronous?

    Okay, thanks!  (Finally got the e-mail from my database!... where do they go when they get lost between my computer and gmail?) So I know the code works...
    Guess...

  • RE: Is sp_send_dbmail Asynchronous?

    I'll have a read. From a quick scan, I'd basically have to use a unique subject and search for that and the recipient's e-mail in the table, and if not...

  • RE: Combining Two Queries into Single Query

    like this?
    CREATE TABLE [dbo].[ProductCodes](
        [F_Product] [char](1) NOT NULL,
        [F_TextCode] [char](7) NOT NULL,
        [F_Phrase] [varchar](5) NOT NULL
    );
    GO

    INSERT INTO ProductCodes VALUES
    ('A','MANU001','TEST1'),
    ('A','MANU002','TEST2'), ...

  • RE: Is sp_send_dbmail Asynchronous?

    no. my requirement was super simple. Essentially, when an employee is assigned a task/drug protocol/whatever, send him an e-mail advising him of it. I had asked about this maybe pre-Service...

  • RE: Import many databases

    Maybe they're waiting for you to post your plan for them to comment on?

  • RE: Ways to search Faster In Ms SQL Server

    Got context?

  • RE: Is sp_send_dbmail Asynchronous?

    Oh, okay. That's what I was wondering. Thanks for the explanation. I was reading the documentation and it wasn't totally clear.

    Thanks, Lowell (and everybody). That answers my question.

  • RE: very slow select

    There query appears to be missing an alias:
    SELECT o2a.SOURCE_ID source_id, o2a.VALUE 
    FROM CR2Copy..OBJECT_TO_ATTRIBUTE

    should be
    SELECT o2a.SOURCE_ID source_id, o2a.VALUE 
    FROM CR2Copy..OBJECT_TO_ATTRIBUTE AS o2a

  • RE: How to merge Case when condition in Pivot Table ?

    How about some data? CREATE TABLE and INSERT scripts?
    Why not do the CASE statement in an inner query, and then pivot that result?

  • RE: very slow select

    DISTINCT is going to be brutal slow.
    AND o2a.STATUS_ID = 33000000000001 AND o2a.PROPERTY_ID = 1000000060338
    AND o2a.SOURCE_ID
    and then are those columns indexed? (maybe included in PK index?)

  • RE: SQL Query Help - PIVOT or CROSS APPLY?

    Wait, if you want a cumulative sum, your formula is wrong. There's no ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW in there... Is there are hierarchy in this? Can you...

  • RE: Number of employees active per date

    astrid 69000 - Thursday, January 17, 2019 2:20 PM

    I am confused, I have a date table, but I am not sure how...

  • RE: ssrs 2010 use fx button for inline sql

    Go back and ask said DBA why he wants this. Sounds absurd. The nice thing about stored procedures is that you can assign rights to them. you can't do that...

  • RE: Finding Average/Day for Each Month?

    If you have a Calendar table, this is infinitely easier. You would outer join Calendar to your Trips table and then aggregate on columns in the Calendar table (Year, Month,...

  • RE: Search and Group by month?

    You need to calculate the month from the date. A date is just a number...

    SELECT MONTH(start_date), COUNT(*) AS Count
    FROM trips
    WHERE YEAR(start_date) = 2016
    GROUP BY MONTH(start_date);

Viewing 15 posts - 1,081 through 1,095 (of 3,482 total)