Forum Replies Created

Viewing 15 posts - 181 through 195 (of 321 total)

  • RE: filter within procedure

    if you put left you will get all rows even if they don't have rows in FOO

  • RE: How to generate primary Keys?

    autonomous transaction pragma

    I think is equivalent to transaction in TSQL

    so you will need

    BEGIN TRANSACTION

      your code

    IF @@ error=0

    COMMIT TRANSACTION

    ELSE

    ROLLBACK TRANSACTIOn

  • RE: filter within procedure

    If FOO has ROWS all the time and you fill fiedls values for responses

    BEGIN

     SET NOCOUNT ON

     DECLARE @sql varchar(600)

     SET @sql =

     'Select distinct

       Events.num1,

       Events.num2,

       Events.num3

      From Events

       Inner Join EventMembers On EventMembers.num1...

  • RE: Need some help tweaking SQL select

    Remy? : )

    quoted

    Yes and no...

    How can the converts be accountable for 97% of the work in the query (from 30 secs to 1)? I'm wondering if...

  • RE: Need some help tweaking SQL select

    Couldn't find one ...

    But usually DETERMINISTIC ones will cache the result and the result will be used when have the same param

     

    I couldn't find an article to describe exactly...

  • RE: Need some help tweaking SQL select

    A NON DETERMINISTIC function yes 40 million times but a DETERMINISTIC function NO

     

    I saw in the first post "I have a view" so definitly was DETERMINISTIC functions so ...

    I ll...

  • RE: Need some help tweaking SQL select

    CONVERTDeterministic unless used with datetime, smalldatetime, or sql_variant. The datetime and smalldatetime data types are deterministic if the style parameter...
  • RE: Need some help tweaking SQL select

    You sure you want this behaviour ?

    dbo.table_repcodem

    LEFT OUTER JOIN dbo.table_repcodes table_repcodes_8 ON dbo.table_repcodem.rcode4 = table_repcodes_8.rcode

    LEFT OUTER JOIN dbo.table_repcodes table_repcodes_7 ON dbo.table_repcodem.rcode3 = table_repcodes_7.rcode

    LEFT OUTER...

  • RE: case statements in a where clause

    WHERE (a.type IN (1,10) AND e.status IN (3,4)) or (a.type NOT IN (1,10) AND e.status = 5 )

    or

    CASE

     WHEN a.type IN (1,10)

      THEN

       CASE WHEN e.status IN (3,4) THEN 1

        ELSE 0

       END

     ELSE...

  • RE: sp_cursorexecute does not use index on table...

     AND A.LINE_DESCR LIKE ''%''  

    -this condition in making the querry to run REALLY SLOW . Better take it out : )

    Because the condition starts with "%SomeTextOrNot" the querry optimizer will do...

  • RE: Matching Values

    Actually it seems that you agree with me (or my english was poor )

    They produce different result times based on the distribution of the Initial Set of Numbers ...

  • RE: Matching Values

    breadth-first or deph-first they have the same cost. They produce different result times based on the distribution of the Initial Set of Numbers which you can't control

  • RE: Matching Values

    There is a RULE: an iterative version is ALWAYS faster than the RECURSIVE version. (off course if it is well written : )

    So based on your Observation (good one :...

  • RE: Matching Values

    This line just initialize the Array to have 1 elem inside at index 0

  • RE: Matching Values

    The code is messy : ) so it needs clean up : )

    VERSION 5.00

    Begin VB.Form Form1

       Caption         =   "Form1"

       ClientHeight    =   3195

       ClientLeft      =   60

       ClientTop       =   345

       ClientWidth    ...

Viewing 15 posts - 181 through 195 (of 321 total)