Forum Replies Created

Viewing 15 posts - 2,971 through 2,985 (of 6,036 total)

  • RE: Join to only one record

    Easy.

    You need what?

    List of customers which have existing orders?

    Just ask SQL Server for it!

    select * from customer

    WHERE EXISTS (select 1 from orders where orders.cust-number = customer.cust-number)

  • RE: Dissecting a cumulative error code

    declare @codes varchar(1024)

    declare @errcode int

    -- select @codes = '' - it's useless

    select @errcode = 7

    select @codes = ISNULL(@codes + ', ', '') + rtrim(ErrorDesc) -- get rid of...

  • RE: Help with .QIF file

    Such problems usually happen when you mix Unicode data with non-Unicode service characters (tabs, CR/LF, etc.)

    Try to inspect your files with binary file viewer.

  • RE: Invalid column name and ALTER TABLE

    You missed the point:

    When your procedure (or batch ) is being compiled

    Run you full batch with Trace ON and you'll see - no statements are executed.

  • RE: Table var maximum row number

    If total amount of data in your table variable exceeds 1 page (8k) you're in trouble.

  • RE: Group By Price Ranges

    FROM item I

    WHERE @priceRange IS NULL

    OR EXISTS (select 1 from tblPriceRanges R

    ...

  • RE: How to round to nearest nickel?

    Matt Miller (6/17/2008) Just need to tape the KISS principle sticky note to my forehead again....:)

    Then everybody else will read it but you...

    :hehe:

  • RE: How to round to nearest nickel?

    Carl Federl (6/17/2008)

    However, SQL Server has the resulting data type different that specified in BOL as "the result of ROUND to be same type as the numeric expression" but this...

  • RE: How to round to nearest nickel?

    Matt Miller (6/17/2008)why travel around the planet when you can just cross the street...

    Because travel agencies tell you so...

  • RE: How to round to nearest nickel?

    Jeff Moden (6/17/2008)Ya just gotta love simple.

    I'm just not a good typist. 😉

    Apart from my laziness...

    🙂

  • RE: Invalid column name and ALTER TABLE

    When your procedure (or batch ) is being compiled there is no RowID in the table yet.

  • RE: Eliminating Cursors

    Matt Miller (6/17/2008)

    Corollary to rule #1: Try not to be that operator....:D

    Quality of some programs makes you wish to be the one.

  • RE: Limitation fo AND's and OR's

    There are limitations:

    - if there are more than 2 OR's/AND's in a query the developer must be warned about inappropriate technics he/she is using;

    - if there are more than 10...

  • RE: How to round to nearest nickel?

    If "nickel" means 5c then this would be easier way:

    ROUND(Amount/5, 2)*5

    For proper precision Amount must be at least MONEY datatype, if not it must be converted to FLOAT first and...

  • RE: Eliminating Cursors

    1st rule of programming:

    There is no program which cannot be shortened by 1 operator.

    🙂

Viewing 15 posts - 2,971 through 2,985 (of 6,036 total)