Forum Replies Created

Viewing 15 posts - 3,301 through 3,315 (of 7,185 total)

  • RE: SINGLE_USER mode error

    Ah yes - didn't notice that! Thanks, Gail.

    John

  • RE: SINGLE_USER mode error

    Just as a matter of interest, why are you switching to single user mode? It's not necessary under normal circumstances to do so before taking a transaction log backup.

    John

  • RE: Redirect duplicate records using ssis

    If we don't understand your requirement, it's difficult to advise you. Such arbitrary stipulations make this sound a bit like a homework assignment. So, what makes you so...

  • RE: view

    WITH Names (personid, firstname, lastname, gender) AS ( -- sample data

    SELECT 1, 'John', 'Smith', 'M' UNION ALL

    SELECT 2, 'Sandy', 'Smith', 'F' UNION ALL

    SELECT 3, 'Sandy', 'Jones', 'M' UNION ALL

    SELECT 4,...

  • RE: Collation issue

    Excellent. By the way, you can avoid repeating that concatenation in the GROUP BY clause by using a CTE:

    WITH CTE AS (

    SELECT

    CONCAT(CONVERT(varchar(5),LEFT(IMADD.Postcode, 5)collate DATABASE_DEFAULT),

    '/',

    CASE

    WHEN DATEDIFF([year],IMIND.DOB, GETDATE()) - CASE...

  • RE: Collation issue

    Since the error occurred in the concat operation, you just need to make sure that all the things you are concatenating have the same collation. One way of doing...

  • RE: Stored procedure creation

    If you don't have BIDS or SSDT or Visual Studio, but you know the name of the stored procedures(s) you wish to compare, you can script them out and use...

  • RE: Check format of String

    You can use ranges for pattern-matching, such as [0-9] and [A-Z]. See the LIKE topic in Books Online for more information.

    John

  • RE: help with files in database

    Please will you post the result of this query?

    John

    SELECT type_desc, data_space_id, name, size, max_size, growth

    FROM MyDB.sys.database_files

  • RE: Proper use of CTE in scalar valued function

    I think you just need to add [font="Courier New"]@Startingdate =[/font] before [font="Courier New"]s2.StartDate[/font]. Can you guarantee that the SELECT query will always return a single row only?

    John

  • RE: select the row having the latest backup date

    Are you looking for separate rows for each backup type for each database? If so, just add backup type to your SELECT list and GROUP clause. If ,...

  • RE: Help with de-duplicating records in a table and updating the records to reflect eliminated dups

    Petr

    In that case, yes, change CategoryID to varchar something, and then use something like this page[/url] for tips on how to perform your concatenation.

    John

  • RE: Help with de-duplicating records in a table and updating the records to reflect eliminated dups

    Petr

    This isn't possible - CategoryID is int, so you can't change it to 2,7. Even if you could, I'd advise you not to - you're breaking the laws of...

  • RE: Calculate previous Date

    I would suggest a slight modification to the above, since the previous ID is not always going to be the current ID minus 1 (there will be gaps). Also,...

  • RE: DB log growth issue

    Dave

    The problem with a maintenance plan is you don't have much control over what it does. What you want to do is only rebuild the indexes that need it....

Viewing 15 posts - 3,301 through 3,315 (of 7,185 total)