Viewing 15 posts - 13,261 through 13,275 (of 14,953 total)
Something like this might work:
declare Cur cursor local fast_forward for
select definition
from sys.sql_modules
where definition like '%alterdate%'
declare @sql varchar(max)
open cur
fetch next from cur
into @sql
select @sql =
replace(
replace(@SQL, 'alterdate', 'createdate'),
'create proc',...
June 19, 2008 at 1:37 pm
You need to properly nest your Ands and Ors.
This might do what you need:
(c.CustomerID = '3942') AND (ol.DetailTableID < '6/17/2008') AND (o.Opendate < '6/19/2008') AND
((ol.PLU LIKE 'ONL-ANN%')...
June 19, 2008 at 1:28 pm
That's the only way I know of.
June 19, 2008 at 1:24 pm
What you want to do is use a running total, and pick the row where that goes over the desired threshhold.
There's a good article on running totals at:
http://www.sqlservercentral.com/articles/Advanced+Querying/61716/
June 19, 2008 at 1:22 pm
I've had the "connection timeout expired" happen because of misnaming the server in the connection string. I've also had it happen because the network between the two servers was...
June 19, 2008 at 12:54 pm
Try something like this:
declare @T varchar(100)
select @t = 'Mr. John Smith Jones'
select substring(left(@t, charindex(' ', @t, charindex(' ', @t) + 1)),
charindex(' ', @t), charindex(' ', @t, charindex(' ', @t) +...
June 19, 2008 at 12:51 pm
I don't think you can do what you're trying to do, and, even if you can, you probably shouldn't.
A cursor that creates an arbitrary number of temp tables with 1...
June 19, 2008 at 12:01 pm
What you posted about or vs and made me take a slightly different tack on this. Try this:
;with Main (Contact_WID, Source_WID, Offer_WID) as
(select chf.contact_wid, chf.source_wid,
isnull(poh.offer_wid, 0)
from w_camp_hist_f Chf
left...
June 19, 2008 at 11:33 am
It's also possible that you just aren't filling up the log file. 6 Gig of log is quite a few transactions, even if they are big transactions.
June 19, 2008 at 11:22 am
One possibility is you can set a maximum size for the log file. It might be at that, if it's set.
June 19, 2008 at 11:08 am
I actually ran into a situation where someone didn't want to keep "the audit logs" for the database and deleted all the log files. The reply to "restore to...
June 19, 2008 at 11:06 am
If you really want to truncate all the tables in a database, you're probably better off using a create script to drop the whole database and rebuild it.
June 19, 2008 at 11:02 am
That's a MySQL version number, not an MS SQL version number. You're probably running on MySQL. Might be better off asking on a page that focuses on that...
June 19, 2008 at 10:59 am
rbarryyoung (6/18/2008)
GSquared (6/17/2008)
...are all considered deterministic by SQL Server, butDatepart(Weekday, date)
is not.
Neither are:
dateadd(day, '12/30/1899', date)%7
cast(date as float)%7
cast(date as int)
Aren't the first two affected by configuration settings on the server or...
June 19, 2008 at 10:56 am
Viewing 15 posts - 13,261 through 13,275 (of 14,953 total)