Forum Replies Created

Viewing 15 posts - 6,811 through 6,825 (of 26,490 total)

  • RE: Find sequential numbers

    You mean like this?

    /*

    Eventdate. Status

    20-01-2014 18:00 0

    20-01-2014 18:30 0

    20-01-2014 19:00 1

    20-01-2014 19:30 0

    20-01-2014 20:00 1

    20-01-2014 20:30 0

    20-01-2014 21:00 0

    20-01-2014 21:30 0

    20-01-2014 22:00 0

    20-01-2014 22:30 1

    20-01-2014 23:00 0

    */

    create table dbo.EventsStatus(

    ...

  • RE: Find sequential numbers

    rui_leote (4/5/2014)


    He he.

    It works.

    Thanks.:-D:-P;-)

    Now...

    If I want to reset the counter for all days?

    When it change the day, reset the counter.

    He he

    Which works? There are a couple of answers here...

  • RE: Find sequential numbers

    The following works in SQL Server 2012 and should work as far back as SQL Server 2005. Is this what you are attempting to accomplish?

    /*

    Eventdate. Status

    20-01-2014 18:00 0

    20-01-2014 18:30...

  • RE: Urgent help with STRING in SQL

    Something like this?

    declare @TestTab table (

    GHRMSContingentID nvarchar(500)

    );

    insert into @TestTab

    values (N'01234567oewqronasdf'),(N'A1234567uhcvoibndaweo'),(N'oadooeoawe');

    select * from @TestTab;

    select * from @TestTab where GHRMSContingentID like N'[A-Za-z0-9][0-9][0-9][0-9][0-9][0-9][0-9]%';

  • RE: How do I recover a db corrupted more than 1 full backup ago, and apply all subsequent diff backups???

    mark 95074 (4/4/2014)


    'morning all

    I've had a report of missing data (restore from full was done, diff wasn't applied) in a db that has the following backup schedule:

    daily full @10pm

    6 hourly...

  • RE: Are the posted questions getting worse?

    Sean Lange (4/4/2014)


    Lynn Pettis (4/4/2014)


    Sean Lange (4/4/2014)


    I think I have finally officially lost my marbles. In addition to coaching 2 soccer teams, playing in 2 adult leagues and being the...

  • RE: Are the posted questions getting worse?

    Sean Lange (4/4/2014)


    I think I have finally officially lost my marbles. In addition to coaching 2 soccer teams, playing in 2 adult leagues and being the Cubmaster for my son's...

  • RE: Database design theory question

    Sounds like an EAV design. Based on that you should search on EAV or Entity Attribute Value and see what else you and find. I haven't used EAV...

  • RE: How do you restore a deleted record/s directly from the SQL transaction log?

    ray santalis-466762 (4/4/2014)


    Hi Shawn, there is no way to restore a record directly from the transaction log? That is too bad, I have a huge database and I do...

  • RE: Are the posted questions getting worse?

    Sean Lange (4/4/2014)


    Greg Edwards-268690 (4/4/2014)


    SQLRNNR (4/4/2014)


    Sean Lange (4/4/2014)


    TomThomson (4/3/2014)


    Steve Jones - SSC Editor (4/3/2014)


    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...

  • RE: Are the posted questions getting worse?

    TomThomson (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.

    Not if you...

  • RE: Stored procedure execution history

    rehman-615909 (4/3/2014)


    Thanks Jeff.

    Actually, that was Sean.

    🙂

  • RE: Get one record from subquery

    First, glad to help. Second, since you don't need the DISTINCT, drop it from my code.

  • RE: Get one record from subquery

    First, do you really need the DISTINCT in the select statement?

    Second, try this:

    Select distinct

    a.intPersId

    ,mn.strFullname Name

    ,a.strSignature

    ...

  • RE: fn_dblog

    I agree with Gail. Also, you really should use sys.users not sysusers as sysusers is for backward compatibility and may be removed from future versions of SQL Server.

Viewing 15 posts - 6,811 through 6,825 (of 26,490 total)