Forum Replies Created

Viewing 15 posts - 5,716 through 5,730 (of 8,731 total)

  • RE: NORMSDIST Excel function for SQL Server 2008

    According to Wikipedia, the following should give the result but it doesn't according to this.

    DECLARE @Var float = 2.3

    SELECT POWER( 2.71828182845904523536, -.5 * SQUARE(@Var))/ SQRT(PI() * 2)

    If you have...

  • RE: Conversion of varchar to datetime

    Jeff Moden (10/7/2014)


    ramana3327 (10/7/2014)


    It gave 2005. Sorry wrong place. I will post in the right place

    Nah... no need now. Keep it here so that we don't lose any of...

  • RE: Need Help with Stored Procedure

    You don't have to convert every single value and you certainly don't have to use the format code on the values. My guess is that your problem is in one...

  • RE: Need Help with Stored Procedure

    The error is kind of misleading. You would think that is a problem with an int value when it's actually with a smalldatetime and a string which SQL Server tries...

  • RE: Changing Datetime to Int and set it to beginning of month

    ScottPletcher (10/7/2014)


    For consistency, I'd stick with just explicitly CASTing the second value to an int:

    SELECT CAST(DATEADD(MONTH, DATEDIFF(MONTH, 0, GETDATE()), 0) AS int)

    I agree with you, but you missed the intermediate...

  • RE: Why CROSS APPLY in the below scenario returning records from Left recordset even when there is no matching record in the Right one??

    I can't really explain what's happening here, but the lack of group by returns a "valid" NULL value. If you add the GROUP BY it will work as expected.

    SELECT *

    FROM...

  • RE: SSIS Derived Column, Expression Help

    Maybe with this set of formulas and noting that I used the variable @[User::ip] instead of a column:

    SUBSTRING( @[User::ip], 1 , FINDSTRING( @[User::ip] , ".", 1 ) - 1)...

  • RE: The Next Five Years

    Eric M Russell (10/7/2014)


    Yes, a genious should be able to create their own job, but a high IQ doesn't guarantee that the person is also a self-starter; it might just...

  • RE: The Next Five Years

    Miles Neale (10/6/2014)


    There will be no need for school. We will alter the DNA prebirth so that no one is born without the initial abilities of Albert E. and who...

  • RE: Case statement

    Maybe you're looking to unpivot your data?

    CREATE TABLE tblEmpData(

    Agent_ID int,

    Agent_ID2 int)

    INSERT INTO tblEmpData VALUES

    (11111, 22222),

    (33333, NULL),

    (NULL, 44444),

    (NULL, NULL)

    SELECT x.extension

    FROM tblEmpData

    CROSS APPLY (VALUES(Agent_ID),...

  • RE: Long running MERGE

    Not sure if I can call it luck. The one in charge of this process decided to remove the MERGE and use a combination of update and insert (or maybe...

  • RE: Secret Santa SQL

    If you're creating a random column, you could use it twice to ensure that you're not hitting the same employee.

    CREATE TABLE tblEmployee(

    [id] ...

  • RE: First database design (looking for reviews)

    That's correct, you could keep a bit column to group status if needed. For example:

    CREATE TABLE User_Status(

    user_status_id int IDENTITY PRIMARY KEY,

    user_status_description...

  • RE: First database design (looking for reviews)

    I agree with everything Eirikur said. His comment about Titles applies to Department, Location and User_Status as well.The same happens with the relations between Equipment and Area, Models, Funding Source,...

  • RE: Are the posted questions getting worse?

    Does anyone have any experience with APS (Microsoft Analytics Platform System)? Would you mind sharing how that worked for you?

Viewing 15 posts - 5,716 through 5,730 (of 8,731 total)