Forum Replies Created

Viewing 15 posts - 631 through 645 (of 844 total)

  • RE: SSIS Data Flow "bulk insert" VS. INSERT INTO

    Results after creating table and database:

    checkDatenamedatabase_idcreate_datefile_typedb_file_namedb_file_size

    2014-11-19 09:42:22.460db_work1152014-11-19 09:41:46.597ROWSdb_work4096

    2014-11-19 09:42:22.460db_work1152014-11-19 09:41:46.597LOGdb_work_log1024

    Results after insert into:

    checkDatenamedatabase_idcreate_datefile_typedb_file_namedb_file_size

    2014-11-19 09:43:58.207db_work1152014-11-19 09:41:46.597ROWSdb_work19456

    2014-11-19 09:43:58.207db_work1152014-11-19 09:41:46.597LOGdb_work_log76216

    I then deleted the table and database, then recreated them. Ran the SQL...

  • RE: SSIS Data Flow "bulk insert" VS. INSERT INTO

    SQL to create the database and table:

    DROP DATABASE db_work

    ;

    CREATE DATABASE db_work

    ;

    USE db_work;

    CREATE TABLE target_table

    (

    pNum CHAR(100),

    pMod INT

    )

    ;

    The Insert Into statement:

    INSERT INTO db_work.dbo.target_table

    SELECT pNum,

    pMod

    FROM source_db.dbo.source_table

    ;

    The log file size check SQL:

    SELECTGETDATE() AS...

  • RE: SSIS Data Flow "bulk insert" VS. INSERT INTO

    I'm having issues again posting SQL code here.

    But thanks for the link. This tells me for most of what we do some logging is still going to occur, tables...

  • RE: SSIS Data Flow "bulk insert" VS. INSERT INTO

    I got a little more detail on how this was tested today. The first thing that was done was to create a new database and a new empty table...

  • RE: Back again with more stored procedure troubles

    Don't feel bad about hating stored procedures, there are others that prefer not to use them. 🙂 That being said they do have a purpose and aren't that much...

  • RE: String Search

    I had to attach the SQL in the text file, some reason it wouldn't allow me to post it.

  • RE: String Search

    No I didn't try anything other than the database and what I wanted to search for. Just tried on a real small database, got it back in less than...

  • RE: String Search

    OK this isn't the same SQL, this is something I got back in March, probably from this site, didn't keep who wrote it, sorry about that, I'm trying to do...

  • RE: String Search

    Sean Smith-776614 (10/22/2014)


    below86 (10/22/2014)


    I like the idea of this but the only issue I have is this, If I want to run this against our production warehouse I'm not going...

  • RE: String Search

    I like the idea of this but the only issue I have is this, If I want to run this against our production warehouse I'm not going to have rights...

  • RE: When if ever would you following a JOIN ON clause with an AND instead of WHERE?

    To me it looks like someone was looking to add the code persontype = 'sp', but just put it in the wrong place. I've seen code like that before,...

  • RE: Ranking

    What I see as another trick question. In your example data you see before answering the question you have values that would give you the rankings of:

    CustomerIDRank

    4 ...

  • RE: How Many Different Random Numbers?

    ross.chang (9/30/2014)


    I got a distinct of 6 different values from SQL Server 2012:

    0.713591993212924

    0.713591993212924

    0.713591993212924

    0.713647892126698

    0.713647892126698

    0.713647892126698

    0.713647892126698

    0.713722424011731

    0.713722424011731

    0.713722424011731

    0.713722424011731

    0.713722424011731

    0.713722424011731

    0.713722424011731

    0.713852854810538

    0.713871487781797

    0.713871487781797

    0.713908753724313

    0.713908753724313

    0.713908753724313

    I got the same thing.

  • RE: Trying to set variable to last day of current month, but seeing NULL instead of 28, 30 or 31?

    pietlinden (9/28/2014)


    DECLARE @currMonthNum INT,

    @lastDayMonth INT

    SET @currMonthNum = DATEPART(MM, GETDATE())

    IF @currMonthNum IN (1, 3, 5, 7, 8, 10, 12)

    SET @lastDayMonth = 31

    IF @currMonthNum = 2

    SET @lastDayMonth = 28

    IF @currMonthNum IN (4,...

  • RE: Trying to set variable to last day of current month, but seeing NULL instead of 28, 30 or 31?

    How about one more version?

    SELECT DATEPART(DD, DATEADD(DD, -1, DATEADD(MM, 1, DATEADD(DD, -(DATEPART(DD, GETDATE()) -1), GETDATE()))))

Viewing 15 posts - 631 through 645 (of 844 total)