Forum Replies Created

Viewing 15 posts - 136 through 150 (of 161 total)

  • RE: select bottom

    In order to get the top records you must be using the following syntax.....

    SELECT TOP n .......

    FROM.......

    ORDER BY [field]

    In order to get the 'last' records simply reverse the ORDER...

  • RE: Help with distinct lines

    You are quite right simon, you only need to join using the one field, providing that the alloc_num field is unique, which Avron has not confirmed.

  • RE: Help with distinct lines

    So why doesn't this work.....

    select allocdet.*

    from (select min(alloc_num) as alloc_num, price_num, serv_prlv, agent_num from allocdet group by price_num, serv_prlv, agent_num) a

    inner join allocdet on a.alloc_num = allocdet.alloc_num and a.price_num...

  • RE: Help with distinct lines

    Once you have performed the SELECT DISTINCT price_num, serv_prlv, agent_num.... you have a subset of the original table.

    If you then want to extract the information contained in the other fields...

  • RE: Help with distinct lines

    See if this works.......

    select allocdet.*

    from (select min(alloc_num) alloc_num, price_num, serv_prlv, agent_num from allocdet group by price_num, serv_prlv, agent_num) a

    inner join allocdet on a.alloc_num = allocdet.alloc_num...

  • RE: Parallelism Vs No Parallelism

    I would recommend that you use the index and allow SQL to perform the SP without use of parallelism.

    This will ensure that the other processor(s) are available for...

  • RE: best practice disk arrays

    A fiber attached SAN is going to perform at comparable performance to any locally attached storage.

    Most clustered solutions can only operate successfully by utilising SAN's, since the storage has to...

  • RE: best practice disk arrays

    I would suggest that BAD practise is to have no fault tolerance. Once you have fault tolerance in your system any further improvements you can make are normally a...

  • RE: best practice disk arrays

    As a general rule of thumb (before getting too complex).....

    The more performance you want - The more spindles (physical drives) you need!

    Also, with only a single drive, you have NO...

  • RE: Table variable or Temparary table (tempdb)

    Simon, can you please clarify where table variables are stored if not in memory (like any other variable).

    I have run traces while using table variables and no write operations are...

  • RE: Calling a function from linked SQL Server

    You normally have to specify the user name (e.g. dbo) when calling a UDF.

    Have you tried......

    SELECT * FROM TSTCMDDB1..dbo.usysprocess(51)

    ....only a guess!

  • RE: disabling a Trigger

    Since the trigger is obviously built on a specific table in your database you may like to consider adding a bit column to your table to indicate whether to fire...

  • RE: creating dynamic table name

    I think you should be able to do this with dynamic sql.

    declare @s1 as char(6)

    declare @sql as varchar(8000)

    set @s1 = '11_2002'

    set @sql = 'CREATE TABLE ' + @s1 +

    '...

  • RE: Sorting alphanumeric columns in sql server 7

    I think this should work, even if it isnt the most elegent solution = you just have to ignore the sequence column in the results.

    select grade,

    case ascii(right(grade, 1))

    when 43...

  • RE: Retrieve error on temporary table

    I can't say that I fully understand the specifics of the errors you are receiving but as a work around have you tried using a table variable.

    In many cases table...

Viewing 15 posts - 136 through 150 (of 161 total)