Viewing 15 posts - 91 through 105 (of 181 total)
I know this is a little late, but thought I would post it in case someone else came across this post looking for answers...
Matthew Mark (3/10/2008)
Okay,...
March 21, 2008 at 1:21 pm
In Enterprise Manager, you can generate a single script for ALL tables in the database (all in a single file).
Highlight the DB name, rt click, select 'generate SQL script', click...
March 20, 2008 at 11:21 am
I'm not sure if I follow you, but in Query Analyzer you can also right click the table name to generate the 'create' script for the table.
Is this what you...
March 20, 2008 at 11:01 am
Yep, what Matt said. I posted a few seconds after he did, so I didn't see his post.
This is what the link I sent earlier was explaining as well.
This...
March 20, 2008 at 8:04 am
Ok, seems OPENQUERY has an issue with concatentation.
Here is a solution...see this link...it explains your problem exactly.
You have to actually build the entire SQL, including OPENQUERY, the insert,...
March 20, 2008 at 8:01 am
OK, I just read on BOL...
'OPENQUERY does not accept variables for its arguments.' (sorry, I missed that earlier)
So, now that you know that the SQL is good, put your string...
March 20, 2008 at 7:41 am
Don't hardcode it, take the output of 'SELECT @SQL' and run it on the linked server to check to see if the SQL syntax is correct (because that is the...
March 20, 2008 at 7:28 am
Have you tried to run the SQL (select blah, blah, blah, etc) directly on the linked server?
March 20, 2008 at 7:15 am
Try this so you can verify the SQL....
declare @SQL varchar(500)
set @SQL = 'SELECT [Test 1] AS Test1, [Test 2] AS Test2, [Sum of ' + @month + '] AS MonthlyAmount...
March 20, 2008 at 5:47 am
If you needed the last (max) PeriodEndDate for each consultant, you can add it in like below.
This was suggested in your error...column must be in a 'group by' or an...
March 19, 2008 at 12:36 pm
Right, because you are using SUM in your select. You must remove the PeriodEndDate from the SELECT as well.
Why do you want the PeriodEndDate if you are summing all...
March 19, 2008 at 12:11 pm
Because you have PeriodEndDate in the 'group by', it is using the date as part of the grouping, which is why multiple rows for same consultant (note that dates are...
March 19, 2008 at 12:02 pm
biscuit (3/17/2008)
Sorry for the flub.
Don't worry about it ... we all have our moments. That's why it helps having so many sets of eyes on here to look...
March 17, 2008 at 11:09 am
There is no range specified in the 5th query, so you should be getting all values.
March 17, 2008 at 9:09 am
dfalso (3/17/2008)
I tried this on a SQL 2005 box here and my third resultset is empty.I get 5 records, 5 records, 0 records, 3 records, and 13 records.
I got the...
March 17, 2008 at 8:42 am
Viewing 15 posts - 91 through 105 (of 181 total)