Forum Replies Created

Viewing 15 posts - 7,666 through 7,680 (of 8,760 total)

  • RE: Bulk insert with SQLINT changes int vlaues

    terry999 (7/31/2014)


    Thanks

    Where do I put the -c I tried

    BULK INSERT tBCP FROM 'C:\temp\tbcp.csv'

    WITH (FORMATFILE='C:\temp\fmt.fmt', DATAFILETYPE='char')

    It doesn't work

    Ooops, my bad, I was thinking in bcp:-P

    Should be DATAFILETYPE = 'char'

    😎

  • RE: common Table(cte) in store procedure?

    Sivaganesh Tamilvendhan (7/31/2014)


    Hi,

    while writing store procedure in db

    most of Time i will Use common Table to write select quries

    for selecting more than seven table whether...

  • RE: Bulk insert with SQLINT changes int vlaues

    You might want to add -c (character format) as it looks like it is using native (-n) format.

    The 21 -> 50 49 -> 12594 is because it translates the character...

  • RE: Bulk insert with SQLINT changes int vlaues

    Quick question, does 7 get translated to 55? Looks like it is reading the character code values as the actual values, change it to SQLCHAR and then convert to int.

    😎

  • RE: Group Count

    Do you mean something like this?

    😎

    select * from (

    select

    [MediaName]

    ,[Spend]

    ,[ClientName]

    ,[BookingYear]

    , ROW_NUMBER() OVER(ORDER BY [Spend] DESC) As Row

    from(

    select

    lhe.LHECRELongDesc as [MediaName]

    ,cast(sum(spo.SPODiscountedCost) as money) as [Spend]

    ,cli.CLILongDesc AS...

  • RE: HI...Sample INSERT statement script needed to insert 500 million rows into in-memory table sql server 2014

    Quick suggestion, create multiple views on the source server, i.e. vw_source_1_100000000, vw_source_100000001_200000000 etc. where you filter the rows into the right sized chunks.

    Then use the import/export thingy to append...

  • RE: How to Reduce the Table Size...

    Chowdary's (7/30/2014)


    Hi Eirikur Eiriksson,

    Pls find the below

    1. What is the output of this query?

    A:Enterprise Edition (64-bit),3

    2. Can you post the CREATE TABLE script for the table?

    A.PFA

    3. Is this a production...

  • RE: what do rows were affected mean

    That is a fair guess as the after trigger execution is appended to the insert statement in the execution plan.

    😎

  • RE: Today's Humor..

    Luis Cazares (7/30/2014)


    Alvin Ramard (7/30/2014)


    WAIT!!!! What kind of database MUST be repaired regularly???? :w00t:

    The one that is shrinked regularly?

    Guess shrinked is the simple mode and shrunken is the...

  • RE: what do rows were affected mean

    First suggestion is to set NOCOUNT ON to eliminate the unnecessary network traffic.

    The message can be from a select / update / insert / delete within the code, even "select...

  • RE: Today's Humor..

    Flash from the Access database passed :sick:

    😎

  • RE: Are the posted questions getting worse?

    Steve Jones - SSC Editor (7/30/2014)


    Lynn Pettis (7/30/2014)


    It should be noted as well, that sometimes people come to SSC and ask question(s) and then actually get upset when we try...

  • RE: sp_send_dbmail question

    Quick suggestion, if you are on SQL 2012 or later, use the concat function.

    😎

    DECLARE @recordcount INT = 007;

    DECLARE @mysubject varchar(500) = CONCAT('Number of unprocessed records on SQL1 ',@recordcount);

    SELECT @mysubject;

  • RE: Are the posted questions getting worse?

    Sean Lange (7/30/2014)


    Koen Verbeeck (7/30/2014)


    Anyway, if this SO discussion is going to endure any longer, we will reach 45,000 posts real quick 😀

    No kidding. I sure opened a can of...

  • RE: T-SQL to add 7 days to ship date

    Somehow messed up the order of the days, here is the correct code

    😎

    USE tempdb;

    GO

    DECLARE @Date DATE;

    /*SET @Date = GETDATE();*/

    SET @Date = '2014-08-07';

    DECLARE @TEST_DATA TABLE

    (

    DT_ID INT ...

Viewing 15 posts - 7,666 through 7,680 (of 8,760 total)