Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Anybody understand why I'm getting this error?
I used the same temp table strategy for all three tables, it works for the first two, then fails on the last one. I've attached the whole script, and I have pulled out the problematic piece. Why is it trying to find NodeID? I don't have it in my load statement? Any Ideas.
This is the script
LoadTime6:
Load
Max(DateNum) as LastModifiedDate
FROM [CPULoad2.qvd](qvd);
Let vLastExecTime2 = peek('LastModifiedDate');
Drop Table LoadTime2;
I get this error.
Field Not found - <NodeID>
LoadTime6:
Load......
I was messing with the Temp table to see if anything would work.
Here is the log.
Alex Peasley
Business Intelligence Architect
Core BTS
608-661-7769
Hi
There is a file "CPULoad2.qvd" when do you run the script?
Try change line 108, 109 ,110, 111 with this:
CPULoad:
Load
MAX(DateNum) AS LastModifiedDate
Load
DateTime,
Date,
NodeID,
DateNum,
AvgLoad,
AvgMemoryUsed,
AvgPercentMemoryUsed
From [CPULoad2.qvd](qvd);
line 127 should rather be NodeID. you're storing Nodeid into the qvd.
I agree with Jasleen. The message may be appearing out of order, but I think the problem is with the last LOAD stmt. The problem is the mismatch between SQL NodeId and the LOAD NodeID. SQL is not case sensitive, but QV is.
So either change the SQL to NodeID or change the load to "NodeId as NodeID".
-Rob
I still don’t think that’s the issue. When I comment out the load script and just try to run the Temp Table. I get the same error.
When I run the temp table all by its self in the script, it works fine. But when I uncomment the first two tables, it errors out. What gives?
LoadTime2:
Load
Max(DateNum) as LastModifiedDate
Let vLastExecTime2 = peek('LastModifiedDate',0,'LoadTime2');
Drop Table LoadTime2;
//CPULoad:
//Concatenate
//LOAD
//DateTime,
//Date,
//NodeID,
//Num(floor(DateTime)) AS DateNum,
//AvgLoad,
//AvgMemoryUsed,
//AvgPercentMemoryUsed;
//SQL SELECT
//NodeID,
//Cast(DateTime AS bigint) AS Date,
//DateTime,
// floor(convert(decimal(12,5),DateTime)) AS Date,
//AvgLoad,
//AvgMemoryUsed,
//AvgPercentMemoryUsed FROM CoreNOC.dbo.CPULoad_Detail
//WHERE floor(convert(decimal(12,5),DateTime)) >= '$(vLastExecTime2)';
//STORE CPULoad INTO CPULoad2.qvd;
DROP Table CPULoad;
DROP Table AvgUpTime;
Alex Peasley
Business Intelligence Architect
Core BTS
608-661-7769
I think it is because of the max. I recently tried the max function in script. it didn´t work that way. remove max and try if this is the cause of the problem
i think you must a group by statement if you use the max function