Browsed by
Tag: SQL

Query AD using T-SQL

Query AD using T-SQL

So I’m working on a small interface that needs to check certain computers in our enterprise for file changes, and fortunately these specific computers are kept in a group nested inside our AD structure. My thought was, if I can use a SQL query to go get that list of machines, put the results in a table, then have the interface read from that table it would always have a current list of these machines, with no maintenance required for…

Read More Read More

Returning the Nth weekday in SQL…and in InfoPath

Returning the Nth weekday in SQL…and in InfoPath

Ok, after much research I found a forum that had a posting that demonstrated how to get the Nth chosen weekday of a month using T-SQL. Here’s the code: DECLARE @date datetimeDECLARE @weekday intDECLARE @day datetimeDECLARE @number intDECLARE @WhichOne int SELECT @WhichOne = 2 — Set this to the week you want to grabSELECT @number = 1SELECT @weekday = 0SELECT @date = getDate() — Change to dateadd(month, 1, getDate()) for next month, etc. WHILE @weekday 4 — Change this value…

Read More Read More

Great upcoming webcasts and seminars

Great upcoming webcasts and seminars

It seems like September through November is heavy on developer and security webcasts. I’m including as many as I can in this entry, if anyone notices others feel free to post them in the comments below. 24 Hours of PASS – 24 one-hour long-ish webcasts from industry experts on SQL related management and development. geekSpeak: Generics and Collections (Level 200) – Webcast providing details and best practices with collections and lists in .Net Framework 3.5Windows 7 and Windows Server 2008…

Read More Read More

New code library site

New code library site

I created a basic code library site to host all of the code snippets I’ve gathered and/or created over time. Go here to visit the site. It’s pretty basic and empty right now, I’ll dress it up a little more as time goes on. I’m also trying to determine a better way of sub-categorizing the code in each of the language tabs. I welcome suggestions. Enjoy!