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: fhlee
  • Order by date
  1. fhlee

    Extracting City, Zipcode, State and Country from address

    Hi, Does anyone have a pointer for me on where to start searching on how I do this? I have a database of many many addresses, but they are in free text form: ie: Thomas Eddison, 231st E Street, California, 94201, USA. However, they are not "conforming". For example, some will be E...
  2. fhlee

    Pass a parameter to be used in an "IN Statement"

    Hi, Just to try to eliminate silly mistakes like your @EntryDateTime parameter value. Assuming Entry_Date_Time field is a DateTime field, it means that the data is accurate to the microseconds/miliseconds. As such, if the @EntryDateTime parameter you are passing in is a "general" time, then...
  3. fhlee

    DATETIME Question

    Hi R937.com, 1. WHERE CONVERT(VARCHAR,pa_time,108) = '08:30:00' **This is SPECIFIC to 8:30:00 am. Means accurate to the second and possibly microsecond. May not be what Ringers is looking for. I'm just guessing :) Maybe he just want accuracy to the minute. 2. WHERE pa_time >= '1899-12-30' AND...
  4. fhlee

    DATETIME Question

    ASSUMING THAT PA_TIME is a DATETIME field: 1. I am trying to get rows where the time is equal 08:30 AM. SELECT PA_TIME FROM FPATS WHERE ( DATEPART( hour, PA_TIME) = 8 ) ) AND ( DATEPART( minute, PA_TIME) = 30 ) ) /* I assume that you don't care what seconds within 8:30am. for...
  5. fhlee

    How to SELECT *, RandomNumber AS Rnd

    Just a quickie Random Number solution. If anyone tried this before: [color blue]SELECT *, RAND() FROM myTable;[/color] you will be surprised that the random number is all the same/identical. There are ways around it, depending on what you want to do. 1. If you just want the random number...
  6. fhlee

    How to use GetDate() or GetUTCDate() from a User Defined Function?

    This FAQ is linked to my other FAQ which helps to return the SQL Server TIMEZONE from a User Defined Function. Due to SQL determinism; If you try to use the GetDate() or GetUTCDate() function within a User Defined Function, you will get an error message: Error 443: Invalid use of 'getdate'...
  7. fhlee

    How to get Time Zone of the SQL Server

    I just wasted 3 hours trying to figure out how to RETURN the GMT Time Zone of my server in a User Defined function; so I am sharing this workaround. Due to SQL determinism; If you try to use the GetDate() or GetUTCDate() function within a User Defined Function, you will get an error message...
  8. fhlee

    Default.asp? or /?

    Hi trollacious, Thanks for replying. I tried. BOTH SCRIPT_NAME and URL returns "/default.asp" for BOTH www.xyz.com/default.asp and www.xyz.com/ :( In fact, I checked all the ServerVariables... I can't seems to find a variable there that can differentiate this particular case :( regards, -...
  9. fhlee

    Default.asp? or /?

    Hi Lee, Thanks for replying. I am referring to the Server-Side. I checked the ServerVariables (SCRIPT_NAME), but when I load the default.asp & just the /. The variable (SCRIPT_NAME) is still the same... Any other ways? Thanks in advance :) - fhlee ~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
  10. fhlee

    Default.asp? or /?

    Hi there, Due to some SEO requirement, I have a very peculiar request... was scratching my head over this for a while but to no avail... Does anyone know if I can tell, from within my ASP page, if the CURRENT page being run is default.asp or / ? For example, google treat www.xyz.com/ and...
  11. fhlee

    (Excel 2007) Which CELL contains compatibility issue?

    Hi to all the Excel gurus... I'm a new user with Excel 2007. I must say I'm extremely frustrated with it... but alas, that's another discussion for another day... I'm hoping that someone can help me with this annoying problem... I'm trying to safe some Excel 2003 files back as Excel 2003 after...
  12. fhlee

    Connect To DIFFERENT Server

    Hi onPnt, Thanks so much for replying. Through the keyword 'Linked Server' you provided, I found the solution I needed: OPENROWSET. This is just to document this post & for future programmers who is asking the same question: Title: SQL query to a different server / host. SELECT ServerA.*...
  13. fhlee

    Connect To DIFFERENT Server

    Hi, Hope someone can help me with this... been struggling with this urgent (duh!) request... Microsoft SQL ---------------- I have 2 SQL server (Server A & Server B). In the 2 servers, there is 1 database (MyData). Inside the MyData, there is 1 table (Pictures). The Pictures table contain...
  14. fhlee

    How to access Exchange Server mails with ASP.Net?

    Hi, I'm trying create a module within my site (CRM kinda module), which will show all the mails to/from a customer (email address) in the webpage. Therefore, I need to access the Exchange Server from my ASP.Net program & do filtering and get the result & then show it on the page. From the list...
  15. fhlee

    Are my SQL Indexes Being Used? Utilization Rate?

    CatAdmin, Enterprise Manager. Hi TitleIstDBA, Thanks for the pointer :) Anyone who might be interested, I came up with an SQL Statment that will List Of All Indexes with its Size in a Database. ----------------------- List Of ALL Indexes Inside A Database With Size. Reserved & Used...
  16. fhlee

    Are my SQL Indexes Being Used? Utilization Rate?

    Hi, Thanks for your time. Microsoft SQL Server 2003. I just took over a fairly large Database (4.5GB) and I notice there are A LOT of (large) indexes being built for certain (large) tables. I think some are redundant and are not used; thus wasting store space. Is there are a way for...
  17. fhlee

    Reg Exp help matching the { and }

    Sorry, amendments: The simple solution is to replace {CRLF} into " <BR>" (BR with a space **BEFORE it (no qoutes)). ~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
  18. fhlee

    Reg Exp help matching the { and }

    Hi, This is for those who're looking for a solution for URL matching for Regular Expression. I've found the following solution which works for me: ((http://)|(www.))+[^\s]+ basically, it will match anything that starts with either a http:// or a www. and ends with a <space>. Note: The ending...
  19. fhlee

    Reg Exp help matching the { and }

    Hi vbKris, Thanks for replying! :) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Private Function fnsHTTPParse(byval vsMessageIn) Dim vsMatches, vsMatch, vsTmp Dim vrgHTTP, vrgMatches, vrgMatch Dim vHTTPs Set vHTTPs = server.CreateObject("Scripting.Dictionary") Set vrgHTTP = new RegExp...
  20. fhlee

    Reg Exp help matching the { and }

    Hi, Can you please help me with a RegExp to match URLs. For example: http://www.domain.com/forum/Thread.asp?txtThreadGUID={9E0E17CE-AC40-4D40-A385-516AAFC1DCA7} currently, I'm using: \bhttp://[A-Z0-9.\/\=\#\?\_\%\&\-\{\}]+\b but for some strange reason, it doesn't match the closing }...

Part and Inventory Search

Back
Top