Forum Replies Created

Viewing 15 posts - 7,546 through 7,560 (of 26,490 total)

  • RE: Are the posted questions getting worse?

    Amazing how some make comments when they take what others say out context. Sometimes you really do have to look at the entire quote, not just the part you...

  • RE: Shrink helping performance

    ScottPletcher (5/22/2013)


    GilaMonster (5/21/2013)


    Shrink alone can't speed up a query.

    Isn't that an overly broad assertion? If, for the sake of argument, some/all of the disk extents added were scattered all...

  • RE: Error when trying to call Stored Procedure from batch file

    patrickmcginnis59 10839 (5/22/2013)


    Lynn Pettis (5/22/2013)


    dndaughtery (5/22/2013)


    Im running the following in a batch file

    sqlcmd -Q "exec dbo.MySproc" -S "MyServer" -d "MyDatabase"

    and Im getting the following error:

    Named Pipes Provider: Could not open...

  • RE: trouble joining 3 tables

    Oh, wait:

    from

    ((examination as b inner join examination as pre on b.related_exam_id = pre.id) left join preliminary_exam on pre.procedure_id = preliminary_exam.id)

    -- shouldn't there be some kind of join between these?

    ((examination...

  • RE: trouble joining 3 tables

    Can't really tell. Are you getting some kind of error?

  • RE: Error when trying to call Stored Procedure from batch file

    dndaughtery (5/22/2013)


    Im running the following in a batch file

    sqlcmd -Q "exec dbo.MySproc" -S "MyServer" -d "MyDatabase"

    and Im getting the following error:

    Named Pipes Provider: Could not open a connection to SQL...

  • RE: Are the posted questions getting worse?

    patrickmcginnis59 10839 (5/22/2013)


    Brandie Tarvin (5/22/2013)


    patrickmcginnis59 10839 (5/21/2013)


    L' Eomot Inversé (5/21/2013)


    In response to Patrick, it would have better phrased something like "There is a lot of discussion of this on the...

  • RE: How to write a select query that shows upcoming birthdays

    chris.rogers00 (5/21/2013)


    I couldn't see any difference in CPU or Query cost between my answer and Lynn's answer when doing <10 records.

    It's all down to preference.

    DECLARE @FictionalDate DATE = '1969-12-15'

    DECLARE @bdays...

  • RE: How to write a select query that shows upcoming birthdays

    Edit: Copied wrong data to this post.

  • RE: TimeStamp without milliseconds!!!

    shrsan (5/21/2013)


    Thanks SSCrazy...But i want an expression to write in the derived column of ssis.

    Am adding Timestamp Column from derived column into the table.

    Do u have an expression fro derived...

  • RE: no matter how large the destination column eg. nvarchar(max), excel source choke on column

    KoldCoffee (5/21/2013)


    Careful thought before I ask the following:

    Would it be ok with you not to post to my topics for about 6 months? There are so many people on...

  • RE: How to write a select query that shows upcoming birthdays

    Then try this when all the dates are valid:

    DECLARE @TABLE_NAME TABLE(

    NAME VARCHAR(30),

    BDAY CHAR(8))

    INSERT INTO @TABLE_NAME(NAME,BDAY)

    VALUES('A','19901022')

    INSERT INTO @TABLE_NAME(NAME,BDAY)

    VALUES('B','19940523')

    INSERT INTO @TABLE_NAME(NAME,BDAY)

    VALUES('C','19980602')

    INSERT INTO @TABLE_NAME(NAME,BDAY)

    VALUES('D','19590525')

    INSERT INTO @TABLE_NAME(NAME,BDAY)

    VALUES('E','20130521')

    INSERT INTO @TABLE_NAME(NAME,BDAY)

    VALUES('F','20130620');

    select

    *

    from

    ...

  • RE: How to write a select query that shows upcoming birthdays

    First, run the following query against your data:

    select * from dbo.yourTableNameHere where isdate(date_of_birth) = 0;

    If this returns any records you have dates that aren't dates and those need to be...

  • RE: How to write a select query that shows upcoming birthdays

    mw112009 (5/20/2013)


    This will be an easy challenge.

    Select date_of_birth from person

    --This gives values in the YYYYMMDD format like 19700101

    I want a list of people whose birthdays are within the...

  • RE: Datetime function help

    Have a look at this:

    declare @ThisDate datetime = getdate();

    select @ThisDate, dateadd(hour, 7, dateadd(week, datediff(week,0,@ThisDate), -1));

    set @ThisDate = '20130519';

    select @ThisDate, dateadd(hour, 7, dateadd(week, datediff(week,0,@ThisDate), -1));

    set @ThisDate = '20130516';

    select @ThisDate, dateadd(hour, 7,...

Viewing 15 posts - 7,546 through 7,560 (of 26,490 total)