Forum Replies Created

Viewing 15 posts - 31 through 45 (of 463 total)

  • RE: query help required

    Jeff Moden (2/11/2010)


    Sorry, Nabha. Your code certainly looks like it'll work just fine. Considering the data spec, I was just wondering why you went the extra mile with...

    ---------------------------------------------------------------------------------

  • RE: Problem in procedure

    Can you show us what is there inside this? (if its not too big)

    USP_PLM_COSTCENTER_EXPORT_VALIDATOR

    ---------------------------------------------------------------------------------

  • RE: query help required

    Jeff Moden (2/10/2010)


    Nabha (2/10/2010)


    Maybe I'm missing something but could it be as simple as this?

    Regards,

    Willem

    http://wschampheleer.wordpress.com

    That would give the records even if the employee is not active now.

    ...

    ---------------------------------------------------------------------------------

  • RE: Retrieve total rows over paging

    I am sure this is not what you are looking for,

    Select * , Row_number() OVER (order by C),

    (Select count(*) FRom T)

    from T

    post the query in this format and...

    ---------------------------------------------------------------------------------

  • RE: query help required

    Paarthasarathy (2/10/2010)


    Sorry Nabha..

    Let me explain exactly i want.

    If we look the table, we have 3 records for the empid 1,

    1st record on the 01-01-2005 was inserted when that employee actually...

    ---------------------------------------------------------------------------------

  • RE: query help required

    Maybe I'm missing something but could it be as simple as this?

    Regards,

    Willem

    http://wschampheleer.wordpress.com

    That would give the records even if the employee is not active now.

    and the employee...

    ---------------------------------------------------------------------------------

  • RE: query help required

    Not sure if this will help. May be insufficient test data. I am assuming that the latest record (as per date) in emp table indicates the 'current' status of...

    ---------------------------------------------------------------------------------

  • RE: help with row_number() over (partition

    I am sure I am getting this requirement all wrong, thats because you have not posted the query properly. have a look at this,

    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    But if you are asking how...

    ---------------------------------------------------------------------------------

  • RE: How to send query results to another server/database

    You can create the 'linked servers' and use the four part naming convention to access the data from linked server. Have a look in BOL about linked servers. It should...

    ---------------------------------------------------------------------------------

  • RE: reg sql query

    This is basic SQL stuff isnt it? you should've given it a try.

    Not getting into the details of why would they keep two similar tables, here goes a way...

    ---------------------------------------------------------------------------------

  • RE: basic sql

    D i v y a R e d d y (2/4/2010)


    http://www.sqlservercentral.com/

    try these after wards i will give other websites also.

    hmm, I wonder how long he will take to complete...

    ---------------------------------------------------------------------------------

  • RE: if else stored procedore

    look at the line with bold font in the code below.

    DECLARE @eventype VARCHAR(50)

    DECLARE @time DATETIME

    DECLARE @alert VARCHAR(500)

    SELECT TOP 1...

    ---------------------------------------------------------------------------------

  • RE: [HELP] String Value & Non String value

    My wild guess is that you are looking for a dynamic SQL. This should get you started,

    CREATE TABLE #TEST(FID int, Q01 int, Q02 int)

    INSERT INTO #TEST VALUES (1, 1,...

    ---------------------------------------------------------------------------------

  • RE: Row to Column Conversion

    I would suggest the below,

    If the columns are static, read this[/url]

    Else IF its dynamic read this[/url]

    ELSE (if you are stuck and need help) read this[/url]

    Incidentally all three articles by...

    ---------------------------------------------------------------------------------

  • RE: grouping my result set based on the firstname column with all other columns included

    Will this do? 🙂

    (borrowed the script from Chris)

    SELECT *,

    (SELECT AVG([grades])

    FROM #duplicate2 T2

    Where T2.FIRSTNAME = T1.FIRSTNAME

    GROUP BY T2.FIRSTNAME ) AS [AVG]

    FROM #Duplicate2 T1

    ---------------------------------------------------------------------------------

Viewing 15 posts - 31 through 45 (of 463 total)