393 reputation
27
bio website
location
age
visits member for 1 year, 3 months
seen May 9 at 16:14
stats profile views 4

Nov
21
comment Searching for pairs of date/time values in a single row
@Sam, in the 1st code bock, if the start/stop days are the same, the 2nd condition and the 3rd condition combined will return ALL rows for the day. Say the start time was 3p (150000) and the stop time was 5p (170000), the 2nd condition would return everything from 3p to 11:59:59p (150000 thru 235959) and the 3rd condition would return everything from midnight (000000 to 170000). Since the 2nd and 3rd conditions are OR'd, you get everything. That's the basic difference between the two code blocks. The 1st one is OR'd and the 2nd one is AND'd.
Nov
20
comment Another BCP Export [Fail]ure
@Killercam, could you use global temp tables (e.g. ##TmpTableColumnNames)?
Nov
20
comment Searching for pairs of date/time values in a single row
@Sam, I'm pretty sure you need both cases. I only had the second case and somebody pointed out that it will return all rows for a day if the start and stop days are the same.
Nov
20
comment Searching for pairs of date/time values in a single row
@ChrisAldrich, I'm not familiar with the db2 syntax. Those are supposed to be variables.
Oct
19
comment Altering nullability of column in SQL Server
I would guess that going from NOT NULL to NULL works because every value stored in a column defined as NOT NULL is allowed if the definition is changed to NULL. The opposite is not true. Not every value stored in a nullable column will be allowed in a non-nullable column.
Oct
10
comment How do I write portable SQL that refers to a linked server?
If you took this approach, I think I'd wrap the CASE statement in a function so if a server changed, I'd only have to update the function.
Aug
8
comment Can I move data and full text search files to another drive and change the drive letter?
Seems to have worked perfectly. Thanks!
Aug
8
comment Can I move data and full text search files to another drive and change the drive letter?
We don't have enough drive/space on the dev server to test. However, this is a standby server for production. The main production server already has a large G:\ drive. Thanks for the permissions tip. I'll use xcopy with /O /X /E /H /K.
Aug
8
comment Can I move data and full text search files to another drive and change the drive letter?
SQL Server 2005 Enterprise Edition. As for the reboot, I figured it couldn't hurt.
Feb
9
comment SQL Server Linked Server Permissions
Thanks for all the help. Tried Attempt #2, but still no luck. It's got to be SQL Server permissions issue. The query works if my user (a sql authenticated user) is a member of the System Administrators role. It fails if the user is not.
Feb
7
comment SQL Server Linked Server Permissions
Thanks, but "Show Advanced Options" was already set to 1 and "Ad Hoc Distributed Queries" doesn't exist in SQL 7.
Feb
7
comment SQL Server Linked Server Permissions
The service account for MSSQLServer is just a generic domain account we user for our SQL servers. The non-SA user (testuser) is using SQL auth. If I just make testuser a SA, it works, so I know it's just a permission issue.