Forum Replies Created

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

  • RE: Slow performance of update statement

    If your update takes 11 seconds consistently, but selects instantly then it sounds like the query is having to do a lot of locking before it can commit.

    But without knowing...

  • RE: Comparison of two tables

    Murad

    Why not try casting the fields in a lowest common denominator kind of way to compare them.

    This kind of idea...

    select

    t1.key1,

    t1.val1 as table1_val1,

    t2.val1 as...

  • RE: SQL Server 200, XML and XSL

    Pranav

    XSL is used to change the presentation of XML data, so I can't see how (or why) you would want to do this.

    Apply the XSL to transform the data when...

  • RE: Using variables within IN

    demos

    If the variable really is '1' or '1,2,3' then you will need to build up a sql statement in a string then use sp_executesql to execute the string.

    declare

  • RE: SQL Server 2000/ SQLXML

    Fascinating have I fallen into a alt.sports.boer newsgroup by mistake?

    You'll need to do

    Select * from (tablename) as ROOT for XML Auto, Elements

    if you want <ROOT> around your output.

  • RE: Tables with tree structure

    A standard recursive call would involve a cursor but that is a dirty word on this forum.

    Depending on the target application you could use a 'fragment caching' technique. Fragment...

  • RE: This is a toughy!

    Not sure if it will work. Also if you don't specify the table name etc. the optimiser will have trouble compiling the function and you may not get many...

  • RE: Paging in ASP

    Do you remember where you read that order by might not work?

    I realise that you are pointing out that it is in 'insert' or 'select into' but it...

  • RE: Paging in ASP

    Crappy

    Why don't you add an identity column to your temp table and then select between key values

    ie

    create table #temp (id_no identity (1,1), val varchar(50))

    <insert your data>

    for first ten

    select val from...

  • RE: Putting result of select for xml into a variable

    Well if you want column names you could use sysobjects and syscolumns like

    SELECT syscolumns.*

    FROM

    sysobjects

    join syscolumns on sysobjects.[id]=syscolumns.[id]

    where sysobjects.[name]=<tablename>

    bung the output into a temp table, loop round from 1 to...

  • RE: TOP 5 Projects for Employees

    As NPeeters pointed out a correlated subquery is the best way forward. Another option (less good) is to use derived tables.

  • RE: How to get sequence number?

    Just read Antares reply (amazing that replies can happen while you are writing) and he is right you can use identity fields and temp tables.

  • RE: How to get sequence number?

    Hi

    Using a correlated subquery should do the trick. It works by counting the number of values that are less than or equal to the current value (in this...

  • RE: Book recommendation

    Perhaps the site owners could make a feature of favourite books, when I'm buying from Amazon (or almost anywhere online) I always check out reviews and pick out the most...

  • RE: for xml generates annoying header guid

    Create your own psuedo-for-xml command and you can do waht you like with the header.

    declare @XML nvarchar(4000)

    set @XML=(select '<customers><CustomerId>' + customerId + '</CustomerId><CompanyName>' + CompanyName + '</CompanyName></customers>' from customers where...

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