Forum Replies Created

Viewing 15 posts - 2,041 through 2,055 (of 10,144 total)

  • RE: Removing cursor..help please

    Junglee_George (10/16/2015)


    Hello

    I need help in removing cursor in my table valued function with alternate code. Thanks in advance.

    ALTER FUNCTION [dbo].[eufn_e5_eSM_SE_GetCurrentContentForContainer]

    (

    @containerSqlId SMALLINT,

    @containerIncId INT

    )

    RETURNS @Results TABLE

    (

    itemSqlId SMALLINT,

    itemIncId INT,

    itemMetaTableSqlId SMALLINT,

    itemMetaTableIncId INT

    )

    AS

    BEGIN

    ---- Get static...

  • RE: Are the posted questions getting worse?

    BL0B_EATER (10/16/2015)


    GilaMonster (10/16/2015)


    Eirikur Eiriksson (10/16/2015)


    GilaMonster (10/15/2015)


    Oh, and the bloody desktop booted clean to windows on the first try tonight and is behaving itself...

    Did you just upgrade to Windows 10?

    Err, no.

    win10...

  • RE: Which is more efficient? WHERE SUBSTRING = ...or... WHERE fldField LIKE 'x%'

    _watching (10/16/2015)


    Did you read Matt Miller's comment a few posts above? Try making the query SARGable, re test and post the results.

    With all due respect, anyone is just as capable...

  • RE: Which is more efficient? WHERE SUBSTRING = ...or... WHERE fldField LIKE 'x%'

    _watching (10/16/2015)


    Did you read Matt Miller's comment a few posts above? Try making the query SARGable, re test and post the results.

    With all due respect, anyone is just as capable...

  • RE: Which is more efficient? WHERE SUBSTRING = ...or... WHERE fldField LIKE 'x%'

    Jeff Moden (10/15/2015)


    To be honest, I trust no one that uses pure RBAR to create test data nor do I trust fixed width/grooved test data where the data is usually...

  • RE: Problems with duplicates

    fernando.arias (10/15/2015)


    Thanks!

    Though it doesnt delete the duplicates with the codes that you all have been so kind to give me.

    This (below) doesn't result in deleting all the dups. I only...

  • RE: select

    DamianC (10/15/2015)


    Hi

    Just realised there are no indexes on this table so this is what I have:

    SET ANSI_NULLS ON

    GO

    SET QUOTED_IDENTIFIER ON

    GO

    SET ANSI_PADDING ON

    GO

    CREATE TABLE [dbo].[E_DIM_POLICY_HOLDER](

    [POLICY_HOLDER_BKEY] [varchar](255) NULL,

    [POLICY_HOLDER_NAME] [varchar](255) NULL,

    [POLICY_HOLDER_SHORTNAME] [char](255) NULL,

    [POLICY_HOLDER_TYPE]...

  • RE: select

    DamianC (10/15/2015)


    Hello

    I have a relatively small table (around 400k records; 9 columns, all varchar(255)), that takes a long time to select from and I don't know why

    Tried the following:

    select *...

  • RE: Differences between LIKE and LEFT/RIGHT selects

    _watching (7/6/2014)


    0 down vote

    "Left" vs "Like" -- one should always use "Like" when possible where indexes are implemented because "Like" is not a function and therefore can utilize any indexes...

  • RE: Which is more efficient? WHERE SUBSTRING = ...or... WHERE fldField LIKE 'x%'

    _watching (10/14/2015)


    If you're interested in updated speed comparisons on how fast each is (well, on SQL 2014 anyway), this ➡ LIKE vs SUBSTRING vs LEFT/RIGHT vs CHARINDEX article with benchmarks...

  • RE: Problems with duplicates

    SELECT *

    INTO #FernandosData

    FROM (VALUES

    (1, 44, 'Aaron Downey', '2008-2009', 'DET', '1974-08-27', 'Shelburne'),

    (2, 44, 'Aaron Downey', '2001-2002', 'CHI', '1974-08-27', 'Shelburne'),

    (3, 44, 'Aaron Downey', '2006-2007', 'MTL', '1974-08-27', 'Shelburne'),...

  • RE: Problems with duplicates

    fernando.arias (10/15/2015)


    Hi

    I am having some problems coding with sql. Very new at this. I'm using sql server 2014.

    Anyway, I want to clean my table which have seveal duplicates in the...

  • RE: performance improvement

    sushil_dwid (10/14/2015)


    I can not create cluster because it has duplicate records

    Clustered indexes don't have to be unique.

  • RE: Simplifying while loop query

    rs80 (10/14/2015)


    But doesn't CROSS APPLY have a different purpose than CROSS JOIN?

    CROSS APPLY dbo.InlineTableValuedFunction (parameters)

    I guess might be the standard usage of APPLY. So replace the tablesource dbo.InlineTableValuedFunction with an...

  • RE: Simplifying while loop query

    rs80 (10/14/2015)


    Thanks for your reply Chris.

    Based on what I'm trying to achieve, cross JOIN seems to be the correct way instead of cross APPLY. I'm referencing this explaination: http://www.sqlservercentral.com/Forums/Topic843768-8-1.aspx

    Please...

Viewing 15 posts - 2,041 through 2,055 (of 10,144 total)