Viewing 15 posts - 10,681 through 10,695 (of 13,469 total)
Yeah, SQL Server is really stateless in that situation, like a web page would be...unless you poll for a new snapshot of data,and compare against your local cache to see...
August 5, 2009 at 7:15 am
well it can be done...but the better question is do you really want to....you might not after you think through the ramifications...
lets assume that someone adds a new record and...
August 5, 2009 at 6:32 am
correct me if I'm wrong, but i think you want to find the first Monday of the month, and delete anything prior to that?
is that right? or do you want...
August 4, 2009 at 8:03 pm
as Steve identified, your trigger is designed for just a single row of data.
here's a version that should handle multiple rows gracefully.
compare it to yours and see how it simplified...
August 4, 2009 at 6:59 pm
by default, SSMS only shows the first 255 characters in text mode, so your results are being cut off.
Tools>options, and go to the spot below, icrease it to 8000 and...
August 4, 2009 at 4:11 pm
do you know if the search call is coming from a stored procedure?
that's the next thing i'd look at, was parameter sniffing. if the procedure being called has any...
August 4, 2009 at 12:02 pm
you could use a LOGON TRIGGER, and test the app_name() = 'Microsoft SQL Server Management Studio Express - Query', and deny the logon attempt if it is not in...
August 4, 2009 at 11:05 am
most likely manually updating statistics more often would resolve the issue;
statistics only get auto-updated(assuming auto update is ON) if 20% of the rows in a table have changed...
on a...
August 4, 2009 at 10:56 am
heres a generic example; if you post your actual table definition, we could tailor the example to your actual table:
Create Trigger TableName_Update On TableName For Update As
Update Tb
...
August 4, 2009 at 10:48 am
i guess it depends on the program you are using; what happens if you find and replace NULL with a space or empty string in your result file prior to...
August 4, 2009 at 10:44 am
i would definitely do this using the SSMS GUI on a test database;
since it is a PK,the table will probably be dropped and recreated, and any indexes, foreign keys...
August 4, 2009 at 10:40 am
you did not paste your entire query, so you have to extrapolate:
take your entire query from your stored proc, not just the case statement, and wrap it in parenthsis.
give it...
August 4, 2009 at 9:15 am
the default trace would have any objects that were dropped/created/altered.
try this query:
select * from sys.trace_events
declare @tracefile varchar(256)
SELECT @tracefile=convert(varchar(256),value)
from(
SELECT *
FROM fn_trace_getinfo(default)) X
where property=2
print @tracefile
SELECT * from fn_trace_gettable(@tracefile, default)
select
...
August 4, 2009 at 8:36 am
the cursor i posted works, did you try that yet? just remove the oldtable/newtable replace function.
August 4, 2009 at 8:31 am
here's an example that Jack was referencing:
exec ServerName.master.dbo.sp_executesql N'Select SERVERPROPERTY(''MachineName'')'
--or if you are calling a function that exists on the server:
SELECT * FROM OPENQUERY(LINKEDSERVER1,'SELECT dbo.T_DATE(''D'')')
August 4, 2009 at 8:20 am
Viewing 15 posts - 10,681 through 10,695 (of 13,469 total)