Forum Replies Created

Viewing 15 posts - 931 through 945 (of 1,192 total)

  • RE: Alter table failed because the minimum row size would be 8061, including 8035 bytes of internal overhead

    sgmunson (7/14/2015)


    Jeffery Williams (5/28/2015)


    Well the CLEANTABLE function is for varchar columns and SUPPOSEDLY does not do anything for int's.

    Tried it... He shoots, he scores... It worked.

    I considered this however knowing...

  • RE: SQL2012 rank into predefine number

    No problem. I'm glad I could help!

  • RE: How to force SQL Server to select not from master?

    Just use this: SELECT OBJECT_DEFINITION(OBJECT_ID('sys.server_principals'))

    --Or whatever system view you're interested in

    Just be warned that even connected to the DAC you won't always be able to run the underlying queries...

  • RE: SQL2012 rank into predefine number

    Indeed. NTILE() sounds like what you're looking for. See https://msdn.microsoft.com/en-us/library/ms175126.aspx for the documentation.

    Then your code becomes something like this:

    WITH tt AS (

    SELECT 'DON, GELDON'AGENT_NAME,10030AGENT_ID,0.46PERC UNION

    SELECT 'IVAN, MO'AGENT_NAME,33330AGENT_ID,0.83PERC UNION

    SELECT 'JOHN,...

  • RE: sqlserver 2012 restore

    No. Features like data compression and partitioning are features only available in Enterprise edition.

    If the Enterprise edition database is using those features, then you will not be able to restore...

  • RE: sqlserver 2012 restore

    It is possible, so long as the DB has no Enterprise-only features enabled (compression or partitioning, for example).

    You can check by running this in the database on the Enterprise instance:

    SELECT...

  • RE: How to force SQL Server to select not from master?

    Yes, you can RDP to the machine and use the client there. That's just the default behavior, though. You can allow remote admin connections by changing the configuration option of...

  • RE: How to force SQL Server to select not from master?

    I'm not sure restoring the resource database will actually do what you need. sys.servers, like other such system objects, is just a view that is logically available in the sys...

  • RE: Data Islands and Gaps - How To

    Steve,

    No problem! A second set of eyes is always nice to have, especially towards the end of a Friday 🙂

    Of the two working queries I posted, it's still a...

  • RE: Please Help - trying to eliminate "used tempdb to spill data"

    If my memory is correct, it will complain about not being able to use subqueries in that context, and requiring a scalar expression. It makes sense, since a query like...

  • RE: Data Islands and Gaps - How To

    sgmunson (7/10/2015)


    Ed,

    Applying the final query from the previous posts, to your situation, yields this:

    DECLARE @tags AS TABLE (

    TagNumber varchar(38),

    Prefix varchar(7),

    Number numeric(38,0)

    );

    INSERT INTO @tags (TagNumber, Prefix, Number)

    VALUES

    ('840003008335608','8400030',8335608)

    ,('840003008335609','8400030',8335609)

    ,('840003008335610','8400030',8335610)

    ,('840003008335611','8400030',8335611)

    ,('840003008335612','8400030',8335612)

    ,('840003008335613','8400030',8335613)

    ,('840003108335614','8400031',8335614)

    ,('840003108335615','8400031',8335615)

    ,('840003108335616','8400031',8335616)

    ,('840003108335617','8400031',8335617)

    ,('91BDO2751','91BDO',2751)

    ,('91BDO2752','91BDO',2752)

    ,('91BDO2753','91BDO',2753)

    ,('91CQO2754','91CQO',2754)

    ,('91CQO2755','91CQO',2755)

    ,('91CQO2756','91CQO',2756)

    ,('91AEO2757','91AEO',2757)

    ,('91AEO2758','91AEO',2758)

    ,('91AEO2759','91AEO',2759)

    ,('91AEO2760','91AEO',2760);

    WITH cteGroup AS (

    SELECT T1.*,

    ConsecutiveGroup...

  • RE: Data Islands and Gaps - How To

    In the future, you'd probably be best served by just opening a new thread with your question.

    For now, though, here's my best explanation of why your query isn't doing what...

  • RE: Index question

    It has to scan because ReferenceNumber is not the primary sort of the key (it's the fourth sort, or "quaternary" if I want to be strange :-)).

    The order of the...

  • RE: Maintenance Cleanup Task not cleaning up

    What are the extensions of your backup files?

    The parameter for file extension is blank, so it would only delete any backup files that don't have an extension. If your files...

  • RE: High Availability index rebuilds

    And started our posts with "Ah"! My doppelganger! 🙂

Viewing 15 posts - 931 through 945 (of 1,192 total)