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!

Search results for query: *

  • Users: jtrembla
  • Content: Threads
  • Order by date
  1. 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...
  2. 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...
  3. 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...
  4. 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 ******/
  5. 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...
  6. 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...
  7. jtrembla

    Calculated fields from another calculated field??

    In MS Access you can reference a calculated fields by the alias name: example: SELECT [sales]/[unit] AS UnitSales, [UnitSales]-1 AS UnitSalesLessOne FROM Table1; Can this be done in t-sql, I get an invalid field name error? If not then that is crappooo
  8. jtrembla

    Should I normalize

    I have the following data, and I was wondering if I should create a ErosionRateType and ErosionModel (with name and rate type) table or just leave the data as is since we are only going to have 3 erosion models at max. Btwm geography is an id field to the geography table. Example data...
  9. jtrembla

    Cascade Delete

    I have the following tables Version -------- VersionID VersionName VersionGeography ----------------- VersionGeographyID VersionID (FK) GeographyID (FK) PricingDrugVersion ------------------- PricingDrugID VersionID (FK) PricingDrugName PricingDrugGroup ------------------...
  10. jtrembla

    Need help with part of stored procedure involved with versioning

    We have a version system which essentially creates duplicate records and relates them since our users are essentially working with a "working version" of their version. I did not create this and our DBA was crazy he is not here no more. The table layouts and sample records are in the excel file...
  11. jtrembla

    Add character in string

    Is there a function I can use that will insert a character into a specified position in a string. For example I want to add 0 into the 2nd position of the following string "W3B3 JSUSJJ" so it becomes "W03B3 JSUSJJ
  12. jtrembla

    Query Help

    VersionID ForecastID ModifiedDate 867 5 06-Dec-08 868 5 03-Dec-08 869 5 06-Dec-08 870 6 03-Dec-08 871 6 03-Dec-08 873 7 03-Dec-08 875 7...
  13. jtrembla

    Active Directory Group Name Change not updated in Sql Sever

    We changed an Active Diretory group name and the new name is the reflective in the SQL Server 2005 Management Studio. Do I really have to recreate it?
  14. jtrembla

    Help with query

    I have a table with the following fields/records GroupID GroupType DrugID BrandGeneric Country 1 E DrugZ Brand U.S. 2 E DrugZ Generic U.S. 3 E DrugZ Brand France 4 E DrugZ Brand...
  15. jtrembla

    Best way to architect a winforms database application.

    Ok, I am seperating my application into the standard 3 ntier layers. It is a winforms application. My question is how to handle database transactions. Should I load the entire database into memory and then update the server database when the application closes? Currently the application...
  16. jtrembla

    Should I use trigger here?

    I have a table (Lets call it Table1) in which about 80% of the records are created from a storage table (by rolling/grouping up records), and there is no direct relationships to it since the storage table comes from a read only warehouse and its ID's can change if the readonly warehouse is...
  17. jtrembla

    Handling divide by zero

    IN my select statement I have the following line (dbo.PricingDrugCurrentTherapyDosing.UnitSales / MarketForecaster.SumOfUnitSales( dbo.PricingDrugCurrentTherapyDosing.PricingDrugID, dbo.PricingDrugCurrentTherapyDosing.Country, dbo.PricingDrugCurrentTherapyDosing.BrandGeneric))*100 AS...
  18. jtrembla

    Adding ID's to related entities...

    Does anyone know of an elegant way I can add NewId's from the parent table to all related tables? I am forecasting items and if a new item is added to the main table then all the other tables need to have that id in it so the user knows that data must be entered for that entity. I have many...
  19. jtrembla

    Convert Access Query to Efficient Stored Proc

    I need assistance with this stored procedure, I am trying to add records into the T_PricingDrugGroup table from TableSource if the record doesn't exist in the destination table. I am not doing this on any id, in fact it is a grouping of PricingDrugID,GeographyID,BrandGeneric that I am...
  20. jtrembla

    can't find reference to another database.

    Ok, here is a stored procedure that our old DBA create, it uses data in another database but it does not implicitly reference it in the stored procedure. The name of the other database is "IMS". My question is there a way to configure a database to also add in the schema from another database...

Part and Inventory Search

Back
Top