Forum Replies Created

Viewing 15 posts - 16 through 30 (of 283 total)

  • RE: add new conditions to a query

    mathewspsimon (1/21/2009)


    thanks for the help but one question,@InsuranceCompany is and Integer so does it have to be modified?

    No, but you would have to convert it to text in order to...

  • RE: add new conditions to a query

    One thing you can do is simply print out @SSQL to see what the string looks like. A quick glance at what you supplied shows two possible problems:

    AND B. [Insurance...

  • RE: Get Missing Data with Tally Table

    I'll admit to not reading all the posted solutions, so maybe mine is redundant. It just continually propagates the last defined rate data forward until it is changed. The only...

  • RE: lookup table & main table design

    Then I must admit to being thoroughly confused as to what you are trying to accomplish.

    Attached is some code to demo one simplified scheme but now I'm not sure if...

  • RE: lookup table & main table design

    It would appear that you want to have entities that are applicable during a certain time period (a year) and the attributes in lookup tables should only be the values...

  • RE: Selecting more recent child record with parent

    select *

    from Items I

    join Versions V

    on I.Ref = V.Item_Ref

    where v.DateCreated =...

  • RE: Bitwise AND on CHAR datatype?

    A bigint gives you 16 hours a day to schedule appointments for your salesmen. If that is not enough time, then your company has a serious problem and it's not...

  • RE: Custom Function: Unexpected Results :crazy:

    You seem to be doing a lot of unnecessary calculations and conversions. Try these:

    CREATE FUNCTION dbo.SOM(

    @myDate DATETIME,

    ...

  • RE: Arithmetic overflow error converting expression to data type datetime.

    I don't know if anyone has given you the Stern Lecture for using a non-datetime datatype to contain datetime data, but if not, consider it done.

    That being said, and with...

  • RE: Get future quota data with current results

    OK, that explains a lot. In retrospect, I probably should have noticed the warehouse-like structure, but I have not worked a lot with data warehouses and, unfortunately, I have seen...

  • RE: Get future quota data with current results

    Your table modeling and query design are terrible! Your method of handling dates is terrible, your method of handling running totals is terrible and there are several places where the...

  • RE: Whats wrong with my SQL code?HELP Please!!!

    You could, however, create a view that would join the two tables and present the calculated results in the form you want.

  • RE: Query Design Question...

    In both procedures, I still need to check the FruitTypeID(s) and then query the appropriate table(s). If another FruitType is added, I have to change GetFoodByID and GetFoodByLocationID to include...

  • RE: SMALL HELP EGD ORDER BY

    Part of your problem is that you are trying to get polished results from your query. Let SQL do what it does best, retrieve data, and let your application do...

  • RE: Trigger Update

    Generally, if you want to add or modify any data written or changed in the target table, use an Instead Of trigger:

    create TRIGGER [trg_Transport_U] ON [dbo].[Transport]

    Instead of UPDATE

    AS

    SET NOCOUNT...

Viewing 15 posts - 16 through 30 (of 283 total)