Forum Replies Created

Viewing 15 posts - 4,741 through 4,755 (of 5,103 total)

  • RE: How Can I auto sum a Column for every record I select?

    You Could also use a TRIGGER TO MAINTAIN Such Calculations in a denormalized way at Insert / Update time (it is not an expensive opperation&nbsp

  • RE: Worst Practice - Adding a Column Without Thinking!

    VERY NICE !

    I wish my boss would read it every time I am asked to add one and "it shouldn't take me more than a couple of seconds" comes after...

  • RE: prompt boxes

    Lets assume you are running a report based on a stored procedure (WITH PARAMETERS).

    1. On the REport Record Source porperty you specify the name of the sp

    2. On the Input...

  • RE: How do you change the timeout in a stored procedure?

    bellis,

    in EM you will set it on the TOOLS(Menue)-->Options-->Advanced(Tab)-->query time-out in seconds:

  • RE: Get the current status of a job

    check the posts in this thread it will give you what you need

  • RE: SQL SYNTAX

    This is a job that should be done at FRONT-END

    but:

    just as an example ...

    CREATE FUNCTION dbo.udf_AllSections(@sPostID varchar(10), @iPartID  int)

    RETURNS varchar(8000)

    BEGIN

    DECLARE @Sections varchar(8000)

    SELECT @Sections = ISNULL(@Sections + ',',@sPostID + ',' +...

  • RE: How do you duplicate a record in Stored Procedure

    Why do you need a different ID?

    (An update of the Fields wound't DO?)

    in any case...

    Insert into TblName...

  • RE: Create an Insert Statement for Table Records

    I am NOT taking credit for this script, SOMEONE ELSE WROTE IT and I believe it may help you:

    (It has some LENGTH Limitations but can get you started)

  • RE: Forcing order of evaluation

    can you rewrite the statement as

    select * 

        from SBT..SBT s

        where  s.NatchainCd = 86

     and 

     (case when isnumeric(ISAControlNbr)=1) THEN

         case when Convert(int,ISAControlNbr) = 404 then1 else 0 end

     else 0...

  • RE: Are partitioned views not that smart?

    Chris,

    I am not saying that there is anything wrong with the optimizer I just thought that the way things were explained before my previous post were looking at the wrong...

  • RE: DTS and FK Constraints - multiple tables

    Sorry for the bad news but AFAIK

    script them out, drop ,COPY DATA, recreate!

     

     

  • RE: A senior moment?

    NOT ALL numbers can be EXACTLY REPRESENTED in the FLOAT format and you may get errors if you try to compare floats to integers.

    The safest bet if to use the...

  • RE: Forcing order of evaluation

    OK,

     I tried your query with Ramdom test data and it works on my system!

    can you check your query plan?

     

     

  • RE: A senior moment?

    THE CLAUSE 

    COUNT(CASE

      WHEN i.c1 <= d.c1 THEN 1

      ELSE NULL

     END)

    RETURNS an INTEGER number

    If you use these you are returning an integer number

     = (COUNT(*)+1)/2              -- integer

    if you do

     = (COUNT(*)+1)/2.0          -- float

    it will...

  • RE: Can I stop this from Table scanning ?

    Do you have a Clustered index on the datetime column? how many rows are in the table? are you sure is THAT Column the reason for the scan?

     

     

Viewing 15 posts - 4,741 through 4,755 (of 5,103 total)