Viewing 15 posts - 286 through 300 (of 458 total)
I've had some success with the Win32::SqlServer 2.002 module on cpan. It's nice because it supports integrated security and 2005, which previous perl modules for interfacing with SQL Server...
November 30, 2006 at 9:45 am
I'd do something like this:
SELECTos1.*
FROMOrderShipping os1
JOIN(SELECT customerid, MAX(datestamp) AS max_datestamp FROM OrderShipping GROUP BY customerid) os2
ONos1.customerid = os2.customerid
AND os1.datestamp = os2.max_datestamp
November 29, 2006 at 5:27 pm
I'd do something like this:
DELETE t1
-- SELECT t1.*, t2.*
FROM table t1
JOIN table t2
ON t1.col1 = t2.col1
AND t1.col2 = t2.col2
AND t1.col3 = t2.col3
... (etc)
AND t1.LEP_CODE < t2.LEP_CODE
highlight and run from...
November 29, 2006 at 10:32 am
You might consider loading only the rows you need into another table, dropping and recreating the original table, and then copying the data back over. Or just renaming the...
November 28, 2006 at 12:38 pm
In general my feeling is that a procedure should be a set of SQL statements performing one common, repeatable/repeated task. If you have a large number of conditional statements...
November 28, 2006 at 9:58 am
Example script below... there's probably a cleaner way to do this but this is what I just threw together:
DECLARE @dateDATETIME
SET @date = GETDATE()-- or whatever date
-- 1 - DATEPART(dd,...
November 27, 2006 at 2:53 pm
Sergiy was on it. The way you want to do it is move to the first of the start month, then add seven months, then back up a single...
November 27, 2006 at 2:45 pm
If you're curious about running transactions, I would look into the dynamic management views relating to transactions in Books Online, especially dm_tran_active_transactions and dm_tran_database_transactions.
November 27, 2006 at 2:16 pm
Only use a stored procedure for actions which you'll need to perform multiple times. If this is a one-time thing, then you don't need to create a procedure for...
November 16, 2006 at 2:55 pm
I think it's probably best to wait a little bit and see how things settle out. If this site turns into just one big funnel for Red Gate sales...
November 14, 2006 at 10:22 pm
Congratulations guys. This site has been instrumental in my professional growth both through the technical resource it has been as well as the opportunity to publish my own work....
November 14, 2006 at 10:01 am
Look in BOL at the REVERSE() and CHARINDEX() or PATINDEX() functions. What you'll want to do is do something like
CHARINDEX(@search_string, REVERSE(@to_be_searched))
November 9, 2006 at 11:19 am
I'd be careful of that approach. I don't think it will give you all appropriate members of db_owner.
At least its failing to find me on both my SQL 2000...
November 7, 2006 at 10:27 am
sp_helprolemember will list all role members in the current database. sp_helpsrvrolemember will do it at the server level.
November 7, 2006 at 9:42 am
Might just be bad/confusing documentation.
November 2, 2006 at 1:02 pm
Viewing 15 posts - 286 through 300 (of 458 total)