Error in SQL Query The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator. for the query

hi Experts,
while running SQL Query i am getting an error as
The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator. for the query
select  T1. Dscription,T1.docEntry,T1.Quantity,T1.Price ,
T2.LineText
from OQUT T0  INNER JOIN QUT1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN
QUT10 T2 ON T1.DocEntry = T2.DocEntry where T1.DocEntry='590'
group by  T1. Dscription,T1.docEntry,T1.Quantity,T1.Price
,T2.LineText
how to resolve the issue

Dear Meghanath,
Please use the following query, Hope your purpose will serve.
select  T1. Dscription,T1.docEntry,T1.Quantity,T1.Price ,
CAST(T2.LineText as nvarchar (MAX))[LineText]
from OQUT T0  INNER JOIN QUT1 T1 ON T0.DocEntry = T1.DocEntry LEFT OUTER JOIN
QUT10 T2 ON T1.DocEntry = T2.DocEntry --where T1.DocEntry='590'
group by  T1. Dscription,T1.docEntry,T1.Quantity,T1.Price
,CAST(T2.LineText as nvarchar (MAX))
Regards,
Amit

Similar Messages

  • [Microsoft][SQL Server Native Client 11.0][SQL Server]The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator.  'Items' (OITM) (OITM)

    Dear Experts,
    i am getting the below error when i was giving * (Star) to view all the items in DB
    [Microsoft][SQL Server Native Client 11.0][SQL Server]The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator.  'Items' (OITM) (OITM)
    As i was searching individually it is working fine
    can any one help me how to find this..
    Regards,
    Meghanath.S

    Dear Nithi Anandham,
    i am not having any query while finding all the items in item master data i am giving find mode and in item code i was trying to type *(Star) and enter while typing enter the above issue i was facing..
    Regards,
    Meghanath

  • How can FMS create a text file and write data into it in the Server application folders?

    Recently, I writed a programe about creating a text file and writing data into it in the server application folder. My code is as following:
               var fileObj = new File("/MyApp/test.txt");
               if( fileObj !=  null)
                      if(fileObj.open( "text", "append"))
                            fileObj.write( "                                                      ———— Chat Info Backup ————\r\n" );
                            fileObj.close( );
                            trace("Chat info backup document :" +  fileObj.name + " has been created successfully!");    
    But when I run it, FMS throw the error as following: File operation open failed  ;  TypeError: fileObj has no properties.
    Can you help me ? Thanks in advance.
    Supplement: The text file named test.txt doesn't exist before create the fileObj, an instance of File Class.

    Is MyApp the name of the application directory, or is it a child of the application directory? If myApp is the app name, just use test.txt as the path flag in the file constructor.

  • UNDERSTAND THE NEW DATE AND TIME DATA TYPES IN ORACLE 9I

    제품 : SQL*PLUS
    작성날짜 : 2001-08-01
    UNDERSTAND THE NEW DATE AND TIME DATA TYPES IN ORACLE 9I
    ========================================================
    PURPOSE
    Oracle 9i 에서 소개되는 새로운 datetime data type 에 대해 소개한다.
    Explanation
    Example
    1. Datetime Datatypes
    1) TIMESTAMP
    : YEAR/MONTH/DAY/HOUR/MINUTE/SECOND
    2) TIMESTAMP WITH TIME ZONE
    : YEAR/MONTH/DAY/HOUR/MINUTE/SECOND/
    TIMEZONE_HOUR/TIMEZONE_MINUTE( +09:00 )
    or TIMEZONE_REGION( Asia/Seoul )
    3) TIMESTAMP WITH LOCAL TIME ZONE
    : YEAR/MONTH/DAY/HOUR/MINUTE/SECOND
    4) TIME WITH TIME ZONE
    : HOUR/MINUTE/SECOND/TIMEZONE_HOUR/TIMEZONE_MINUTE
    2. Datetime Fields
    1) YEAR/MONTH/DAY/HOUR/MINUTE
    2) SECOND(00 to 59.9(N) is precision) : Range 0 to 9, default is 6
    3) TIMEZONE_HOUR : -12 to 13
    4) TIMEZONE_MINUTE : 00 to 59
    5) TIMEZONE_REGION : Listed in v$timezone_names
    3. DATE 와 TIMESTAMP 와의 차이점
    SQL> select hiredate from emp;
    HIREDATE
    17-DEC-80
    20-FEB-81
    SQL> alter table employees modify hiredate timestamp;
    SQL> select hiredate from employees;
    HIREDATE
    17-DEC-80 12.00.00.000000 AM
    20-FEB-81 12.00.00.000000 AM
    단, 해당 Column 에 Data 가 있다면 DATE/TIMESTAMP -> TIMESTAMP WITH
    TIME ZONE 으로 Convert 할 수 없다.
    SQL> alter table employees modify hiredate timestamp with time zone;
    alter table employees modify hiredate timestamp with time zone
    ERROR at line 1:
    ORA-01439: column to be modified must be empty to change datatype
    4. TIMESTAMP WITH TIME ZONE Datatype
    TIMESTAMP '2001-05-24 10:00:00 +09:00'
    TIMESTAMP '2001-05-24 10:00:00 Asia/Seoul'
    TIMESTAMP '2001-05-24 10:00:00 KST'
    5. TIMESTAMP WITH LOCAL TIME ZONE Datatype
    SQL> create table date_tab (date_col TIMESTAMP WITH LOCAL TIME ZONE);
    SQL> insert into date_tab values ('15-NOV-00 09:34:28 AM');
    SQL> select * from date_tab;
    DATE_COL
    15-NOV-00 09.34.28.000000 AM
    SQL> alter session set TIME_ZONE = 'EUROPE/LONDON';
    SQL> select * from date_tab;
    DATE_COL
    15-NOV-00 12.34.28.000000 AM
    6. INTERVAL Datatypes
    1) INTERVAL YEAR(year_precision) TO MONTH
    : YEAR/MONTH
    : Year_precision default value is 2
    SQL> create table orders (warranty interval year to month);
    SQL> insert into orders values ('2-6');
    SQL> select warranty from orders;
    WARRANTY
    +02-06
    2) INTERVAL DAY (day_precision) TO SECOND (fractional_seconds_precision)
    : DAY/HOUR/MINUTE/SECOND
    : Logon time 확인시 주로 사용
    : day_precision range 0 to 9, default is 2
    SQL> create table orders (warranty interval day(2) to second);
    SQL> insert into orders values ('90 00:00:00');
    SQL> select warranty from orders;
    WARRANTY
    +90 00:00:00.000000
    7. Interval Fields
    - YEAR : Any positive or negative integer
    - MONTH : 00 to 11
    - DAY : Any positive or negative integer
    - HOUR : 00 to 23
    - MINUTE : 00 to 59
    - SECOND : 00 to 59.9(N) where 9(N) is precision
    8. Using Time Zones
    1) Database operation
    - Defined at CREATE DATABASE
    - Can be altered with ALTER DATABASE
    - Current value given by DBTIMEZONE
    2) Session operation
    - Defined with environment variable ORA_SDTZ
    - Can be altered with ALTER SESSION SET TIME_ZONE
    - Current value given by SESSIONTIMEZONE
    3) TIMESTAMP WITH LOCAL TIMEZONE
    - TIME_ZONE Session parameter
    : O/S Local Time Zone
    Alter session set time_zone = '-05:00';
    : An absolute offset
    Alter session set time_zone = dbtimezone;
    : Database time zone
    Alter session set time_zone = local;
    : A named region
    Alter session set time_zone = 'America/New_York';
    Reference Document
    ------------------

    Hi ,
    I am facing the same problem and my scenario is also same (BAPI's).
    So can you please tell me how you overcome this problem .
    Thanks,
    Rahul

  • After system restore to back up have lost texts, photos and app data

    Speakers not working on iphone all of a sudden and volume switches not working (just the volume comes up but no bars at the bottom).  So did system restore and more problems.
    After I did this restore (to my backup done today) to my iphone 4s, I now have no text messages on my phone, no photos and no data on my nike running app (6months of records of runs).  Have searched through these forums and still stuck.
    I think I'm going to have to take my iphone somewhere for the speaker issue, but have no idea where as optus sent it out to me directly via mai l(Adelaide, Australia).  
    In the meantime, I really want my texts, photos and app data back on my phone.
    any help HUGELY appreciated..

    thanks for your reply.  I am trying the restore again now.
    But no, I still have no sound, so it was all for naught.  Its fine if I have headphones in, and fine if its in a dock or connected to bluetooth, the phone also rings and I can hear people on the phone:  the only sound that doesnt work is music playing through the speaker, and video.  Also when I press the volume up and down buttons, nothing works.  I suspect there is something wrong with the docking connection as far as I can see from other peoples questions on here.
    But the loss of texts and app data is just the icing on the cake

  • I am trying to cut and paste from a program, IEP DIRECT, and normally on my PC I have no problems; however, when using my MAC the formatting gets all mixed up

    i am trying to cut and paste from a program, IEP DIRECT, and normally on my PC I have no problems; however, when using my MAC the formatting gets all mixed up

    If you refer to this
    https://www.iepdirect.com/iepdotnet/hub/index.html
    then they have an issue with mac version.
    At a first glance, their website is optimized for Windows only, it displays badly in Safari, perhaps it would be better in Firefox or other browser.

  • I have a SharePoint list, that list contains text attachments and image attachments.

    Hi All,
    i have a SharePoint list, that list contains text attachments and image attachments.
    Now, i want to retrive only image attachments from that list.
    here my doubt is, how to check is it image attachment or text attachments
    foreach(var attachment in attachments)
    //what i have to write here
    Thanks in advance!

    Hi,
    While looping for an attachments . Check for attachment extension with (.jpg,png,etc..,).then you can do whatever you want
    SPListItem myListItem = list.GetItemById(1);
    foreach (String attachmentname in myListItem.Attachments)
    //Check for extension
    Please mark as an answer/helpful , if is useful to you.
    Mahesh

  • How to migrate SQL Server image data type to Oracle 8 BLOB data type?

    Hi,
    I have to migrate data from sql server to Oracle 10 g.
    I am unable to migrate image data type from sql server to blob data type in oracle.
    Iam using Oracle Heterogenous Services to migrate the data,Using Merge statement and database link.
    I am getting the following error-
    ERROR at line 7:
    ORA-00932: inconsistent datatypes: expected BLOB got LONG BINARY
    Can any one suggest me how to migrate Image datatype to BLOB???

    Hi you might want to post your question in General Forum.
    General Database Discussions
    There's very few users visit this forum.

  • Transport error - Data type cannot be changed

    I have an infoobject whose data type was changed from NUMC2 to CHAR2.  Everything is fine in Dev system.  However, when I transport to Q, I get method execution with error message "Data type cannot be changed".
    Start of the after-import method RS_IOBJ_AFTER_IMPORT for object type(s) IOBJ (Activation Mode)
    InfoO. YHRSGB01 is used in compounding of YHRAUS01: Data type cannot be changed
    Characteristic YHRSGB01: The method for SID entry has changed
    Characteristic YHRSGB01: The data type has changed from NUMC to CHAR
    SID Table /BIC/SYHRSGB01 contains data: Characteristic YHRSGB01 cannot be activated
    Text Table /BIC/TYHRSGB01 contains data: Characteristic YHRSGB01 cannot be activated
    InfoO. YHRSGB02 is used in compounding of YHRAUS02: Data type cannot be changed
    Any ideas please?
    -Sonny

    Hi,
    1. It will be better if you delete all the data in Development & Quality system for this Objects - Re Activate -collect objects and then transport .
    2. InfoO. YHRSGB01 is used in compounding of YHRAUS01
        InfoO. YHRSGB02 is used in compounding of YHRAUS02
        this two objects are compounded
       check weather this Componded Info objects are available in   Quality System, if not transport them prior
    Regards
    Hari

  • Send html and  image data to browser

    Hi,
    Is it possible to send both html and image data to browser.
    Can I dynamically generate the image and send the image data without storing the image in web server's hard disk.
    Can you plz tell me what areas that I should look for and learn in order to do this.
    THanks a lot,
    Chamal.

    u can make use of jakarta`s commons fileUploader classes to upload ur file to the server
    here is a small example i made
    html is like this
    <html>
    <form method="post" action="/uploadFile" enctype="multipart/form-data">
    <input type="text" name="uname"/>
    File
    <input type="file" name="upfile"/>
    <input type="submit"/>
    </form>
    </html>
    my servlet contains these code
    FileUpload fup=new FileUpload();
              boolean isMultipart = FileUpload.isMultipartContent(req);
    //          Create a new file upload handler
              System.out.println(isMultipart);
              DiskFileUpload upload = new DiskFileUpload();
    //          Parse the request
              List /* FileItem */ items = upload.parseRequest(req);
              Iterator iter = items.iterator();
              while (iter.hasNext()) {
              FileItem item = (FileItem) iter.next();
              if (item.isFormField()) {
              System.out.println("its a field");
              } else {
              System.out.println("its a file");
              System.out.println(item.getName());
              File cfile=new File(item.getName());
              System.out.println(cfile.getName());
              System.out.println(getServletContext().getRealPath("/mine"));
              File tosave=new File(getServletContext().getRealPath("/"),cfile.getName());
              item.write(tosave);
    for more info
    http://sun.calstatela.edu/~cysun/documentation/jakarta/commons/fileupload-1.0/apidocs/org/apache/commons/fileupload/FileItem.html

  • Convert MS SQL server image data type into oracle clob

    Hi all! I'm tryng to access to Microsoft SQL server with Oracle via ODBC. Oracle is not able to use the image data type of Microsoft SQL server. Do you know a way to convert this data type in an oracle format? The explicit casting converts image to long raw, but after the conversion Oracle is not able to manage these data type. Thank you very much!
    Stefano.

    Hi you might want to post your question in General Forum.
    General Database Discussions
    There's very few users visit this forum.

  • Joining table using CHAR and VARCHAR data type as indicator

    Hi All,
    I would like to join 3 tables together but I'm unable to get a perfect concordance (using =) between CHAR and VARCHAR data type.
    Does a command exist to get impartially all data treated as CHAR or VARCHAR ?
    Thanks in advance for your help !

    You want the database to perform with such a crappy database design? Good luck with that.. Instead, you need to look at why you are NOT using surrogate integer based keys for your data tables..
    Thank you,
    Tony Miller
    Webster, TX
    If vegetable oil is made of vegetables, what is baby oil made of?
    If this question is answered, please mark the thread as closed and assign points where earned..

  • Several weeks ago I was forced to change my Apple ID when my e-mail address changed.  I spent several hours resetting all of my devices.  The new ID seems to be recognized everywhere except when I'm asked to enter it for app on my computer.

    Several weeks ago I was forced to change my Apple ID when my e-mail address changed.  I spent several hours on the phone with a tech resetting all of my devices.  The new ID seems to be recognized everywhere except when I'm asked to enter it for app upgrades on my Mac-Pro (10.8.5).  When I'm asked to sign in there, the old e-mail address is still shown and I'm unable to change it.  Suggestions?

    I was forced to change my Apple ID when my e-mail address changed. 
    There is no such requirement.
    You have created an additional Apple-ID, which is different from the one under which you purchased Items from The Mac App Store.
    Go back, log in under the OLD Apple-ID and Add an additional email Address there instead.
    Apple does not yet have a convenient way of combining Apple-IDs.

  • SSIS importing comma delimited with double quote text qualifier - Works in VS - SQL Job ignores text qualifier and fails (truncation)

    I've created an SSIS package to import a comma delimited file (csv) with double quotes for a text qualifier ("). Some of the fields contain the delimiter inside the qualified text. An example row is:
    15,"Doe, John",IS2,Alabama
    In SSIS I've specified the text qualifier as ". The sample output in the connection manager looks great. The package runs perfectly from VS and when manually executed on the SSIS server itself. The problem comes when I schedule the package to run via SQL
    job. At this point the package ignores the text qualifier, and in doing so pushes half of a field into the next available column. But instead of having too many columns, it concatenates the last 2 columns ignoring the delimiter. For example (pipes are fields):
    15|"Doe| John"|IS2,Alabama
    So the failure happens when the last half of a field is too large to fit into the next available field. In the case above _John" is 6 characters where the IS2 field is char(3). This would cause a truncation failure, which is the error I receive from the
    job history.
    To further test this I created a failure flow in my data flow to capture the records failing to be pulled from the source csv. Out of ~5000 records, ~1200 are failing, and every one of the failures has a comma delimiter inside the quoted text with a 'split'
    length greater than the next ordinal field. The ones without the comma were inserted as normal and records where the split fit into the next ordinal column where also imported, with the last field being concatenated w/delimiter. Example records when selected
    from table:
    25|"Allan Percone Trucking"|GI6|California --Imported as intended
    36|"Renolds| J."|UI6,Colorado --Field position offset by 1 to right - Last field overloaded
    To further ensure this is the problem, I changed the csv file and flat file connection manager to pipe delimited, and sure enough every record makes it in perfectly from the SQL job execution.
    I've tried comma delimited on the following set ups. Each set up failed.
    SSIS Server 2008 R2 RTM
    DB Server 2008 RTM
    DB Compat 80
    SSIS Server 2008 R2 RTM
    DB Server 2008 R2 RTM
    DB Compat 80
    SSIS Server 2008 R2 RTM
    DB Server 2008 RTM
    DB Compat 100
    SSIS Server 2008 R2 RTM
    DB Server 2008 R2 RTM
    DB Compat 100
    Since a lot of our data comes in via comma delimited flat files, I really need a fix for this. If not I'll have to rebuild all my files when I import them to use pipe delimiters instaed of commas. I'd like to avoid the extra processing overhead if possible.
    Also, is this a known bug? If so can someone point me to the posting of said bug?
    Edit: I can't ask the vendor to change the format to pipe delimited because it comes from a federal government site.

    Just wanted to share my experience of this for anyone else since I wasted a morning on it today.
    I encountered the same problem where I could run the package fine on my machine but when I deployed to a server and ran the package via dtexec, the " delimeter was being replaced with _x0022_ and columns all slurped up together and overflowing columns/truncating
    data etc.
    Since I didn't want to manually hack the DTS XML and can't install updates, the solution I used was to set an expression on the textdelimiter field of the flat file connection with the value "\"" (a double quote). That way, even if the one stored in XML
    gets bodged somewhere along the way, it is overridden with the correct value at run time. The package works fine everywhere now.

  • Error in SQL query

    I am using the following query to find out the table and column which contain the data '18947567' in any of the column in the whole database.I am gicing some filter condition with the table starting with 'FRI' and with column data type with 'NUMBER' and schema 'FRI' .It is working fine for some schema and tables and this query is giving correct results.But when trying for someother schema it is giving the following errors.
    select distinct table_name
    ,substr (t.column_value.getstringval (), 1, 50) "Column/Value"
    from all_tab_cols,
    table
    (xmlsequence
    (dbms_xmlgen.getxmltype ('select '||column_name
    ||' from '||table_name
    ||' where upper('||column_name||')=''18947567'''
    ).extract('ROWSET/ROW/*'))
    ) t
    where table_name like '%FRI_%'
    and data_type = 'NUMBER'
    and OWNER = 'FRI'
    order by 1
    ORA-19206 AND ORA-06512
    Please help me to solve this error and run the above query.
    Edited by: user10341395 on Jan 18, 2009 10:36 AM
    Edited by: user10341395 on Jan 18, 2009 10:39 AM

    you can post your version?
    SQL> select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
    PL/SQL Release 10.2.0.1.0 - Production
    CORE    10.2.0.1.0      Production
    TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    SQL> select distinct table_name
      2  ,substr (t.column_value.getstringval (), 1, 50) "Column/Value"
      3  from all_tab_cols,
      4  table
      5  (xmlsequence
      6  (dbms_xmlgen.getxmltype ('select '||column_name
      7  ||' from '||table_name
      8  ||' where upper('||column_name||')=''18947567'''
      9  ).extract('ROWSET/ROW/*'))
    10  ) t
    11  where table_name like '%FRI_%'
    12  and data_type = 'NUMBER'
    13  and OWNER = 'FRI'
    14  order by 1
    15  /
    no rows selected
    SQL>

Maybe you are looking for

  • Could not complete the command because the extension could not be loaded

    I was working in 3D with PS CS5 Extended. I went to the Window drop down menu and selected Color. I got the message "Could not complete the command because the extension could not be loaded" and the color pallet and swatches would not appear. I had t

  • What identically replaces CS 5 "Create Web Photo Album"?

    I have one web site that is using the Dreamweaver CS4 "Create Web Photo Album", however now that I have upgraded to DW CS5, "Create Web Photo Album" is no longer available.  I know you can use Bridge but I need an identical layout of the photo album

  • Multiple Country of Origin at a Material Master level- Foreign Trade import

    Hi Gurus, We have a requirement to store Multiple Country of origin at a Material Master level . One Part/Material is sourced from different vendors and they are manufactured in different countries . Please note that we are not using Batch Management

  • Maps direct to phone?

    I'm occasionally "on the road".  I have a Nokia 5800 so can connect it directly to the internet via WiFi but how do I download the Nokia map for wherever I find myself?  I don''t have Ovi Suite on my employer's laptop Papadeltasierra.

  • Inventory Revaluation

    I need detail information about inventory revaluation, like Tutorial process , import data from DWT , and also how we can do it, and also solution for following matter :Now we have some problem in balance of inventory account, some of them has negati