Viewing 15 posts - 4,051 through 4,065 (of 13,469 total)
you want COUNT(ID) not COUNT(DISTINCR ID)
WITH AddPr(ID,NOTES)
AS
(
SELECT 'ID','NOTES' UNION ALL
SELECT '1',' ADD PR' UNION ALL
SELECT '2',' DELETE PR' UNION ALL
SELECT '1',' ADD PR' UNION ALL
SELECT '3',' ABC' UNION ALL
SELECT '1','...
February 6, 2013 at 9:45 am
i see two issues:
first, teh data is so simple, i don't see any need to use a format file; i only use format files if it's delimited with quotes or...
February 6, 2013 at 9:40 am
are there deeper than 4 levels in the "real" data? are there always exactly four levels?
the right solution depends a lot on some assumptions we can make with the data
here's...
February 6, 2013 at 9:17 am
looks like a copy/paste error:
ROW_NUMBER needs parenthesis:
change that query to ROW_NUMBER() and it should work fine.
February 5, 2013 at 1:54 pm
momba (2/5/2013)
February 5, 2013 at 12:04 pm
search for "Audit Triggers" on this site...there's a lot of articles and examples:
here's the first article i found, and i reviewed it to confirm it has a decent example:
http://www.sqlservercentral.com/articles/Triggers/auditingtriggers/579/
February 4, 2013 at 2:51 pm
it's all in sys.tables, but i prefer to use built in functions instead of joining sys.schemas:
SELECT
SCHEMA_NAME(schema_id) As SchemaName ,
name As TableName
from sys.tables
ORDER BY...
February 4, 2013 at 1:15 pm
the error "The specified string is not in the form required for an e-mail address.)" sounds like someone sent "Lowell" to the exchange server, and not lowell@somedomain.com.
For not sending at...
February 4, 2013 at 12:46 pm
oops sorry; the first quesiton mark should be in quotes:
sp_msForEachDb
'If EXISTS(SELECT 1 FROM [?].sys.tables WHERE name = ''t_payers'')
select ''[?]'' As DbName,* from [?].dbo.t_payers where pay_name = ''Name...
February 4, 2013 at 11:54 am
sp_msForEachDb
'If EXISTS(SELECT 1 FROM [?].sys.tables WHERE name = ''t_payers'')
select [?] As DbName,* from [?].dbo.t_payers where pay_name = ''Name of Payer''; '
February 4, 2013 at 11:46 am
just missing your concatenation:
where CAST(o.OrderID AS varchar(15)) like '%' + @WildOrderID '%'
--should be
where ...
February 4, 2013 at 11:34 am
never heard of MP2 either, but I know most applications are data-size aware...if the content isn't too big, scroll bars are not needed, so they are not displayed;
is it possible...
February 4, 2013 at 7:58 am
in my youth, i owned plenty of GM, Fords, even a Dodge or two...back then all i could afford was used cars, which are usually someone elses problem they got...
February 1, 2013 at 3:09 pm
Craig I think that was true with SQL2000, and the old SQL Mail, but the 2005 and above database mail via msdb.dbo.sp_send_dbmail is already an asynchronous service broker item,...
February 1, 2013 at 2:11 pm
ahh sorry i misunderstood.
for me, encrypted or not, it just goes to whatever normalization is proper for the data;
Basic normalization considerations for me would be:
data is 1:1 and...
February 1, 2013 at 6:53 am
Viewing 15 posts - 4,051 through 4,065 (of 13,469 total)