Forum Replies Created

Viewing 15 posts - 3,586 through 3,600 (of 8,731 total)

  • RE: ***SPOILER FREE*** Star Wars: The Force Awakens

    chrisn-585491 (12/21/2015)


    I'm glad y'all enjoyed it, but ethically I can't see Disney movies due to their treatment of IT workers.

    Where can I read about that?

  • RE: CTE Adding a value to a 'datetime' column caused an overflow

    Here's an alternative to generate the rows using cascade CTEs.

    I'm including a SQL 2012+ version which you might want to use if at all possible.

    WITH

    E(n) AS(

    ...

  • RE: Help with Cursors

    ChrisM@home (1/6/2016)


    Check your ANDs and ORs. They don't appear to make sense and your query is probably processing many more rows than it should. Use brackets where appropriate.

    You're right, I...

  • RE: Help with Cursors

    I don't have test data, but this should be equivalent to your code.

    SELECT LoanID

    INTO #Loans

    FROM srv.dbo.loan

    WHERE nextcoupondate <= convert(VARCHAR(10), dateadd(dd, 3, getdate()), 101)

    AND nextcoupondate > '4/10/2009'

    AND LoanID NOT IN (

    SELECT...

  • RE: Today's Random Word!

    crookj (1/6/2016)


    ZZartin (1/6/2016)


    whereisSQL? (1/6/2016)


    djj (1/6/2016)


    Ed Wagner (1/6/2016)


    Grumpy DBA (1/6/2016)


    Stuart Davies (1/6/2016)


    Ed Wagner (1/5/2016)


    Brook

    Benton

    Barbi

    Ken

    Kenworth

    Worthless

    Arcade

    Defender

    Avenger

  • RE: Pivot Data for multiple Strings

    Here's a nice short article about concatenating strings:

    http://www.sqlservercentral.com/articles/comma+separated+list/71700/

    Here's an example based on what you posted:

    WITH CTE AS(

    SELECT DISTINCT ID1, ID2, ID3

    FROM #Source

    )

    SELECT...

  • RE: Selecting a decimal

    Hugo Kornelis (1/6/2016)


    sql_only (1/6/2016)


    why does

    DECLARE @phi DECIMAL = (SQRT(5)+1)/2

    SELECT @phi;

    return 2

    and not 1.618

    Integer math.

    The data used as input in the formula are all integers, so the intermediate results are computed...

  • RE: SYNTAX help on getting the STORED PROC Definition

    mw112009 (1/5/2016)


    Folks

    I know this can be done but I am not sure what system tables/views need to be accessed.

    I want to get the stored proc name and stored proc definition...

  • RE: SQL Server Management Studio

    river1 (1/5/2016)


    Hi,

    I installed SQL Server MS.

    When I try to register (through registred servers) my SSAS I don't get that option.

    Whit SQL 2012 tools the option is available.

    CAn someone help?

    Thanks,

    Pedro

    Are you...

  • RE: Repeating process for X number of records/times

    This could be a safer approach to prevent unwanted duplicate rows.

    WITH cteVessels AS(

    --Change this code to something that won't need the DISTINCT

    SELECT...

  • RE: Crosstab Query

    If anyone else is interested, here's a corrected version of the sample data that actually returns something (other than errors).

    CREATE TABLE [dbo].[TblAppointments](

    [ID] [int] IDENTITY(1,1) NOT NULL,

    [ClientID] [int] NOT NULL,

    [ApptDate] [date]...

  • RE: Crosstab Query

    Tallboy (1/4/2016)


    Hi Luis, I am sure there is nothing wrong with it, but I am a SQL beginner and am finding dynamic sql quite confusing. I need something very...

  • RE: Study Materials for Exam 70-465 "Designing Database Solutions for Microsoft SQL Server"

    FridayNightGiant (1/4/2016)


    Reported the post above as Spam. Don't use brain dumps you will be caught out in the real world.

    Get a copy of SQL Development edition onto your laptop and...

  • RE: Crosstab Query

    What's the problem with the code that I posted in your previous thread?

    http://www.sqlservercentral.com/Forums/FindPost1748928.aspx

    Dynamic SQL is the only way to go if the columns will vary in number or names.

  • RE: Recursive with a check point

    I would try both approaches to see which perform better with your data.

    WITH

    cte_PartsOrder AS (

    SELECT

    o.orderid,

    o.part,

    node = 1,

    ...

Viewing 15 posts - 3,586 through 3,600 (of 8,731 total)