Viewing 15 posts - 11,026 through 11,040 (of 13,462 total)
as I understand it, the LIKE '%pattern%' will always require a tablescan, since parts of the string are not indexed.
if the pattern is 'pattern%', so the value always starts...
June 3, 2009 at 6:50 pm
duplicate post.
no need to ask the same question in multiple forums, as the Recent Posts>>Posts Added Today
shows everything.
follow the thread and the answers already posted here:http://www.sqlservercentral.com/Forums/Topic728604-146-1.aspx
June 3, 2009 at 6:36 pm
everyone is different, and you should use what is best for you. but here's some of the rules in out shop:
1. the primary key of each table is TableName+"ID". (one...
June 3, 2009 at 6:22 pm
select convert(varchar(10),(dateadd(day, -1*day(dateadd(month, 0 ,getdate())),dateadd(month, 0 , getdate()))),101)
--results:
05/31/2009
it is finding the last day of the month prior to today. then of course it's find data in your table that is...
June 3, 2009 at 3:06 pm
here's how i would do it:
ignore the end date, and calculate it based on the clinicstartdate.
i assume that if you take the year() of today, plus the month/day, that is...
June 3, 2009 at 3:01 pm
master..xp_cmdshell 'bcp ..out -U -P '
i guess you need to read up on the syntax. If that is your real command, you are not specifying any of the...
June 3, 2009 at 2:37 pm
dumb question first...are you sure Table1 is identical on ServerA and ServerB? different data would of course produce different results.
second, there is a sub select with this code:
select b.Code...
June 3, 2009 at 10:46 am
ok i got it, and a solution too!
what you want to do is use the PIVOT operator;
with that, you can PIVOT a single column based on the values of the...
June 3, 2009 at 10:38 am
ALTER PROCEDURE [dbo].[sp_AppendToFile](@FileName varchar(255), @Text1 varchar(255)) AS
DECLARE @FS int, @OLEResult int, @FileID int
EXECUTE @OLEResult = sp_OACreate 'Scripting.FileSystemObject', @FS OUT
IF @OLEResult 0 PRINT 'Scripting.FileSystemObject'
if that is your whole proc, it's...
June 3, 2009 at 8:15 am
david.ainsworth (6/3/2009)
Thanks for any advice in advance.
I have a SQL server I wish to replace and it has a legacy Stored Procedure that gathers information from the database and...
June 3, 2009 at 7:24 am
you are right.
compatibility mode has nothing to do with how the native mdf or backups are constructed...it only decides what syntax for TSQL will be permitted to hit the database...that...
June 3, 2009 at 7:13 am
ALZDBA (6/3/2009)
Attached you'll find a version I use for quick and dirty CPR-trace 😉
ALZDBA the version you posted has all the CrLf stripped out, making it difficult to test, since...
June 3, 2009 at 6:43 am
you didn't explain what the issue is.
is it you need to populate a table with each hour? you said "update" the table, not populate, so i'm not sure where the...
June 2, 2009 at 5:46 pm
excellent point Jan,
it seems to me that if the "global" table is missing a column , it's gotta be because a different process created a table with the same...
June 2, 2009 at 8:44 am
if you are sending the email as HTML, then that is the expected behavior...HTML does not respect extra whitespace ,tabs, or CrLf; it only recognizes it's markup tags.
if you do...
June 2, 2009 at 5:30 am
Viewing 15 posts - 11,026 through 11,040 (of 13,462 total)