Viewing 15 posts - 11,026 through 11,040 (of 13,460 total)
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...
Lowell
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...
Lowell
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...
Lowell
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...
Lowell
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...
Lowell
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...
Lowell
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...
Lowell
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...
Lowell
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...
Lowell
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...
Lowell
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...
Lowell
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...
Lowell
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...
Lowell
June 2, 2009 at 5:30 am
ahh you are right Greg, i did not notice that. Thanks for the better solution.
Lowell
June 1, 2009 at 4:36 pm
the trigger fires one for any statement which affects the table; as a result, any statement you write inside that trigger must plan on updating/inserting multiple rows. it CANNOT assume...
Lowell
June 1, 2009 at 3:11 pm
Viewing 15 posts - 11,026 through 11,040 (of 13,460 total)