Forum Replies Created

Viewing 15 posts - 3,061 through 3,075 (of 8,731 total)

  • RE: find date value from file name

    What's wrong on using the script task code I gave you?

    In a single task you'd be validating and deleting. If you need to get the date by the name, that's...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: find date value from file name

    Would it work with the real creation time of the file by using a script?

    This code is untested, but it could give you an idea.

    Option Strict On

    Imports System

    Imports System.IO

    Imports System.Data

    Imports...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Run same query across many system tables

    This is a great place to use a cursor. You need to go table by table to get the desired results.

    Here's an example, just change the query text and you...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Set end date for a row to start date of next row minus 1 day

    I know that you're posting on the 2008 forum, but I'll include the 2012 option just in case.

    --SQL Server 2008/2005

    WITH CTE AS(

    SELECT *, ROW_NUMBER() OVER(PARTITION BY...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Today's Random Word!

    whereisSQL? (4/12/2016)


    Ed Wagner (4/12/2016)


    BWFC (4/12/2016)


    ThomasRushton (4/12/2016)


    Revenant (4/12/2016)


    ThomasRushton (4/12/2016)


    Manic Star (4/12/2016)


    whereisSQL? (4/12/2016)


    djj (4/12/2016)


    Grumpy DBA (4/12/2016)


    Ed Wagner (4/12/2016)


    San Francisco

    (left my) Heart

    Soul

    Train

    Tracks

    switch

    blade

    glory

    Blaze

    Fire

    Fighter

    Street

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: SQL Server Memory Settings

    Or without subqueries:

    SELECT TOP 1 @@servername AS Servername

    ,[min server memory (MB)] = MAX(CASE WHEN name = 'min server memory (MB)' THEN value END )

    ,[max server memory (MB)] = MAX(CASE WHEN...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Not sure what transform to use (how can I?)

    I would suggest to have a unique or primary key constraint in your target table to prevent the insertion of rows 14 and 15. As Phil said, there's no use...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Query Execution Plan, differs between environments

    I'd start by updating the statistics in your development server. Those seem very stale.

    Same queries in different environments can generate different execution plans because they have to adapt to the...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Today's Random Word!

    EL Jerry (4/11/2016)


    whereisSQL? (4/11/2016)


    crookj (4/11/2016)


    ZZartin (4/11/2016)


    Ed Wagner (4/11/2016)


    Ray K (4/11/2016)


    Revenant (4/11/2016)


    Grumpy DBA (4/11/2016)


    ThomasRushton (4/11/2016)


    Highlander

    Toyota

    Hybrid

    RAV4

    Accord

    Peace

    Necron 99

    Wizards

    Washington

    Apples

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Quick design question

    A year ago, someone else asked a question about a Movie Rental Database. Could this be the same school assignment?

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Quick design question

    sys.user (4/11/2016)


    Luis Cazares (4/11/2016)


    Are you sure your model makes a difference between Title/movie and DVDs/copies? Those are different entities.

    Well, since the original database was meant to work with single copies...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Quick design question

    Are you sure your model makes a difference between Title/movie and DVDs/copies? Those are different entities.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Help with PIVOT

    NineIron (4/11/2016)


    OK. Now for some more knowledge transfer..................this stored procedure containing the dynamic sql is used for an SSRS report. The dataset isn't pulling the fields because of issues with...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Help with PIVOT

    yb751 (4/11/2016)


    Pretty cool technique I learnt from Luis. 😉

    You just made my day 🙂

    I learned this concatenation method from Wayne Sheffield, which he explains it in here: http://www.sqlservercentral.com/articles/comma+separated+list/71700/

    And combined it...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Create 10,000 12 digit random numbers - starting with the number 7

    This method will allow you to get the 10,000 duplicates. Check the index option used, which would be needed and can only be used for PKs and UNIQUE indexes.

    CREATE TABLE...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2

Viewing 15 posts - 3,061 through 3,075 (of 8,731 total)