Viewing 15 posts - 676 through 690 (of 1,156 total)
It looks like your insert into temp table worked successfully. Can you verify this by putting a select * from #temp after the insert.
Also it might be benificial to...
February 12, 2008 at 2:20 pm
You could also union all the query results together like this:
SELECT 'First',SUM(Table1.Column1) AS [Sum]
FROM MainTable
LEFT JOIN DataTable Table1
ON MainTable.ID = Table1.ID AND Table1.Type = 'A'
UNION ALL
SELECT 'second',SUM(Table2.Column9) AS [SecondValue]
FROM...
February 12, 2008 at 2:06 pm
You can remove the row_id column as the solution you are using does not require it.
February 12, 2008 at 1:52 pm
Check your procedure you may have your procedure variable not declared as varchar(max)
Is this your stored procedure variable that you are passing conids into?
if so you will need to bump...
February 12, 2008 at 12:53 pm
Make sure that you are using the current version of the insert table.
I edited my post and you may have missed it. All the new query does is join everybody...
February 12, 2008 at 12:11 pm
Additionally, you have initialize the text string
set @textNumber = ''
February 12, 2008 at 11:54 am
Int counter is not set to anything. Set it = to 1 or 0
set @intcounter = 1
February 12, 2008 at 11:51 am
Declaring a table variable (@C) may lead to performance problems because all rows you insert will be stored in memory...
Another good point Jonnie. Another thing to do is...
February 12, 2008 at 11:21 am
It looks like its returning what I want but it is way to slow. It took 50 second for one consultantID and 3.45 sec for two ConsultantIDs I can't even...
February 12, 2008 at 11:14 am
So, is the query working how you want it to?
Additionally, you can remove the second filter from the actual query because you are filtering the data in the insert into...
February 12, 2008 at 10:29 am
You did not give your case statement a column name: you have to either give it an input expression or name it.
You have to change this:
CASE
When SalesProb = 0...
February 12, 2008 at 10:20 am
Hi Adam,
Out of interest, would a computed col be a bad implimentation for this problem?
The answer depends on usuage really. Since this data is going to be used for...
February 12, 2008 at 8:39 am
Sorry, I left out the alias. When you use a subquery in a from clause you must alias the query. This code should work for you.
INSERT INTO ReportingData
(ProjectNo
,...
February 12, 2008 at 8:29 am
You cannot reference an aliased column in the same select statement. You have to use the case statement again or use a subquery for your from clause. I...
February 12, 2008 at 7:03 am
Viewing 15 posts - 676 through 690 (of 1,156 total)