Forum Replies Created

Viewing 15 posts - 2,086 through 2,100 (of 7,187 total)

  • RE: SQL Snapshot

    You have replication in your test environment? Please don't tell me it's from a live server? OK, we're back to my original suggestion of taking a backup of...

  • RE: SQL Snapshot

    river1 (12/13/2016)


    Can I create the snapshot using t-sql instead of using GUI?

    What about to re-apply or delete the snapshot? can I also use t-sql?

    Pedro

    Sure you can. Check out the...

  • RE: SQL Snapshot

    In this case, yes. I'd take an extra differential just before you start (ie before creating the snapshot).

    You don't apply the changes using the snapshot. If you're happy...

  • RE: Replication Sync issue

    Do the tables in question in the subscription database have exactly the same constraints as those in the publication database? What about triggers? In the properties of the...

  • RE: Replication Sync issue

    Transactional replication? If you've inserted or deleted any rows at the subscriber at any time since the last initialisation then yes, there will be discrepancies.

    John

  • RE: Data update

    spectra (12/13/2016)


    I don't want to change datetime to any other datatype e.g date .......

    Why not? You're not changing any data if you cast as date. I understand...

  • RE: Data update

    CREATE TABLE #John (j datetime)

    INSERT INTO #John VALUES ('2016-11-10 12:12:42.100')

    SELECT j FROM #John

    WHERE j BETWEEN '20161201' and '20161213'

    [font="Courier New"](0 row(s) affected)[/font]

    John

  • RE: Data update

    WHERE UPDATED_DATE BETWEEN '20161201' and '20161213'

    Bear in mind that this won't capture anything that happened on 13th, unless it happened at midnight (20161213 00:00:00). If you want to...

  • RE: Data update

    What data type is the UPDATED_DATE column?

    John

  • RE: GROUP BY in SQL Server 2014

    Unless you post the query, I'm just guessing. I imagine that you have different data in the tables on the two servers.

    John

  • RE: Converting date and/or time from character string.

    Dave

    Have you considered using the DATEFROMPARTS function?

    John

  • RE: Split a number in close equal number in sql

    No need for a loop in your function. This will work for any number of weeks up to 10.DECLARE @weeks tinyint;

    DECLARE @no int;

    SET @no = 16;

    SET @weeks = 3;

    WITH...

  • RE: CASE with COUNT

    celine.godines (12/13/2016)


    Let me know if you need me to provide anything else.

    Please will you provide table DDL in the form of a CREATE TABLE statement, sample data in the form...

  • RE: CASE with COUNT

    Celine

    I'm sorry, you've lost me. Please will you provide table DDL in the form of a CREATE TABLE statement, sample data in the form of INSERT statements, expected results,...

  • RE: CASE with COUNT

    CASE

    WHEN SUM([Contribution Amount]) <= 7500 THEN ''

    ELSE 'Total over £7,500'

    END

    John

Viewing 15 posts - 2,086 through 2,100 (of 7,187 total)