Home T-SQL QUERY , COUNT WITH TRAILER RECORD
Reply: 0

T-SQL QUERY , COUNT WITH TRAILER RECORD

user608
1#
user608 Published in June 19, 2018, 6:21 pm

i have a code which starts with Alert procedure and follows up with header , detail and trailer statements , where as i used select distinct for header , detail and in between both header and detail there is union command , so i was wondering if i could get the total number of records from header and detail in trailer row in specific column .. for now i have used

CONVERT(bigint, count(*) ) as Recordcount,

but it is displaying as 498 rows .. but we originally have 475 rows about trailer row . i think it is counting total number of sql query rows ..

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.362261 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO