Forum Replies Created

Viewing 15 posts - 1 through 15 (of 17 total)

  • RE: Defaulting to certain values

    Thanks for the reply..I actually just ended up using a variable to see whether a result is being found. Then in each IF statement, I check for @Found. If it...

  • RE: crazy requirements - SQL help..

    This is close, but not quite getting it for me. Anyone want to take another crack! Thanks alot

    The data comes back like this...not quite right!!

    StatusColor :: EventName :: EstimatedCompletionDate ::...

  • RE: crazy requirements - SQL help..

    http://www.imagehosting.us/?id=587624&type=viewpic - Here is the schema...

    I need to get back all the events for a project. Say I have five events. If event 1 is late(EndDate > CompletedDate),...

  • RE: Loop within a Stored Proc...

    Now to Calculate the EstimatedShipDate...any help is greatly appreciated. Thanks

    INSERT INTO ProjectEvent(ProjectID, EventID, EstimatedCompletionDate, LeadTime)

    SELECT @ProjectID, CompanySeasonProductTemplate.EventID, (Calculate Estimated CompletionDate Here), Event.LeadTime

    FROM CompanySeasonProductTemplate INNER JOIN

    Event ON CompanySeasonProductTemplate.EventID = Event.EventID

    WHERE (CompanySeasonProductTemplate.CompanyID...

  • RE: Schema Question

    These are just templates, not FINALS...so, year to year doesn't matter.

    Also, companies can insert thier own events, which do not HAVE to go into the Template table, but could...

  • RE: Schema Question

    Ok, Last tiem I think..how about this

     

    http://www.imagehosting.us/imagehosting/showimg.jpg/?id=557275

     

    This schema allows me to keep constraints, but still have one table for templates. AK in CompanySeasonProductTemplate are CompanyID, SeasonID, ProductID, EventID with...

  • RE: Schema Question

    I appreciate everyone helping...here is the functionality, in a nutshell...

    An admin user can set up three types of Event Templates which are just events with lead times (in days)...

  • RE: Schema Question

    So, what about the Schema I mentioned above,

    http://www.imagehosting.us/imagehosting/showimg.jpg/?id=554884

  • RE: Schema Question

    I think having an EventTemplateType(Company, Season, ProductCategory) table is best. Then have ONE CompanyEventTemplate table, and have FK to Company, Event, and EventTemplateType.... Looks better and more functional...Any other thoughts...

  • RE: Schema Question

    Well, season is not ALWAYS a factor. Sometime, when setting up a Project (see Project Table), a user could input Company, Season and ProductCategory. But ONLY Company is required. So,...

  • RE: Sub Select Question

    SELECT Keyword, SearchEngine, SourceString, SUM(CASE WHEN LEAD='Y' THEN 1 ELSE 0 END) As NumLeads, COUNT(*) AS TotalHits FROM hit_tracker Group By Keyword, SearchEngine, SourceString

    This works...Thanks for the help.

  • RE: Sub Select Question

    Well, that just gives me the total number of leads in the DB. I need the total number of leads per lead type so to speak. Again, an example

    Keyword...

  • RE: Order By Question

    works fine for me...I actually had to edit the query a bit to get what I needed, but what posted does work...both methods actually...

  • RE: Order By Question

    That works like a charm...Thank you so much

    SELECT *

    FROM Segment

    WHERE (VideoID = @VideoID)

    ORDER BY (case when SequenceNumber >= @lastSeqNumber then 0 else 1 end ), SequenceNumber

  • RE: Just a basic SQL question, Finding Dups for a part of a field...

    No, not at all. I work at a College, and could not figure out the SQL...But nonetheless, I appreciate the help...Thanks again

     

    P.S- is that SQL so simple to figure out...

Viewing 15 posts - 1 through 15 (of 17 total)