Forum Replies Created

Viewing 15 posts - 1,036 through 1,050 (of 6,036 total)

  • RE: t-sql 2012 possible join to same table

    declare @Year varchar(10) = '16'.

    select *

    FROM test1 t1

    INNER JOIN test t2 WHERE t2.col LIKE '%-' + @Year

    WHERE t1.Col LIKE @Year + '-%'

  • RE: Performance issue with nested query

    You must have the derived table joined to something else.

    It may cause all sorts of issues which I don't see the reason to list.

    If you post the whole query and...

  • RE: Identify if index exists on partition function

    Index name is not a really good indicator of index existence.

    You may have many identical indexes, all with different names.

    To check if an index with the same structure as you...

  • RE: Passing temp table from one stored procedure to another

    Is it what you're after?

    IF OBJECT_ID('Proc2') is null

    exec ('CREATE PROC Proc2 as SELECT 1 as One')

    GO

    ALTER PROC Proc2

    AS

    IF OBJECT_ID('tempdb..#TempTable') IS NOT NULL

    SELECT * FROM #TempTable

    GO

    IF OBJECT_ID('Proc1')...

  • RE: Finally, Create or Alter

    The code defines only the metadata.

    Apart from metadata there is user data in any table.

    What happens to it when you execute "create or alter"?

    What if the code does not contain...

  • RE: What is Normal?

    ZZartin (11/29/2016)


    This depends on source and target and how the information is being used. I would consider a surrogate key anything that is generated in the target system as...

  • RE: What is Normal?

    dalland (11/28/2016)


    Sergiy (11/28/2016)


    Would you agree with such definition of the surrogate key?

    No I would not a agree, as I already explained.

    You mean this?

    The essential feature of a "natural" key is...

  • RE: What is Normal?

    dalland (11/28/2016)


    Sergiy, your approach seems to amount to "everything is a surrogate". There's no point me disagreeing with that. If that's your opinion then I guess this part of the...

  • RE: What is Normal?

    dalland (11/28/2016)


    Sergiy,

    All data in a database consists of "artificial" symbols assigned by machines or human beings. There are no exceptions. In that very broad sense keys are always surrogates for...

  • RE: What is Normal?

    dalland (11/28/2016)


    Some very familiar examples of potential business keys are: login names, invoice numbers, order numbers, flight numbers, vehicle registrations.

    1. Not sure what login identifies, apart from login itself....

  • RE: What is Normal?

    If you think of it, those SSN, NIN, tax registration numbers, etc., are not natural keys, they all are artificial numbers, auto-generated by some kind of computing system.

    They are the...

  • RE: What is Normal?

    RonKyle (11/27/2016)


    In most cases there isn't one.

    I really have trouble understanding why you would say that.

    Ok, I'll change it to "in many cases." My point was that it seems...

  • RE: Clustered Index on datetimeoffset?

    One of the biggest questions here is - how do you query the table?

    Can you post one of the typical queries which use a filter on that datetimeoffset column?

  • RE: What is Normal?

    RonKyle (11/23/2016)


    What is you natural key for "person" records?

    In most cases there isn't one. I would certainly never use an SSN for this. But that doesn't mean that...

  • RE: app development - sql backend.

    "10 tables, 3000 rows" is not the scale which could possibly justify choice of such an expensive (in all meanings) tool as SQL Server.

    It's not even enough for Access.

    An Excel...

Viewing 15 posts - 1,036 through 1,050 (of 6,036 total)