Forum Replies Created

Viewing 15 posts - 16 through 30 (of 56 total)

  • RE: Primary and Foriegn Keys on Temp Tables

    CREATE TABLE TableTest1 (

    ID INT NOT NULL,

    CONSTRAINT PK_ID1 PRIMARY KEY(ID)

    );

    CREATE TABLE #TableTest2 (

    ID INT NOT NULL

    CONSTRAINT FK_TableTest1_ID FOREIGN KEY (ID) REFERENCES TableTest1(ID)

    );

    INSERT INTO TableTest1 (ID)

    VALUES

    (1);

    INSERT INTO #TableTest2 (ID)

    VALUES

    (2);

    select * from...

    --------------------------------------
    ;-)“Everything has beauty, but not everyone sees it.” ― Confucius

  • RE: Lots of inserts? Part I

    Thank you George Vobr, you are right, but if you do not use tempdb, it will not give you the information. The @@trancount will do.

    --------------------------------------
    ;-)“Everything has beauty, but not everyone sees it.” ― Confucius

  • RE: Lots of inserts? Part I

    If I use #tbl for insert values, and use 'dbcc opentran' to see the active transactions, it give me

    No active open transactions.

    DBCC execution completed. If DBCC printed error messages,...

    --------------------------------------
    ;-)“Everything has beauty, but not everyone sees it.” ― Confucius

  • RE: When we auto update statistics on small tables

    http://www.sqlskills.com/blogs/erin/understanding-when-statistics-will-automatically-update/

    --------------------------------------
    ;-)“Everything has beauty, but not everyone sees it.” ― Confucius

  • RE: The Path

    The question did not tell us what data type and how many characters it is. So the correcter answer will be depend on. for example:

    declare @myString char(12);

    set @myString...

    --------------------------------------
    ;-)“Everything has beauty, but not everyone sees it.” ― Confucius

  • RE: Casting

    Don, you are right, we should try only use explicit conversion for better performance.

    --------------------------------------
    ;-)“Everything has beauty, but not everyone sees it.” ― Confucius

  • RE: Casting

    try select cast('19.4615381' * -1.0 *1.00000 as numeric(18,6))

    --------------------------------------
    ;-)“Everything has beauty, but not everyone sees it.” ― Confucius

  • RE: Round

    How About

    SELECT ROUND($0.999,1)

    And

    SELECT ROUND(0.999,$3)

    ?

    --------------------------------------
    ;-)“Everything has beauty, but not everyone sees it.” ― Confucius

  • RE: Counting Rows

    If change count(1) to SUM(id), it return NULL and why?

    --------------------------------------
    ;-)“Everything has beauty, but not everyone sees it.” ― Confucius

  • RE: Size of view

    Every Problem has a Solution; Every Solution has a Problem: Smile:-P

    --------------------------------------
    ;-)“Everything has beauty, but not everyone sees it.” ― Confucius

  • RE: Reporting Services: Drawing a Buffer on a Map

    Do not realized need to use Sql Server 2012 forward version. Is it possible to do same thing in SSRS 2008 R2?

    --------------------------------------
    ;-)“Everything has beauty, but not everyone sees it.” ― Confucius

  • RE: The Big Bit

    How about BIT = 0&1|1%2; '' ; & ....?

    --------------------------------------
    ;-)“Everything has beauty, but not everyone sees it.” ― Confucius

  • RE: Extract the titles from XML

    try './/Book'

    --------------------------------------
    ;-)“Everything has beauty, but not everyone sees it.” ― Confucius

  • RE: COALESCE in Left Join

    How about use ISNULL?

    -- Q3

    SELECT

    *

    FROM

    #abc a

    ...

    --------------------------------------
    ;-)“Everything has beauty, but not everyone sees it.” ― Confucius

  • RE: Using APPLY to make your queries DRYer

    Can we use Group By 1,2,3, ... to make query DRYer it?

    --------------------------------------
    ;-)“Everything has beauty, but not everyone sees it.” ― Confucius

Viewing 15 posts - 16 through 30 (of 56 total)