Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


OPENQUERY COUNT VERSUS OPENQUERY SELECT


OPENQUERY COUNT VERSUS OPENQUERY SELECT

Author
Message
neocoolio
neocoolio
Forum Newbie
Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: General Forum Members
Points: 3 Visits: 3
Hi masters!!! It's my first time here. Please, forgive my poor knowledge.
I've got a working linked Server with Oracle, but one problem:
When I execute a count query it gives me the right answer, but, when I execute a simple select to retrieve the data, it gives me just a part of my count.

SELECT * FROM OPENQUERY(myserver,'SELECT COUNT(*) FROM mytable') ==> This count returns 349, that is the number of lines in my table.
SELECT * FROM OPENQUERY(myserver,'SELECT * FROM mytable') ==> This select returns only 250 lines, that is a part of my table.

Please, can you help me with this scenario?
It would have the same result (349 lines instead of 250).
Thank you so very much (in advance)...
neocoolio
neocoolio
Forum Newbie
Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: General Forum Members
Points: 3 Visits: 3
Hi masters!!!
Finally I found an answer.
I've just changed the (linkedserver properties) @srvproduct that was ODBC, to ORACLE and now it works fine.
Thank you so very much. I hope someone could use this.
Ninja's_RGR'us
Ninja's_RGR'us
SSC-Insane
SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)SSC-Insane (20K reputation)

Group: General Forum Members
Points: 20941 Visits: 9671
neocoolio (8/10/2011)
Hi masters!!!
Finally I found an answer.
I've just changed the (linkedserver properties) @srvproduct that was ODBC, to ORACLE and now it works fine.
Thank you so very much. I hope someone could use this.


Thanks for the feedback. How does that explain the differente behavior? Got a link that explains this?
neocoolio
neocoolio
Forum Newbie
Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)

Group: General Forum Members
Points: 3 Visits: 3
Sorry... I don't know any link to explain the scenario.
I just compared my linkedserver with a friend's one and noticed that the @srvproduct was different. Then I changed this property and it has worked very well.
Unfortunately I don't have further information. Sorry again...
muth_51
muth_51
Mr or Mrs. 500
Mr or Mrs. 500 (534 reputation)Mr or Mrs. 500 (534 reputation)Mr or Mrs. 500 (534 reputation)Mr or Mrs. 500 (534 reputation)Mr or Mrs. 500 (534 reputation)Mr or Mrs. 500 (534 reputation)Mr or Mrs. 500 (534 reputation)Mr or Mrs. 500 (534 reputation)

Group: General Forum Members
Points: 534 Visits: 2862
I am also facing the same problem, but even though i chnaged the @srvproduct=N'oracle', its not returning all the rows. Any clue?
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search