Viewing 6 posts - 1 through 6 (of 6 total)
What is the exact error you are getting ?
I have answered your question in other post. I think it contains the same issue.
February 22, 2020 at 6:32 am
Hello ahmed_elbarbary.2010
I have tried to find out the problem and i found the solution that you have a syntax error in following statement
SET @sqls = 'select ''ItemId'', ''IPN'',''PartnerName'',''CustomerName'',
''...
February 22, 2020 at 6:15 am
I have the same problem as above please reply if any IDEA...
October 11, 2011 at 6:43 am
I am disagree with the correct answer of this query..
I got the following result after running the same in Msg window...
1752-09-09 00:00:00.0000000
I use "Microsoft SQL server 2008 R2", Please Explain....
September 28, 2011 at 7:57 am
You can use rollup like this,
SELECT
CASE
WHEN GROUPING(id) = 1 THEN 'Total'
ELSE CONVERT(VARCHAR(12), id)
END AS id,
SUM(amount) AS Sales
FROM @Example
GROUP BY ROLLUP(Id)
September 19, 2011 at 1:13 am
Viewing 6 posts - 1 through 6 (of 6 total)