Forum Replies Created

Viewing 15 posts - 16 through 30 (of 137 total)

  • RE: Converting date column that is a varchar data type to a datetime data type

    Eric M Russell (4/10/2015)


    From what you recall, basically what was the DDL; was it essentially just an integer column?

    It was a VARCHAR built from:

    1 - 4 = DATEPART(yyyy,GETDATE)

    5...

    Sigerson

    "No pressure, no diamonds." - Thomas Carlyle

  • RE: how to update without reference key

    A trigger can be set to fire when a table is updated, inserted to, or deleted from. Have the trigger fire some t-sql code to do the processing...

    Sigerson

    "No pressure, no diamonds." - Thomas Carlyle

  • RE: Converting date column that is a varchar data type to a datetime data type

    ZZartin (4/3/2015)


    Quick question Grant, how many times have you seen systems/processes fail on the 13th of the month? I can count a good handful.

    In my last job I managed a...

    Sigerson

    "No pressure, no diamonds." - Thomas Carlyle

  • RE: how to calculate date time

    And what constitutes Day1? Is Day1 always the earliest date in your table?

    Sigerson

    "No pressure, no diamonds." - Thomas Carlyle

  • RE: how to update without reference key

    First there is no way to join your customer table to your materials table. It does sound like homework and a trick question at that.

    If real, then you need...

    Sigerson

    "No pressure, no diamonds." - Thomas Carlyle

  • RE: Linked server issue

    Are you able to Import the Excel file into a temp table?

    ( Right-click on [Database Name]-->Tasks-->Import... )

    Trying that might expose if there's some kind of error in the Excel file.

    Sigerson

    "No pressure, no diamonds." - Thomas Carlyle

  • RE: The Worst Comments

    Tony Lanterman (3/13/2015)


    One of our contract developers was quite fond of this and often set lines to BLINK. There are few things more annoying than blinking comment code.

    Oh...

    Sigerson

    "No pressure, no diamonds." - Thomas Carlyle

  • RE: Populating data by Date Intervals

    SELECT

    em.empid,em.Emp_Name,

    [Week] = (SELECT SUM(OTHours) FROM tblOTDetails w WHERE w.empid = e.empid and DATEPART(WW, otdate) = DATEPART(WW, GETDATE())),

    [Month] = (SELECT SUM(OTHours) FROM tblOTDetails w WHERE w.empid = e.empid and DATEPART(mm, otdate)...

    Sigerson

    "No pressure, no diamonds." - Thomas Carlyle

  • RE: Microsoft SQL Server Management Studio Express - datetime

    Alternatively you could design your date fields as VARCHAR(10) and format them any way you wish. Of course that would completely negate the extreme usefulness of the DATETIME type...

    Sigerson

    "No pressure, no diamonds." - Thomas Carlyle

  • RE: Microsoft SQL Server Management Studio Express - datetime

    I understood your question and AFAIK the answer is NO. Check for yourself under Tools-->Options... You'll find several options for formatting the results of a...

    Sigerson

    "No pressure, no diamonds." - Thomas Carlyle

  • RE: What is the equivalent to Yes/No data type in SQL?

    Jeff Moden (3/3/2015)


    CELKO (3/3/2015)


    While what you say is absolutely true, there are so many nice ways to say this and so many ways to make this useful and you...

    Sigerson

    "No pressure, no diamonds." - Thomas Carlyle

  • RE: What is the equivalent to Yes/No data type in SQL?

    MMartin1 (3/2/2015)


    This works with TRUE or FALSE >

    DECLARE @mybit bit;

    SET @mybit = 'true';

    SELECT @mybit

    Though yes/no , on/off do not. Just want to add to this post.

    This is interesting....

    Sigerson

    "No pressure, no diamonds." - Thomas Carlyle

  • RE: AutoNumber Integer to Varchar with min ID

    @luis

    +1

    A nice solution, very elegant!

    Sigerson

    "No pressure, no diamonds." - Thomas Carlyle

  • RE: Queries and Joining tables

    Jeff Moden (2/23/2015)


    Like I said, to each their own but I typically won't pluralize table names.

    DonlSimpson (2/24/2015)


    +1 If a row represents a a singular entity, I prefer to...

    Sigerson

    "No pressure, no diamonds." - Thomas Carlyle

  • RE: Help in query

    CELKO (2/24/2015)


    You should follow ISO-11179 rules for naming data elements. You failed!

    But even worse than all of this, is that you have two tables with the same structure.

    Oh?...

    Sigerson

    "No pressure, no diamonds." - Thomas Carlyle

Viewing 15 posts - 16 through 30 (of 137 total)