Forum Replies Created

Viewing 15 posts - 5,641 through 5,655 (of 10,144 total)

  • RE: how to select active inventory

    Andy Hyslop (9/14/2012)


    Ninety minutes to beer o'clock and focus is slipping

    Judging by my last post I think mine is out of the door and at the pub already!! 😉

    Heh right...

  • RE: UniqueIdentifier as a Primary Key

    IgorMi (9/14/2012)


    SQL Kiwi (9/14/2012)


    ChrisM@Work (9/14/2012)


    [font="Courier New"]

    Table Ind_level External Fragm(%) Avg Frag Size Page_count Internal Fragm(%) Ind_size (KB)

    identity ...

  • RE: how to select active inventory

    Andy Hyslop (9/14/2012)


    ChrisM@Work (9/14/2012)


    Andy Hyslop (9/14/2012)


    ChrisM@Work (9/14/2012)


    SELECT i.*

    FROM tbItems i

    CROSS APPLY (

    SELECT [active inventory] = CASE

    WHEN Solddate >= CONVERT(DATETIME,'01/11/2011',103)

    AND Solddate < CONVERT(DATETIME,'01/12/2011',103) THEN 1

    WHEN Purchasedate >= CONVERT(DATETIME,'01/11/2011',103)

    AND...

  • RE: how to select active inventory

    Andy Hyslop (9/14/2012)


    ChrisM@Work (9/14/2012)


    SELECT i.*

    FROM tbItems i

    CROSS APPLY (

    SELECT [active inventory] = CASE

    WHEN Solddate >= CONVERT(DATETIME,'01/11/2011',103)

    AND Solddate < CONVERT(DATETIME,'01/12/2011',103) THEN 1

    WHEN Purchasedate >= CONVERT(DATETIME,'01/11/2011',103)

    AND Purchasedate < CONVERT(DATETIME,'01/12/2011',103)...

  • RE: how to select active inventory

    SELECT i.*

    FROM tbItems i

    CROSS APPLY (

    SELECT [active inventory] = CASE

    WHEN Solddate >= CONVERT(DATETIME,'01/11/2011',103)

    AND Solddate < CONVERT(DATETIME,'01/12/2011',103) THEN 1

    WHEN Purchasedate >= CONVERT(DATETIME,'01/11/2011',103)

    AND Purchasedate < CONVERT(DATETIME,'01/12/2011',103)

    AND Solddate IS...

  • RE: Need help with SQL Query

    denis.gendera (8/31/2012)


    I've got following query

    select machine_id, MONTHS =

    CASE

    WHEN DATEDIFF("m", firstseen, getdate()) = 0 then 'AUG'

    ...

  • RE: UniqueIdentifier as a Primary Key

    "Internal fragmentation" = "average page density", although the latter seems more sensible to me.

  • RE: UniqueIdentifier as a Primary Key

    SQL Kiwi (9/14/2012)


    IgorMi (9/13/2012)


    The above from BOL has proved true in a test i did some weeks ago. I wanted to see the fragmentation, page counts, index sizes for int,...

  • RE: DeadLOck on Primary Key

    Two stored procedures are run at the same time by agent jobs.

    SystemCheck2.dbo.sp_IMPORT_UTILITY_RUN_PROCESS_tb_Import_Data

    - UPDATE [dbo].[tb_Import_Data]

    SystemCheck2.dbo.sp_IMPORT_CLEAN_tb_Import_Data

    - Copy rows FROM tb_Import_Data i to [dbo].[tb_ARCHIVE_Import_Data]

    They should be run serially with the...

  • RE: T-SQL Help Needed

    aaron.reese (9/13/2012)


    [

    If I create a table to look up state codes ('AL', 'AK', etc.), I use state code as the key, not a meaningless identity value.

    fine, but if you are...

  • RE: T-SQL Help Needed

    Eugene Elutin (9/12/2012)


    ...Even DNA is not 100% unique ...

    For us humans, and you too Eugene, it is - even for so-called "identical twins".

    Eugene Elutin (9/12/2012)


    ...(that is why forensic DNA-result doesn't...

  • RE: Stored procedure performance improvement

    Luhar (9/14/2012)


    we have 4 million records in our test db

    How to delete them batch wise....Can you gimme a hint

    Here's a useful script which Lynn Pettis prepared earlier: http://www.sqlservercentral.com/Forums/FindPost1357526.aspx

    You have 4...

  • RE: subqueries in sql server2000

    raghuldrag (9/13/2012)


    Hai friends ,

    i ve one doubt in subqueries in oracle

    select col1,col2 from @tab1 where(col2,col3) in(select col2,min(col3) from @tab1 group by col2)

    while i am executing these...

  • RE: Stored procedure performance improvement

    Luhar (9/13/2012)


    I am not running it in transaction.

    No one will access the DB when this procedure runs as it runs nightly.

    I just want to modify the procedure so as...

  • RE: Archiving...INSERT & DELETE

    oscarooko (9/13/2012)


    ...

    Folks, thanks for the help. i have solved the issue, and more importantly, I learned a few new tricks from you. Mine was mostly a case of poor design....

Viewing 15 posts - 5,641 through 5,655 (of 10,144 total)