YetAnotherForum
Welcome Guest Search | Active Topics | Log In | Register

Oledb select Options · View
TeX88
#1 Posted : Monday, August 09, 2010 5:23:25 PM
Rank: Member
Groups: Member

Joined: 8/4/2010
Posts: 10
Location: paris
Hello

I have a little problem with IP Oledb. I want to retrieve all the values of a point where the value is greater than a given reference. The result is empty. Yet there are many values above this reference. If I ask for values below this reference, the application returns me all the values (even those who are above the reference) corresponding to the given point.

Have you an idea of the origin of my problem?

Thank you
Sponsor  
 

OSIsoft vCampus is a subscription-based, online offering that consists of providing everything people need to develop applications on the PI System.
We invite you to take a "tour" of the OSIsoft Virtual Campus - also feel free to consult the FAQ  or contact OSIsoft vCampus for more details.
RJK Solutions
#2 Posted : Monday, August 09, 2010 8:11:58 PM
Rank: Administration

Groups: Administration

Joined: 6/20/2008
Posts: 617
Location: Cheshire, United Kingdom.
Hello,

Could you post your SQL query?
Principal Consultant
Real-Time Data Management @ Wipro Technologies
TeX88
#3 Posted : Tuesday, August 10, 2010 9:14:37 AM
Rank: Member
Groups: Member

Joined: 8/4/2010
Posts: 10
Location: paris
My sql query : select value from "piarchive".."picomp" where tag='tag1' and value > '4,675E-10'

RJK Solutions
#4 Posted : Wednesday, August 11, 2010 3:46:25 PM
Rank: Administration

Groups: Administration

Joined: 6/20/2008
Posts: 617
Location: Cheshire, United Kingdom.
Hello,

I notice you are not passing any time element to your SQL query. If you pass a time where you know beyond that time you should get values returned, do you get values?

Generally, I would try to pass some kind of time to your query for performance and to ensure you don't get irrelevant data overload.

Also, I wonder if there is some locale issue here too. Does a basic query work, like getting the snapshot of 'sinusoid'.
Principal Consultant
Real-Time Data Management @ Wipro Technologies
TeX88
#5 Posted : Thursday, August 12, 2010 10:23:52 AM
Rank: Member
Groups: Member

Joined: 8/4/2010
Posts: 10
Location: paris
Hello

I posted a simplified version of my sql query. In fact, I limit the query on a time interval. I have a closed WHERE like: tag = tag1 AND time > startTime AND time < endTime AND value > reference. For the time, there is no problem.

I insert the values that I wish queried using a program. No value is added during the execution of the request
TeX88
#6 Posted : Wednesday, August 18, 2010 12:41:48 PM
Rank: Member
Groups: Member

Joined: 8/4/2010
Posts: 10
Location: paris
Nobody can help me?
TeX88
#7 Posted : Wednesday, August 18, 2010 1:54:00 PM
Rank: Member
Groups: Member

Joined: 8/4/2010
Posts: 10
Location: paris
Nobody can help me?
RJK Solutions
#8 Posted : Friday, August 20, 2010 11:33:50 AM
Rank: Administration

Groups: Administration

Joined: 6/20/2008
Posts: 617
Location: Cheshire, United Kingdom.
If you use your same query without the value restriction, you get all the correct data? If so, have you tried just using "value > 0" to see if you get data? I am thinking there may be an issue with scientific notation in your culture settings.
Principal Consultant
Real-Time Data Management @ Wipro Technologies
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.