Forum Replies Created

Viewing 15 posts - 1,771 through 1,785 (of 1,957 total)

  • RE: Rollback statement missing

    Have you checked to make sure that the COMMIT/ROLLBACK in your stored proc is not affecting an existing transaction?

  • RE: Max date and associated row data

    dbuendiab (7/1/2010)


    I get your desired output just adding GROUP BY woi_product (changes bolded):

    SELECT woi_product, /*woi_ordref,*/ Max(wos_startdate) as wos_stardate

    FROM @woitem JOIN @xTOOLS

    ON...

  • RE: Reporting Services or .NET?

    As has been said before, it depends....

    SQLRS has many potential benefits - scheduled reporting, emailing, cahed report data, execution history to name a few....

    ASP.NET could be more flexible but you...

  • RE: Triggers

    I have had to do similar in the past in order to figure out what a third party application was doing in various business processes....

    I cannot share the code with...

  • RE: Max date and associated row data

    I am a bit busy now to do you a "good" answer, but if you just want something that works but is bad....

    SELECT tool,

    (SELECT TOP 1 wos_ordref

    ...

  • RE: Max date and associated row data

    mmcardle (6/28/2010)


    mister.magoo (6/28/2010)


    Try this

    Hi MM,

    Many many thanks for your reply.

    Sadly, I get a syntax errors on that:

    Server: Msg 156, Level 15, State 1, Line 3

    Incorrect syntax near the keyword 'OUTER'.

    Server:...

  • RE: Max date and associated row data

    Try this

    SELECT tool AS product, wos_ordref, wos_startdate

    FROM @xTOOLS

    OUTER APPLY (SELECT TOP 1 wos_ordref,wos_startdate

    FROM @wostage

    JOIN...

  • RE: Using Current_timestamp or sysdatetime

    mike 57299 (6/24/2010)


    mister.magoo:

    I don't understand how to use the profiler. Could you point me to a good resource.

    Thanks.

    Not really, sorry... I just learnt by trial and error. It's not...

  • RE: Using Current_timestamp or sysdatetime

    You can't really expect the value to change - the query will complete before it could....

    First, I will help you a little... add ",109" to the convert to show to...

  • RE: need to truncate to 2 decimals but not rounding

    murdakillemall (6/23/2010)


    satishseth143 (6/23/2010)


    Man ....this is superb....it worked great, but I could not get the logic. Can you please explain? Anyways thanks for that

    It looks like it's taking the original number...

  • RE: Export data into CSV file in unix format

    laddu4700 (6/23/2010)


    Thank you,

    But how to convert the CSV windows file into CSV (Unix format). Is there any feature in SQL Server, or any third party tools? Please let me know.

    In...

  • RE: CONDITIONAL SELECT - HELP

    You're welcome.

    Of course we have no idea about volume of data, so that may not be the best approach....but hopefully it gives you enough information to at least have a...

  • RE: CONDITIONAL SELECT - HELP

    Modified for SQL 2000 and new rules....

    Interestingly this produces the same execution plan (on SQL2008 using SQL 2000 compatible database) as the CTE with COUNT does on SQL2008 database...

    Create table...

  • RE: CONDITIONAL SELECT - HELP

    Ram:) (6/22/2010)


    Yes you are right. I think your script will work in 2008..

    But I am using 2000.

    I think in your code you are using order by..

    But I have priority...

  • RE: CONDITIONAL SELECT - HELP

    Just to add to the options.... using a count partitioned by Code to decide which records to select...

    ...Again using Cory's excellent test data...

    Create table #Test

    (SNO int identity(1,1), Code varchar(6), Amount...

Viewing 15 posts - 1,771 through 1,785 (of 1,957 total)