Viewing 15 posts - 12,061 through 12,075 (of 13,469 total)
interesting example;
If I were to modify this trigger, I think I'd like some of the information found in SP_WHO2 like program name and hostname, so you can idnetify who is...
August 15, 2008 at 9:15 am
here's my stab in the dark:
the agency in question probably has more data or more changes than the other agencies.
since the execution plan of a view is compiled, I'd guess...
August 15, 2008 at 7:05 am
generate a random number without using the existing tools of rand() and newid()?
why would handicap yourself?
what is the real requirement, or what are you trying to do? the only...
August 14, 2008 at 9:02 am
Stephen Lee (8/13/2008)
August 13, 2008 at 3:40 pm
if the data is all in the same row, you can do this:a assuming my table has the columns in capitals:
SELECT
@var1=SUBJECT,
@var2=EMAILFROM,
@var3=EMAILTO,
@var4=SUBJECT
FROM...
August 13, 2008 at 12:34 pm
ok, so it's not the count, but the MAX(EDI_CLM_SEQ_NBR) in the DTL that is no longer matching the header, right?
same query and update, but with slight changes?
--in theory, this will...
August 13, 2008 at 12:27 pm
there's something in script contributions that you can grab; i've updated my version slightly so that it also documents FUNCTIONS, which was not part of the original submission.
you can grab...
August 13, 2008 at 12:13 pm
I think you can do this with a simple UPDATE ...FROM:
find the records that might be affected:
SELECT * FROM CLM_HDR
INNER JOIN (SELECT EDI_CLM_ID,COUNT(EDI_CLM_SEQ_NBR) AS EDI_CLM_SEQ_NBR
...
August 13, 2008 at 11:54 am
it might be interesting to find data in the table that does not match it's supposed details:
does this return anything?
SELECT * FROM TokenManager
FULL OUTER JOIN
(SELECT CustomerID SUM(NumTokens) AS NumTokens...
August 13, 2008 at 11:24 am
well, first,
I've always tried to get rid of any tables that were trying to hold summary data with a view. it does away with needless updating.
i think based...
August 13, 2008 at 11:20 am
from a development standpoint, multiple instances are great for testing; I've had SQL7 as a default instance, SQL2000 and 2005 as named instances, all on the same machine. helpful if...
August 13, 2008 at 9:28 am
that is caused by the row terminator:
[slash]n is CrLf, which is found a lot.
try [slash]r which is just Carriage Return, which is common from UNIX type data sources.
August 5, 2008 at 9:04 am
i think it's parenthesis around the @sql....exec(@sql)
this works on my machine:
DECLARE @sql VARCHAR(8000)
DECLARE @path VARCHAR(255)
SET @path='c:[slash]nelson1.txt'
SET @sql='BULK INSERT nelson_test1 FROM ''' + @path + ''' '
...
August 5, 2008 at 8:48 am
also something else to consider;
wouldn't the where statement where len(a.NDC) > 0 force a table scan on the Reorders table in order to calculat ethe length of the field?...
August 5, 2008 at 8:20 am
[font="Courier New"]--all the columns must exist in the table...bulk insert doesn't let you choose.
--if the data was structured like this:
--1.0" 5.1" 5.1" 1.4" .2
--1.0" 5.1" 5.1" 1.4" .2
DROP TABLE nelson_test1
--i'd...
August 5, 2008 at 8:09 am
Viewing 15 posts - 12,061 through 12,075 (of 13,469 total)