Jump to content

vchris

Members
  • Content Count

    1,529
  • Joined

  • Last visited

Everything posted by vchris

  1. Yes it's the field uid in DL (Document_Link)
  2. I'm doing a small update to a project and I remember earlier the uid was incremented automatically after each insert. Somehow now it isn't anymore. I checked the SQL DB and the field doesn't say anything about auto-increment and I don't see any option in the GUI to add it. Is there a way I can add this option in the code of the table or something?edit: I fixed the problem. Found the Identity option which is the same as auto-increment.
  3. Thanks for letting me know about that. I didn't think it made any difference.
  4. I'm trying to create a query but I got an error and I'm not sure how to solve this problem I have.SQL Query SELECT I4.Description_E I4_Desc_E, I4.ISIC4_CodeFROM Document_Link DL, ISIC4 I4INNER JOIN (SELECT GD_uid, Description_E GD_Desc_E FROM GuidanceDocument WHERE Deleted = 0) GDON DL.uid = GD.uidWHERE I4.ISIC4_Code = DL.CodeGROUP BY I4.ISIC4_Code, I4.Description_EORDER BY I4.ISIC4_Code Output<ul> <li>I4_Desc_E (ISIC4_Code) <ul> <li>GD_Desc_E (GD_uid)</li> </ul> </li></ul>In one I4_Desc_E there could be many GD_Desc_E/GD_uid.Let me know if t
  5. vchris

    IsNull Function

    This seems way too complex for me... I fixed it by doing the calculation myself with ColdFusion.
  6. attribute disabled="disabled"
  7. I agree. It is important to learn HTML before you move on to XHTML and such... I sometimes work on projects created a couple years ago by someone else and back then font tags and stuff like that were very common but time changes.
  8. vchris

    IsNull Function

    So hmmm... how would I integrate an IF statement in my huge query? I just need to verify if d.total_disp and d.total_on_s is null. If they are both they shouldn't be added and TOTAL_OFF_SITE_DISPOSAL should be -1. If d.total_on_s is null then it should simply be ignored in the calculation and TOTAL_OFF_SITE_DISPOSAL should be equal to d.total_disp.
  9. Which attributes are going into the "body"-tag?There isn't much attribute that go into the body tag. Maybe onload for javascript functions.Which attributes or how many can I add to the "font"-tag?The font tag is deprecated (shouldn't be used anymore), instead use styles (see css fonts).Which attributes go into the "paragraph"-tag?There's a couple attributes that can go in the p tag, style, class, id...Do I have to use header-tags (h1 - h6) if I use font-size?It is best to use header tags and then use styles (css) to resize them and change their colour to your liking.
  10. vchris

    IsNull Function

    Just found out a problem related to this topic. In one page there is a data table with the following column: Total Disposal, Total On Site Disposal and Total Off Site Disposal. Only Total Off Site Disposal is not a field in the DB, it is calculated from the 2 others like so (ISNULL(d.total_disp,-1) - ISNULL(d.total_on_s,-1)) AS TOTAL_OFF_SITE_DISPOSAL. The problem with the previous calculation is the -1 if null, so basically it's something like this when null: -1 - -1 = 0 but it's really null (-) not 0. Is there a way I could have the - showing when both are null and when only 1 is it should n
  11. So you're saying that if I would've used something like #numberformat_en(calculate_total(evaluate(release.airsta_v), evaluate(release.airsto_v), evaluate(release.airfug_v), evaluate(release.airspi_v), evaluate(release.airoth_v)))#, it would've worked?
  12. Seems to work pretty well. Thanks!But do you have any idea why my UDF didn't get the full list?
  13. I have a table where I need to calculate the totals and subtotals. The way it is already done is adding the rows in the table straight from the query and then displaying the subtotal/total. Except now I set the isNull value to -1 instead of 0. Anyway I created a UDF where it will take a list as a parameter and add them if they are not -1 and return the answer. If I do something like #calculate_total("1,2,3,4")# it works great. When I try to use variables instead of values that's when it doesn't work. <!--- Function to calculate totals ---><cffunction name="calculate_total" returntype
  14. vchris

    IsNull Function

    I already modified my function to set it up as - when value is -1. Thanks.
  15. vchris

    IsNull Function

    That's an idea! I have a function that all the numbers go through so that would work.
  16. vchris

    IsNull Function

    Hmmm I see... So is there any way of returning - when the value is null without changing the field type?
  17. vchris

    IsNull Function

    So I have an SQL SELECT query where some of the values are null. Here is a sample of one field: ISNULL(S.TOTAL_RELE,0) AS TOTAL_SMALL_RELEASEPretty simple... What I want is instead of replacing a null by 0, I want to replace with a -. I tried ISNULL(S.TOTAL_RELE,'-')... But I get an error (Error converting data type varchar to float.)Complete query (ColdFusion environment): SELECT C.CAS_NUMBER, C.CHEM_F AS SUBSTANCE, S.LESS_1_TON AS LESS_1_TON, ISNULL(S.TOTAL_RELE,0)AS TOTAL_SMALL_RELEASE, ISNULL(S.TOTAL_RELE,0) AS TOTAL_RELEASE, ISNULL(D.Total_ON_S,0)AS TOTAL_ON_SITE_DISPOSAL, (ISNULL(d.tota
  18. Yup noticed that. They even added street level view for certain cities.
  19. Why an alternative to google maps? Google maps is god!
  20. I don't know but I remember reading something about the M$ surface somewhere...
  21. Yeah I've seen that before. Seems like M$ didn't really create that. It was created by another company that M$ bought from.
  22. vchris

    Linux

    So Caligo, did you install Ubuntu?I'll be buying a hard drive anytime soon to install ubuntu on it. I really wanna see what it's like.
  23. Yes I am using windows for now because I have no choice. We live in a world where M$ rules the world at 95%+ and with all the software desgined windows only. See with me it's different. I'd pick PHP over any other language. I love how clean it is.I'd have to see C# to really understand what you mean. Agreed!
×
×
  • Create New...