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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by ClaytonQ

  1. ClaytonQ

    Function to find the Nth Xday of each month between two dates

    Works every time, vongrunt. This is awesome. *skipping unashamedly around desk*[smile]
  2. ClaytonQ

    Function to find the Nth Xday of each month between two dates

    vongrunt, this is a huge leap forward. It's right most of the time. When you run it looking for the third Tuesday like this, it returns a correct answer UNLESS there is a Tuesday in the first week of the month. When that happens, this code returns the fourth Tuesday. This is really close. Thanks.
  3. ClaytonQ

    Function to find the Nth Xday of each month between two dates

    This link is closer to the correct part of the long page I got the original formula from: http://www.merlyn.demon.co.uk/vb-dates.htm#NXFM You have to view source to see the vbscript he wrote. The page exists to teach people how to do this stuff, so I'm certain he wants people to use his ideas.
  4. ClaytonQ

    Function to find the Nth Xday of each month between two dates

    You are absolutely correct about VBScript casting the date to an integer before it does the modulus. And Zeroeth day of the month is a bizarre idea. I can see how taking the last day of the previous month and adding 7 times the Nth (1 for the first whatever day, 2 for the second, etc.) gets...
  5. ClaytonQ

    Function to find the Nth Xday of each month between two dates

    I'm trying to write a T-SQL function that can find the third Tuesday, or the fourth Saturday, or the second Wednesday of every month. I found a VBScript version of something similar at http://www.merlyn.demon.co.uk/vb-dates.htm#ILS. VBScript and T-SQL don't do dates exactly the same way. I'm...
  6. ClaytonQ

    IF Statement in WHERE Clause

    Found it! Maybe you can glean something useful from this. Names have been changed to protect the innocent: CREATE PROCEDURE usp_MailingEntries @Date nvarchar(20) = '%', @First nvarchar(20) = '%', @Last nvarchar(25) = '%' AS SELECT PersonID, FirstName, LastName, Address1, City, StateAbbrev, Zip...
  7. ClaytonQ

    IF Statement in WHERE Clause

    One way to make a Stored Procedure accept optional variables is by assigning default values to them when they are not passed. Something like: CREATE PROCEDURE usp_Whatever @EmployeeID smallint, @FirstName nvarchar(25) = NULL, @LastName nvarchar(25) = NULL AS IF @FirstName <> NULL BEGIN...
  8. ClaytonQ

    Formal Relationship between 4 tables

    I have a situation where I have three tables (InternalEvents, ExternalEvents, Classes) that each need access to a RoomReservations table. Each event or class may reserve multiple rooms, so each of those is on the one side of a one-to-zero-or-many relationship with RoomReservations. The...
  9. ClaytonQ

    Is it possible to disable a user's &quot;Tab&quot; key with ASP?

    I bet "SE" means "Search Engine." Search Engines will see the link and follow it, and index the contents of your "secret" page, and display them to anyone who asks. Also, if the Tab key is disabled, not a single blind or handicapped person will be able to visit your site. This would hurt you...
  10. ClaytonQ

    How to print in ASP, VBScript?

    You can get a long way by writing a style sheet specifically for print. You can pick font sizes and column widths and background colors for print independently of the screen. A great book is "Eric Meyer on CSS.
  11. ClaytonQ

    Help me make list of groups a user belongs to

    WOO HOO!!! Thank you thank you thank you. It has correctly listed every group I'm in. :) Yee-haw. *Victory dance* I am running this as ASP code. Is that why LDAP wasn't working? Thanks again. I can be productive again now that I'm past this barrier.
  12. ClaytonQ

    Help me make list of groups a user belongs to

    The first line of the script triggers this error on my server: Microsoft VBScript runtime error '800a01a8' Object required: 'Wscript' //global.asa, line 134 Wierd, isn't it?
  13. ClaytonQ

    Help me make list of groups a user belongs to

    Thanks mrmovie. I wasn't really dependant on the OU, it's just that that was the only piece of information I've been able to get so far, because everything else gave me an error. It was progress, but not progress in a straight line toward my goal. I tried the code, and got an error: Microsoft...
  14. ClaytonQ

    Help me make list of groups a user belongs to

    Hi everyone. I am in the midst of moving our Intranet system from Windows NT to Windows 2000. (I know, I know.) I am a web programmer, not a network admin. Our old Windows NT Intranet was relying on a dll called NTUtils to get a list of groups. On the new system, I want to use the abilities...
  15. ClaytonQ

    Return a recordset and count of the rows with 1 sp?

    I understand now what hneal98 meant when he said &quot;Have you tried a data cube?&quot; Something like: Select Count(*), FirstName FROM Employees GROUP BY FirstName WITH CUBE returns a recordset with the Count in the last row of the recordset. I could have ran a stored procedure like that...

Part and Inventory Search

Back
Top