Forum Replies Created

Viewing 15 posts - 46 through 60 (of 78 total)

  • RE: "Per-user" temp table

    Well, if you are not sure how they will search data, what about if they will specify not selective condition. For example smth like "gender=F" or "field like 'a%' ",...

  • RE: "Per-user" temp table

    Gazareth,

    Yes, exactly what I meant, thx!

    pdanes,

    Now I understand what are you trying to do, and my idea with temp table (even it is technically possible, and even if you'll find...

  • RE: Difference in query cost for parameterized query---?

    SQL* (8/9/2012)


    hi All,

    I am learning sql server optimization,

    declare @p1 int

    set @p1 = 1

    SELECT ProductID, SalesOrderID--, LineNumber

    FROM Sales.SalesOrderDetail

    WHERE ProductID > 1

    ORDER BY ProductID

    SELECT ProductID, SalesOrderID--, LineNumber...

  • RE: SQL Sever Client

    vineet.007.mm (8/8/2012)


    I am working on sql server 2008. I don't want to give complete sql server 2008 to my clients. Is there any client version available for sql server 2008,...

  • RE: "Per-user" temp table

    And what about creating temp table outside of the SP, just with command create table directly?

    Anyway, I'd like to note that this approach maybe not so good.

    Think, what will happen...

  • RE: Can we create primary key without any index (clustered/ non-clustered) applied on it?

    bala.sevva (8/9/2012)


    Thanks for your thoguhts ..

    I believed that Primary key needs an index (clustred/ non-clustred) but wanted to see if we can create it without index.

    I have attempted with...

  • RE: Can we create primary key without any index (clustered/ non-clustered) applied on it?

    Hi! You can have a non-clustered primary key. All you have to do is make your column not nullable and it should be unique.

    create table t1(date datetime, id int);

    create clustered...

  • RE: "Per-user" temp table

    What about creating temp table not inside stored procedure.

    create proc proc1

    as

    select * from #t1

    go

    For example, opening connection, creating temp table, executing procedure

    create table #t1(a int);

    insert #t1 values(1);

    exec proc1

    You may also...

  • RE: How to get inputer parameter value inside the stored procedure

    Could you please clarify your question? What do you mean by "get" parameter? Get for what purpose?

    If you want to display it for debug purpose you may use "print(@myParam)", or...

  • RE: Triggers

    Good task! It has some not so obvious pitfalls, and not so easy as it may seem from the first look, imho.

    Here is my notes about what should be taken...

  • RE: Date Format Problem

    SET DATEFORMAT is responsible for how character strings are interpreted when converted to datetime. It's not resposible for the way db stores datetime values, and not responsible for how these...

  • RE: What is the performance bottleneck here?

    Maybe it is worth trying, to create primary key on #InstitutionChild.childaid if there isn't.

    In general, without plans, all that is pure guess work, imho.

  • RE: How do I pad a delimited number?

    Here is one more

    with t(v) as ( select '0008.22816' union all select '069.3142' )

    select

    [formattted] =

    replace(str(parsename(t.v,2),7),' ','0') + '.' +

    replace(str(parsename(t.v,1),7),' ','0'),

    *

    from t

    Also, be aware that all presented solutions will fail...

  • RE: What is the performance bottleneck here?

    It will be much more helpful, if you provide an Actual Execution Plan (in xml) for this slow query. If this is not a slow query by it self, but...

  • RE: Addition Of Digits

    Well, I do all the tests on my local work machine, 3.3GHz-4 core, 3 GB RAM. SQL Server 2008R2 RTM.

    I have quite the same performance and the same plans for...

Viewing 15 posts - 46 through 60 (of 78 total)