Forum Replies Created

Viewing 15 posts - 5,281 through 5,295 (of 15,381 total)

  • RE: Are the posted questions getting worse?

    dwain.c (4/3/2014)


    Sean Lange (4/3/2014)


    Greg Edwards-268690 (4/3/2014)


    it was clear they had no idea what they wanted or needed.

    But finish it by Friday.

    This is an everyday occurrence at my job.

    If it happens...

  • RE: Stored procedure execution history

    rehman-615909 (4/3/2014)


    Oops, sorry Sean.

    No problem. I don't mind letting Jeff have the credit...especially if I am wrong. 😉

  • RE: Are the posted questions getting worse?

    Revenant (4/3/2014)


    Sean Lange (4/3/2014)


    Greg Edwards-268690 (4/3/2014)


    it was clear they had no idea what they wanted or needed.

    But finish it by Friday.

    This is an everyday occurrence at my job.

    That's OK as...

  • RE: update table using variable from another query

    WADRIAN68 (4/3/2014)


    Hi

    Firstly thanks. Secondly, the example was a simplified version of what I'm trying to do just to get the concept across, the actual tables are a better design.

    The...

  • RE: Stored procedure execution history

    rehman-615909 (4/3/2014)


    Hi,

    Does SQL Server keeps a history of execution of stored procedures, like who executed and when? If yes, how do I access that information?

    Thanks.

    No it does not record that...

  • RE: Excel IIF to SQL

    Luis Cazares (4/3/2014)


    You don't need several CASE, one is enough.

    Case when Status = 'Yes' then 'WithinStatus'

    when Hours< Benchmark Then 'OutsideStatus'

    Else 'WithinStatus'

    End as...

  • RE: Are the posted questions getting worse?

    Greg Edwards-268690 (4/3/2014)


    it was clear they had no idea what they wanted or needed.

    But finish it by Friday.

    This is an everyday occurrence at my job.

  • RE: Can I have multiple ALTER COLUMNs in a single ALTER TABLE ?

    SQL Guy 1 (4/3/2014)


    How many columns do you have to alter?

    Totally 9 columns:

    7 : Nvarchar --> varchar

    2 : text --> varchar

    Ouch. Not sure what your table looks like but...

  • RE: Get one record from subquery

    Stubby Bunny (4/3/2014)


    Sean,

    thanks for the link to applys, wish I had know about these before could have saved me a lot of headaches. thank you

    You are quite welcome. Just...

  • RE: Get one record from subquery

    Stubby Bunny (4/3/2014)


    HI, I was only using it to try to get to 1 record, knew it did not work since I was still getting mutiple. Your change works...

  • RE: Can I have multiple ALTER COLUMNs in a single ALTER TABLE ?

    SQL Guy 1 (4/3/2014)


    Sean Lange (4/3/2014)


    The proper syntax is quite simple.

    ALTER TABLE t1

    ALTER COLUMN c1 INT;

    ALTER TABLE t1

    ALTER COLUMN c2 varchar(10);

    I am just doing this way - separate ALTER...

  • RE: Get one record from subquery

    I would probably use APPLY similar to Lynn but here is another approach that should accomplish the same thing.

    Select a.intPersId

    ,mn.strFullname Name

    ,a.strSignature

    ,CONVERT(Varchar(10), a.dtSigned, 111) dtSigned

    ,CONVERT(Varchar(10), a.dtnotified, 111) dtNotified

    ,CASE WHEN a.dtSigned IS...

  • RE: Get one record from subquery

    My first question is why are you using a subquery here? This is just another left join.

    Select distinct a.intPersId

    ,mn.strFullname Name

    ,a.strSignature

    ,CONVERT(Varchar(10), a.dtSigned, 111) dtSigned

    ,CONVERT(Varchar(10), a.dtnotified, 111) dtNotified

    ,CASE WHEN a.dtSigned IS NOT...

  • RE: Can I have multiple ALTER COLUMNs in a single ALTER TABLE ?

    The proper syntax is quite simple.

    ALTER TABLE t1

    ALTER COLUMN c1 INT;

    ALTER TABLE t1

    ALTER COLUMN c2 varchar(10);

  • RE: Wait + looping

    If you stick with the loop you might consider that the code inside will never execute...

    Declare IntFlag (int)

    Set IntFlag = 0

    While IntFlag <> 0

Viewing 15 posts - 5,281 through 5,295 (of 15,381 total)