Jump to content

packrat

Members
  • Posts

    61
  • Joined

  • Last visited

About packrat

  • Birthday 02/12/1972

Previous Fields

  • Languages
    ASP, VBS, VBA, SQL, ColdFusion, JavaScript, ASP.NET, CSS, ActionScript, XML, XSLT

Profile Information

  • Location
    Chicago Suburbs
  • Interests
    Code, Techno, Scotch Wiskey, Chess, and CounterStrike;<br /><br /><br />Can't fit all my languages in the length alowed; also SqlXml, Xpath, Xquery... probably forgetting something as well.<br /><br />Suppose you could also count alias scripting in CounterStrike as a language if you wanted to. (if HTML counts as a language CS script ought to as well)

packrat's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. knowing ColdFusion is like being fluent in conversational latin

  2. Just installed FireBug, looks promising, have to use it for a bit.I did have to install it, restart, uninstall, restart, and install again before it showed up correctly; might only need to restart twice... anywho - it works.IE Developer Toolbar isn't terrible from a functional standpoint, but I agree its 'graphically poor' -- looks like someone went out of there way to make it look like it was written in some old version of visual basic.
  3. packrat

    box in box etc...

    FireFox will display empty divs as will IE7 (and probably opera & safari), IE6 will not display empty divs but you can trick it by nesting an empty span inside.This is useful when the nbsp is undesirable for one reason or another.<div style="height:4px; width:40px; margin:auto; border:1px dotted #DDE;"><span></span></div>
  4. I'm on board as well, the FF Web Developer tool bar is a must have; my only complaint is that if you have the plugin to switch rendering engines and switch to the IE rendering engine the tools pretty much don't work in IE mode -- but hey we can't expect them to fix all of microsoft's shortcommings.The 'developer toolbar' for IE leaves a lot to be desired, its crashed XP on me at least once and is otherwise not nearly as pleasant or intuitive. My main complaint about the IE tools is that you have to click on each menu to open it, you can't focus the control then mouse over to navigate the way you do in pretty much every other menu for the last decade. Its just a silly UI issue that should take about 20 minutes to fix - which means it'll never happen.My favorite item has to be [information] > [display element information] (CTL+SHIFT+F) it can't be much more convenient that that.
  5. Here are a couple links to some tutorial that helped me a great deal in adopting CSS layout techniques:http://www.csszengarden.com/http://css.maxdesign.com.au/floatutorial/index.htmHaving credited my help resources I'll say that you'll probably want to consider some structural changes in your HTML, the Zen Garden site will give some great insights. I'll not dally into a great amount of detail on this, suffice it to say that the paragraph tag is causing you some headaches. Nothing is telling it to take less than the full available width; Floating the block below it has no effect as is there is no room for it to push up into. A couple of quick fixes to get you started:option #1: move your 'right' block above the paragraph tag but below the h2 tag.option #2: give your paragraph tag a fixed width and tell it to float left.From a SEO perspective option 2 is closer to the correct answer; the articles should help shed some light on why.Another resource: this one is a fun tutorial on "Why tables for layout is stupid"http://www.hotdesign.com/seybold/index.htmllet me know how it goes.
  6. did you try WinHTTP?
  7. or in classic asp vb script: on error resume next 'some code if err.number <> 0 then 'handle error end if on error goto 0 error handling is pretty ugly in vb6 / vbscript
  8. packrat

    easy inner join

    the syntax gets a little squirrely around outer, its more confusing than it needs to be.OUTER JOIN only comes into play when you're doing a LEFT or RIGHT join.LEFT JOIN is the same as LEFT OUTER JOINRIGHT JOIN is the same as RIGHT OUTER JOINWhereas an INNER JOIN only return results from either table when the specified key(s) match the OUTER JOIN returns all the rows from the LEFT or RIGHT in the ON portion of the join.i.e: Table1 LEFT OUTER JOIN Table2 ON Table1.key = Table2.keythis returns ALL rows from Table1 and fills all the Table2 results with NULLs where the key does not match.RIGHT simply reverses this so that:i.e: Table1 RIGHT OUTER JOIN Table2 ON Table1.key = Table2.keyreturns ALL rows from Table2 and only the matching keys from Table1, filling the unmatched rows with NULLs.You could decide to always write LEFT or RIGHT and you wouldn't be out anything.the significance is that it returns all the rows from the table specified returning NULLs where there is no match to its key.It doesn't help understanding that in most flavors of SQL the OUTER part is optional. This is one of those things that is actually simpler than it seems.
  9. glad to be of help.as far as the function goes, just for the sake of discussion, the function would be called in the select and would be evaluated for each row in the result set. SELECT udf_SubstitutePipes(SC.Comment, SD.Value1, SD.Value1) AS CommentFROM StockComment SC INNER JOIN StockDetailComment SD ON SC.StockCommentID = SD.StockCommentID if you're happy with it, or just want to get away from it, then by all means call it done.
  10. packrat

    SUMS and Totals

    Note the CEUFilter subquery below, this will restrict results to ContactID's with more than 5 overall hours. DECLARE @from datetime, @to datetimeSET @from = CONVERT(varchar(11), @MinDate, 1)SET @to = CONVERT(varchar(11), @Maxdate, 1)SELECT DISTINCT EducationCreditHistory.ContactID , EducationCreditHistory.CourseID , contactbase.FirstName , contactbase.LastName , Courses.CourseCode , Courses.StartDate , EdCategoryXref.Category , EdCategoryXref.CEUs , OpportunityBase.Name , Contact.ContactId AS Expr1FROM EducationCreditHistory INNER JOIN contactbase ON EducationCreditHistory.ContactID = contactbase.ContactId INNER JOIN Courses ON EducationCreditHistory.CourseID = Courses.CourseID INNER JOIN EdCategoryXref ON EducationCreditHistory.TransactionID = EdCategoryXref.TransactionID INNER JOIN OpportunityBase ON EducationCreditHistory.ContactID = OpportunityBase.ContactId INNER JOIN Contact ON contactbase.ContactId = Contact.ContactId INNER JOIN ( EducationCreditHistory.ContactID, SUM(EdCategoryXref.CEUs) SumCredits FROM EducationCreditHistory INNER JOIN EdCategoryXref ON EducationCreditHistory.TransactionID = EdCategoryXref.TransactionID GROUP BY EducationCreditHistory.ContactID HAVING SUM(EdCategoryXref.CEUs) > 5 ) CEUFilter ON EducationCreditHistory.ContactID = CEUFilter.ContactID WHERE (CONVERT(varchar(11), Courses.StartDate, 1) >= @from) AND (CONVERT(varchar(11), Courses.StartDate, 1) <= @to) AND (OpportunityBase.Name = N'AAAFEE05 - CE REGISTRY FEE')ORDER BY contactbase.LastName, Courses.CourseCode
  11. ISNULL(Value, '')unlike access where ISNULL return boolean, MsSql ISNULL substitutes the second param for null values, that should take care of the null problem.select Result = Part1 + ISNULL(Value1, '') + Part2 + ISNULL(Value2, '') + Part3Since you're on SQL, if you can write a function to do this your final select would be a lot cleaneri.e. udf_SubstitutePipes(Comment, Replacement1, Replacement2)
  12. packrat

    easy inner join

    practive miffe, practice. I think it took me about a year to really get my head around all the various joins.I've noticed that the query editors tend to put the tables in some odd arrangements, I wouldn't pay too much attention to the way that the automated tools build joins. I tend to put them in the logical order of my query; if i'm querying order info my first table would be orders then order details, then the products table if need be. The optimizer is pretty good at figuring out what it wants to do.My other recomendation while you learning joins is to make extensive use of sub queries. In most cases a subquery can be collapsed into a join condition but it can save your behind of you're floundering over a join. At the very least the subquery helps segment the logic so you can keep track of what the parts are doing, you can more easily test the components that way. I'd say that more than half the time my all join queries run about the same speed as my subquery queries. Again the optimizer is pretty good at figuring out what it wants to do.
  13. It ain't pretty but here's your access solution, if you're using jet/access not sql server. SELECT IIF (InStr(1, SC.Comment, '|')>0 , IIF (InStr(InStr(1, SC.Comment, '|')+1, SC.Comment, '|') > 0 , LEFT(SC.Comment, InStr(1, SC.Comment, '|')-1) & SD.Value1 & MID(SC.Comment, InStr(1, SC.Comment, '|')+1, InStrRev(SC.Comment, '|')-(InStr(1, SC.Comment, '|')+1)) & SD.Value2 & Right(SC.Comment, Len(SC.Comment) - InStrRev( SC.Comment, '|')) , Replace(SC.Comment, '|', SD.Value1) ) , SC.Comment ) AS CommentFROM StockComment SC INNER JOIN StockDetailComment SD ON SC.StockCommentID = SD.StockCommentID someone tell me how to keep code indented when posting....
  14. Query analyzer? is this Access connected to an SQL server (ADP file)? if so do you have permissions to write functions?if not pls elaborate on query analyzer
  15. I think that the division operation might be getting you into trouble, I don't know your data but I can see that @p is an INT which the /100 operation may be violating.Also why are we passing @p in as a parameter when we're not going to use the value passed?how is it not working? errors? no output? what's the db platform?
×
×
  • Create New...