Forum Replies Created

Viewing 15 posts - 556 through 570 (of 626 total)

  • RE: SQL Server Jobs schedule

    Just threw this together quickly so take it as you will but it might help with what you are looking for.

    USE [MSDB];

    WITH Last_Run AS

    (

    SELECT MAX(instance_id) AS maxID, job_id FROM sysjobhistory...


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • RE: Can anyone help group this query result? Thanks.

    halifaxdal (6/4/2015)


    yb751 (6/4/2015)


    Sounds like you just need to use PIVOT...can't be 100% sure though without some sample data/output.

    Thanks, never used pivot before, can you help?

    If it is indeed what you...


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • RE: Can anyone help group this query result? Thanks.

    Sounds like you just need to use PIVOT...can't be 100% sure though without some sample data/output.


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • RE: Finding the tree structure

    This is just a shot at the dark here because I'm still not exactly sure what you want. The output is a little different but I built it based...


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • RE: Declared Hard coded Variables

    patelxx (6/3/2015)


    declare @StartTime nvarchar(10)= '12:00'

    declare @EndTime nvarchar(10)= '12:45'

    declare @Diff time(1) = cast(@EndTime as datetime) - cast(@StartTime as datetime)

    How to I use Column names instead of Hard coding variables - e.g....


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • RE: Returned value of a stored prcedure

    I'm not sure if you realized but Lynn was being quite literal. Open up your procedure and just do a Ctrl-F and look for any RETURN statements. Often...


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • RE: I need help with this query.

    Since you are completely new to the site I'll throw you a bone. 😉

    Just for future reference people here are very helpful and always ready to help. However, like...


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • RE: Load data for yesterday's date and specific date

    Well I'm no SSIS expert but assuming you have a stored procedure as your data source you could do something like this.

    CREATE PROCEDURE DefaultTest

    @date_param DATETIME = NULL

    AS

    SET NOCOUNT ON

    DECLARE @date...


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • RE: Duplicate Index...or am I missing something?

    Hmmm, I hadn't considered that. I have 17 columns and looking at the data types only one raises an eyebrow which is a LOB used to store images.


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • RE: Compare this years data with last years data - day adjusted

    It's much easier to visualize with data.

    Try this for example:

    DECLARE @test-2 TABLE(myDate DATE, Sales MONEY)

    INSERT INTO @test-2(myDate, Sales)

    VALUES

    ('12/30/2013',100),

    ('12/31/2013',100),

    ('01/01/2014',100),

    ('01/02/2014',100),

    ('01/03/2014',200),

    ('01/04/2014',200),

    ('01/05/2014',100),

    ('01/06/2014',100),

    ('01/07/2014',100),

    ('01/08/2014',100),

    ('01/09/2014',100),

    ('01/10/2014',250),

    ('01/11/2014',250),

    ('01/01/2015',100),

    ('01/02/2015',150),

    ('01/03/2015',150),

    ('01/04/2015',100),

    ('01/05/2015',100),

    ('01/06/2015',100),

    ('01/07/2015',100),

    ('01/08/2015',100),

    ('01/09/2015',300),

    ('01/10/2015',300)

    SELECT *, DATEPART(dw, myDate) AS Day_Week, DATEPART(isowk, myDate) AS Week_Num FROM...


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • RE: to find equal and opposite rows in a table

    Could you further explain why C is eliminated from your desired output? In fact we could use a little more info in general. Without knowing how A is...


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • RE: Select quert with REPLACE function

    Despite your description being vague I 'think' I know what you want.

    If the cities need to be known by different names then you are best to just create a table...


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • RE: You know you're having a slow day when...

    Brandie Tarvin (5/11/2015)


    You should turn that into an article, if you haven't already. Lots of people would be interested in your journey.

    I hadn't thought of that. It's a good...


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • RE: Publish a subscriber?

    GilaMonster (5/15/2015)


    It's possible. If you want to research, the term used for this scenario is 'republishing'

    Thanks Gila...talk about much improved search results when you know what the actual term is...


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

  • RE: String Search SQL help needed .....

    mw112009 (5/11/2015)


    What I really need is to find the entries that have the word LVAD but on either side there should be a space chartacters.

    In other words I don't want...


    SELECT quote FROM brain WHERE original = 1
    0 rows returned

Viewing 15 posts - 556 through 570 (of 626 total)