Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by jtrembla

  1. jtrembla

    Schema Question

    A smart programmer, lol.
  2. jtrembla

    Schema Question

    I currently have one table to hold ForecastAdjustmentTypes Now each forecast adjustment are recorded differently. Thus, attached to different schema. For example some adjustments are done at the population level and some are done at the drug level. Is it best practice to keep the type names...
  3. jtrembla

    Help with combining 2 query and make subquery

    it is fast. I am trying to be anal about indexes and normalization. I broke one normalization rule. We have drugs that can added as an emerging drug, but they are added 3 different ways... Emerging brand Emerging Brand from Existing Brand Emerging Generic from Either EmergingBrand or...
  4. jtrembla

    Best way to handle pivot data that gets updated..

    Our company wants to view data from a normalized table in a pivoted grid. Not only that, they need to be able to update the values as well. Thus, I created a pivoted stored procedure which uses dynamic sql b/c the crap pivoted function doesn't read the column values. Now updating the grid in...
  5. jtrembla

    Help with combining 2 query and make subquery

    it did. Any recommendations on make my query better, readable etc.? I am new to this thus want to make sure the next person who reads this won't pull his hair, lol.
  6. jtrembla

    Help with combining 2 query and make subquery

    no it can have more than one record, so my result will be like Pricing drug groupid Geographyname adjustment value 1 usa null 2 france .58 3 uk null This is what I came...
  7. jtrembla

    Help with combining 2 query and make subquery

    Yep, query 2 has a field called Adjustment value, the table ForecastAdjustment has fields PricingDrugGroupId and ForecastPeriodTimelineID. My Final results need to be Pricingdruggroupid ForecastPeriodtimelineid, Pricingdrugname, Geographyname, PeriodTimelineDate AdjustmentValue (from...
  8. jtrembla

    Help with combining 2 query and make subquery

    Query 1 (I want all the results and only matching results from query 2) They will be joined on PricingDrugGroupID and ForecastPeriodTimelineID eventhough query 2 does not return these columns it is in the table. Query 1 code... SELECT dbo.PricingDrugGroup.PricingDrugGroupID...
  9. jtrembla

    Comments in Stored Proc getting removed...?

    My comments are getting replaced by system commment? How do I override this? Is it a template or something? /****** Object: StoredProcedure [MarketForecaster].[Population_SelectByVersionID] Script Date: 12/16/2008 14:53:12 ******/
  10. jtrembla

    Query - Filter out records based on criteria

    bborissov, your code does not work. There seems to be an error with this... ON YourTable.DrugId = Tbl1.DrugId YourTable.Country = Tbl1.Country
  11. jtrembla

    Query - Filter out records based on criteria

    Yes, and thanks all, I am learning rather quickly because of this forum. You guys save lots of time.
  12. jtrembla

    Query - Filter out records based on criteria

    Does this also work? SELECT PricingDrugID, BrandGeneric, Country FROM Table1 WHERE (((Table1.PricingDrugID) Not In (select PricingDrugID FROm Table1 where BrandGeneric = 'generic'))) OR (((Table1.Country) Not In (select Country FROm Table1 where BrandGeneric = 'generic'))) It seems to return...
  13. jtrembla

    Query - Filter out records based on criteria

    Here is my table DrugId | BrandGeneric | Coutnry ============================================= 1 brand US 1 brand France 1 generic US 1 generic France 1...
  14. jtrembla

    Help with Query

    I am having a tough time on where to begin with this... PricingDrugGroupID | PricingDrugName | Country | BrandGeneric =========================================================================== 1 PricingDrug A USA BRAND 2...
  15. jtrembla

    Calculated fields from another calculated field??

    thanks, it just seems like a simple update to the t-sql language to allow this. I mean if MS Access allows this, then t-sql certainly can, repeating the columns in calculations can be quite annoying and long, especially when I have like 5 calculated columns referencing other calculated columns...

Part and Inventory Search

Back
Top