Forum Replies Created

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

  • RE: Backup Job and Cleanup Task using Windows Batch job

    You could run the job on a server that does have SQL Server Agent, I suppose. (Your job, that is, not Ola's.)

    John

  • RE: Backup Job and Cleanup Task using Windows Batch job

    I recommend that you use Ola Hallengren's backup solution. No sense in wasting time writing it yourself when he's already done so for you!

    John

  • RE: How to get value based on position of special character string in a column

    This will give you an idea of how to do it. I'm sure you'll be able to make it a lot simpler than I have!CREATE TABLE #Names (Col1 varchar(4000),...

  • RE: How to get value based on position of special character string in a column

    Vikram

    If Col1 is always in the format shown, then you can indeed use SUBSTRING, something like this:

    SUBSTRING(Col1,Col2*2-1,1)

    John

  • 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

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