Forum Replies Created

Viewing 15 posts - 2,311 through 2,325 (of 8,731 total)

  • RE: Issue with inserting Case Statement

    Here's my suggestion:

    WITH CTE AS(

    SELECT pp.id AS pay_period_id,

    pr.employee_no,

    ...

  • RE: need to copy a 600 gig table

    Everything that changes data in a database writes to trans log.

    You might have some options to copy the table, but answer Eirikur's questions so we can have more details.

  • RE: sql server 2016 - Grant Fritchey

    Grant Fritchey (8/11/2016)


    That guy is really lazy and has not written a book on 2016.

    Are you sure? You better double check with him. :-D:hehe:

  • RE: What is wrong with this syntak ? Why am I getting this error

    CREATE SCHEMA must be the only statement in the batch.

    Weird enough, this is considered a single statement.

    CREATE SCHEMA CLAIM

    CREATE TABLE Claims( ClaimId int)

    CREATE TABLE OtherTable( OtherId int)

  • RE: BCP Utility - Usage

    SQL!$@w$0ME (8/10/2016)


    Thanks. Also, BCP or BULK INSERT? which is quicker and/or resource efficient?

    Test 😉

    Also, be aware that permissions are handled different between both options.

  • RE: BCP Utility - Usage

    SQL!$@w$0ME (8/10/2016)


    Thanks Luis. Is there a better option instead of BCP for bulk load from OLTP to Azure SQL datawarehouse.

    SSIS?

    There's no best option. You have to define it based on...

  • RE: Need to load date from datepart from a table to a file

    To get a specific format from a date into a file, you need to convert it to string.

    It's certainly easier to format with a SQL query than with SSIS. If...

  • RE: ssrs 2008 make parameter optional?

    Try this option: http://bfy.tw/79bE

  • RE: BCP Utility - Usage

    Phil Parkin (8/10/2016)


    SQL!$@w$0ME (8/10/2016)


    For bulk load from OLTP to Azure SQL datawarehouse, is this tool helpful or any other option?

    Thanks!

    Not really helpful, because neither of these is a data file.

    I...

  • RE: Additional table in statement with OUTER APPLY

    Here's an option. You can follow Phil's advice for a possible improvement on performance.

    Use MSDB

    Go

    Select j.name,

    j.[enabled],

    B.run_date as [Last_Run_Date],

    ...

  • RE: Summarising MONTH value

    Y.B. (8/10/2016)


    For your second requirement you can achieve that using a window function. If you want an example please provide DDL and sample data. Luis' signature has links...

  • RE: Today's Random Word!

    whereisSQL? (8/10/2016)


    Ed Wagner (8/10/2016)


    TomThomson (8/10/2016)


    crookj (8/10/2016)


    Ed Wagner (8/10/2016)


    djj (8/10/2016)


    Grumpy DBA (8/10/2016)


    crookj (8/10/2016)


    djj (8/10/2016)


    Feet

    Feat

    Agony (of defeat)

    Ecstasy

    Happy

    Dopey

    Sneezy

    Grumpy

    Doc

    Emmet Brown

  • RE: Error converting data type varchar to numeric

    Every output in a CASE statement should have the same type. When they don't SQL Server will try to do an implicit conversion following data type precedence.

    To prevent this error,...

  • RE: BCP Utility - Usage

    I haven't tested, but I've been told that it needs less resources and for that reason it run faster.

    Each system has different needs, so it shouldn't be considered better or...

  • RE: convert sum of seconds to time h:mm:ss

    drew.allen (8/9/2016)


    As long as you're under 24 hours you can use the following.

    DECLARE @duration_sec INT = 1300

    SELECT DATEADD(SECOND, @duration_sec, CAST('00:00' AS TIME))

    This method should work for any unit of time...

Viewing 15 posts - 2,311 through 2,325 (of 8,731 total)