Forum Replies Created

Viewing 15 posts - 3,841 through 3,855 (of 26,490 total)

  • RE: Simple SQL challenge - who can solve

    DuncEduardo (5/11/2016)


    Yes but you've explicitly stated numbers corresponding to calendar months from Jan - Nov. I try to avoid any form of "hard-coding".

    Nice solution though

    Luis's solution only has a table...

  • RE: Duplicate entries

    DPD0011 (5/11/2016)


    I appreciate the help, new to SQL.

    select

    rn = row_number() over (partition by a.yyyymm, a.rcvdate, a.dispdate order by c.issuedate asc),

    a.yyyymm,

    ...

  • RE: Are the posted questions getting worse?

    I always wonder when it appears that users have access to SSMS.

  • RE: Duplicate entries

    DPD0011 (5/11/2016)


    SQL 2012

    Need to see the code you actually tried to run. The row_number() function has been a part of SQL Server since SQL Server 2005.

  • RE: Duplicate entries

    DPD0011 (5/10/2016)


    Thank you for the tips, when I run the query I receive this error:

    Msg 195, Level 15, State 10, Line 2

    'row_number' is not a recognized function name.

    What version of...

  • RE: Are the posted questions getting worse?

    Why are people still using SQL-89 style joins?

  • RE: different execution plan query cost

    You might want to try using OPENQUERY and running the query on the remote server and sending back only the data you need.

    Hopefully I made all the right changes:

    select *...

  • RE: passing a date value is not updating the table

    anjaliagarwal5 (5/10/2016)


    Hi All,

    have the follwoing stored prcoedure

    Create procedure Test

    (

    @TestDate1 smallDatetime = NULL,

    @TestDate2 smallDatetime = NULL,

    ...

  • RE: different execution plan query cost

    Steve T (5/10/2016)


    I'm running 2 exact queries. One in production and one in dev. They both connect to the same LINKED server for data and I'm getting vastly different...

  • RE: sp_helptext returns There is no text for object on a Stored Procedure

    Welsh Corgi (5/10/2016)


    I need to get the error message from the user.

    Mail Server is down.

    Thanks.

    You do realize the more information you provide up front, the less back and forth there...

  • RE: Update statement

    anjaliagarwal5 (5/10/2016)


    Hi All,

    I am passing three date variables in the stored procedure. Depending on whichever variable has value in it, it will be assigned to the Testdate column of...

  • RE: sp_helptext returns There is no text for object on a Stored Procedure

    Welsh Corgi (5/10/2016)


    Now I need to allow a group to be able to Script Table as ... on a Test Server.

    It worked on Production for a Developer on Production by...

  • RE: RANDom traps for the unwary

    Bill Talada (5/9/2016)


    I believe scientists rely on hardware solutions such as radioactive decay detection devices to get true randomness.

    I stay away from pseudo random data generation and try to approach...

  • RE: Passing different values

    Phil Parkin (5/10/2016)


    anjaliagarwal5 (5/10/2016)


    Hi All,

    I am passing a parameter as @col1. I need to set col3 to 100 if @col1 =1 else col3 will be any value that is...

  • RE: Passing different values

    anjaliagarwal5 (5/10/2016)


    Hi All,

    I am passing a parameter as @col1. I need to set col3 to 100 if @col1 =1 else col3 will be any value that is passed in....

Viewing 15 posts - 3,841 through 3,855 (of 26,490 total)