openquery problem

  • select coalesce(col1,0) from openquery(mySourceDB,

    '

    SELECT MIN(con_id) AS col1 FROM myTable

    WHERE dateField >= ''06/03/2011''

    ')

    it's complaining at me. aparently column "[MSDASQL].col1" from OLE DE provider "MSDASQL" for linked server cannot be NULL... Any ideas why?

    Cheers Guys.

    Ben

    ^ Thats me!

    ----------------------------------------
    01010111011010000110000101110100 01100001 0110001101101111011011010111000001101100011001010111010001100101 01110100011010010110110101100101 011101110110000101110011011101000110010101110010
    ----------------------------------------

  • I tried to recreate your issue but was unsuccessful.

    Can you please provide:

    - version of remote server

    - the DDL for your remote table

    - the DML to fill the table with the data that will allow us to recreate the issue. if there is too much data in the remote table to post or if it's sensitive try to give the minimum amount of data that will allow us to recreate the issue

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • It might have something to do with the remote server being Informix 5 on a SCO OpenServer box...

    I'm not all that fussed to fix it as I'm going to be querying the box through a PHP script, was more just a case of whether anyone had already come across this before.

    Thanks for your time 🙂

    Ben

    ^ Thats me!

    ----------------------------------------
    01010111011010000110000101110100 01100001 0110001101101111011011010111000001101100011001010111010001100101 01110100011010010110110101100101 011101110110000101110011011101000110010101110010
    ----------------------------------------

  • Ahhh...the use of MSDASQL provider threw me off. That is the "Microsoft OLE DB Provider for ODBC". You may want to look into a proper provider to reach an Informix database through a Linked Server. I did some quick looking on the internets and see something called Ifxoledbc that might be worth a look.

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • cool thanks.

    I'll take a look into that. we are a little bit limited in that we have no control over the services installed and running on the sco box and so far have only been able to connect using esker tun plus.

    Ben

    ^ Thats me!

    ----------------------------------------
    01010111011010000110000101110100 01100001 0110001101101111011011010111000001101100011001010111010001100101 01110100011010010110110101100101 011101110110000101110011011101000110010101110010
    ----------------------------------------

  • Alas I'm on informix SE 5.10, whereas oledb requires 7.3 dynamic server 🙁

    Ben

    ^ Thats me!

    ----------------------------------------
    01010111011010000110000101110100 01100001 0110001101101111011011010111000001101100011001010111010001100101 01110100011010010110110101100101 011101110110000101110011011101000110010101110010
    ----------------------------------------

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply