Forum Replies Created

Viewing 15 posts - 1,036 through 1,050 (of 2,452 total)

  • RE: convert rows to columns in query

    elham_azizi_62 (10/5/2015)


    hello J Livingston.

    My output have more than 1 column and column's names are:

    PersonelNumber,FirstName,LastName,BaseSalary,BaseSalaryAmount,ExtraSalary,ExtraSalaryAmount,SpecialSalary,SpecialSalaryAmount.

    I dont understand......you previously asked for this

    1188 Ali Ahmadi BaseSalary 1213232323 ExtraSalary 54585 SpecialSalary 245832

    1245 ahmad Alipour...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: max value update

    I am going to have a guess...as a starter

    is the following anywhere close?

    WITH cdets as (

    SELECT Countryid, country, stateid, states

    FROM countrydetails

    WHERE ...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: max value update

    ok...lets tidy this up a bit for you

    CREATE TABLE countrydetails(

    Countryid INT

    ,country VARCHAR(20)

    ,stateid INT

    ,states ...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: convert rows to columns in query

    elham_azizi_62 (9/30/2015)


    but Now need this out put:

    1188 Ali Ahmadi BaseSalary 1213232323 ExtraSalary 54585 SpecialSalary 245832

    1245 ahmad Alipour ExtraSalary 2526961

    1478 sara Emami BaseSalary 548745

    I mean when a column...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: How to calculate Time difference between 2 ranges and tally up each hour????

    -- you say you have a remote server, and lookin back thro the various code

    -- you have sent me I am not sure which is/is not relevant

    -- therefore please insert...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: How do I generate test data using only VS 2013?

    Jeff...my sincere condolences....My Dad passed away a few years back after a long struggle with cancer...it aint easy my friend.

    glad to hear you are going to writing again and look...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: How do I generate test data using only VS 2013?

    Hi Jeff.....did you ever do "part 3"

    "Coming up in Part 3, random names, characters, codes, and SSNs."

    best wishes

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: How to calculate Time difference between 2 ranges and tally up each hour????

    rkelly58 (9/29/2015)


    J,

    Not sure the PMs are working, did you get the code I just sent u?

    yeah..I did....several

    busy at the moment....if I get a chance I may take a look...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: How to hide stored procedures from user?

    smitty-1088185 (9/27/2015)


    SSCrazy that is absolutley perfect!!! Exactly what I needed. Thank you so much.

    I strongly suggest that you fully research this and understand what is and is not possible for...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: 1st Time?

    have a play......maybe help / may not

    DECLARE @yourdate datetime;

    SET @yourdate = '20150620';

    SELECT

    CASE

    WHEN DATEPART(M , @yourdate) >= 7 THEN DateFromParts(YEAR(@yourdate) , 7 , 1)

    ...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: How to hide stored procedures from user?

    USE tempdb

    GO

    -- create a test proc in tempdb

    CREATE PROCEDURE usptest

    AS

    SELECT * FROM #temp

    GO

    -- following code will not remove proc from SSMS

    -- but does prevent it showing in the "obvious" list...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: How to calculate Time difference between 2 ranges and tally up each hour????

    rkelly58 (9/25/2015)


    Can't u just do it for me?

    I won't accuse u of barking again, promise 🙂

    are you telling me that there is no one else in your "business" that...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: How to calculate Time difference between 2 ranges and tally up each hour????

    rkelly58 (9/25/2015)


    Can't u just do it for me?

    I won't accuse u of barking again, promise 🙂

    I assume you have heard the phrase "give a man a fish........"

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: How to calculate Time difference between 2 ranges and tally up each hour????

    not sure where you did your research....but https://msdn.microsoft.com/en-GB/library/ms175972.aspx explains it reasonly well

    you will need to declare your variables

    When a CTE is used in a statement that is part of...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: How to calculate Time difference between 2 ranges and tally up each hour????

    rkelly58 (9/25/2015)


    Had a go at combing my scripts into the code, but no luck, here is what I tried:

    SELECT MachineLocations.CampusID, MachineLocations.Campus, MachineLocations.BuildingID,...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

Viewing 15 posts - 1,036 through 1,050 (of 2,452 total)