OSB Service with Oracle AQ with payload type SYS.AQ$_JMS_TEXT_MESSAGE

I am trying to write a web-service to Enqueue/Dequeue messages from an AQ with payload type SYS.AQ$_JMS_TEXT_MESSAGE defined in Oracle DB.
In my understanding is that I need to create a JMSModule within weblogic with a ForeignServer defined within it to enqueue/dequeue message to/from the AQ.
I have created Datasource, JMSServer, JMSModule, ForeignServer (created ConnectionFactory with localJNDIName="MyQueueCF" and RemoteJNDIName as "QueueConnectionFactory" and Destination with localJNDIName="MyQueueDest" and RemoteJNDIName="Queues/<queue_name_in_DB>")
My business service has an endpoint "http://localhost:7001/MyQueueCF/MyQueueDest"
When I am testing my service to populate message on to the Queue. I get the following error:
The error was oracle.jms.AQjmsException: Error creating the db_connection
My questions are:
* Am I following the correct procedure to talk to AQ with JMS text message type payload?
* If yes, how can I get around the issue I am stuck with?
Please help!
Thanks.
Edited by: user4696353 on 27-Sep-2011 11:43
Edited by: user4696353 on 27-Sep-2011 11:49
Edited by: user4696353 on 27-Sep-2011 12:25

Example:
conn / as sysdba
begin
dbms_aqadm.create_queue_table
( queue_table=> 'SCOTT.AQJMS'
, queue_payload_type=> 'SYS.AQ$_JMS_TEXT_MESSAGE'
, compatible=> '9.1'
end;
This worked fine for me after a standard DB-installation.

Similar Messages

  • Issue with Oracle LONG RAW data type

    Hi All,
    I am facing some issues with Oracle LONG RAW DATA Type.
    We are using Oracle 9IR2 Database.
    I got a table having LONG RAW column and I need to transfer the same into another table having LONG RAW column.
    When I tried using INSERT INTO SELECT * command (or) CREATE TABLE as select * , it is throwing ORA-00997: illegal use of LONG datatype.
    I have gone through some docs and found we should not use LONG RAW using these operations.
    So I did some basic PLSQL block given below and I was able to insert most of the records. But records where the LONG RAW file is like 7O kb, the inserting is faliling.
    I tried to convert LONG RAW to BLOB and again for the record where the LONG RAW is big in size I am getting (ORA-06502: PL/SQL: numeric or value error) error.
    Appreciate if anyone can help me out here.
    DECLARE
    Y LONG RAW;
    BEGIN
    FOR REC IN (SELECT * FROM TRU_INT.TERRITORY WHERE TERRITORYSEQ=488480 ORDER BY TERRITORYSEQ ) LOOP
    INSERT INTO TRU_CMP.TERRITORY
    BUSINESSUNITSEQ, COMPELEMENTLIFETIMEID, COMPONENTIMAGE, DESCRIPTION, ENDPERIOD, GENERATION, NAME, STARTPERIOD, TERRITORYSEQ
    VALUES
    REC.BUSINESSUNITSEQ, REC.COMPELEMENTLIFETIMEID, REC.COMPONENTIMAGE, REC.DESCRIPTION, REC.ENDPERIOD, REC.GENERATION, REC.NAME,
    REC.STARTPERIOD, REC.TERRITORYSEQ
    END LOOP;
    END;
    /

    Maddy wrote:
    Hi All,
    I am facing some issues with Oracle LONG RAW DATA Type.
    We are using Oracle 9IR2 Database.
    I got a table having LONG RAW column and I need to transfer the same into another table having LONG RAW column.
    When I tried using INSERT INTO SELECT * command (or) CREATE TABLE as select * , it is throwing ORA-00997: illegal use of LONG datatype.
    I have gone through some docs and found we should not use LONG RAW using these operations.
    So I did some basic PLSQL block given below and I was able to insert most of the records. But records where the LONG RAW file is like 7O kb, the inserting is faliling.
    I tried to convert LONG RAW to BLOB and again for the record where the LONG RAW is big in size I am getting (ORA-06502: PL/SQL: numeric or value error) error.
    Appreciate if anyone can help me out here.
    DECLARE
    Y LONG RAW;
    BEGIN
    FOR REC IN (SELECT * FROM TRU_INT.TERRITORY WHERE TERRITORYSEQ=488480 ORDER BY TERRITORYSEQ ) LOOP
    INSERT INTO TRU_CMP.TERRITORY
    BUSINESSUNITSEQ, COMPELEMENTLIFETIMEID, COMPONENTIMAGE, DESCRIPTION, ENDPERIOD, GENERATION, NAME, STARTPERIOD, TERRITORYSEQ
    VALUES
    REC.BUSINESSUNITSEQ, REC.COMPELEMENTLIFETIMEID, REC.COMPONENTIMAGE, REC.DESCRIPTION, REC.ENDPERIOD, REC.GENERATION, REC.NAME,
    REC.STARTPERIOD, REC.TERRITORYSEQ
    END LOOP;
    END;
    /below might work
    12:06:23 SQL> help copy
    COPY
    Copies data from a query to a table in the same or another
    database. COPY supports CHAR, DATE, LONG, NUMBER and VARCHAR2.
    COPY {FROM database | TO database | FROM database TO database}
                {APPEND|CREATE|INSERT|REPLACE} destination_table
                [(column, column, column, ...)] USING query
    where database has the following syntax:
         username[/password]@connect_identifier

  • Can not dequeue JMS message of type SYS.AQ$_JMS_TEXT_MESSAGE using DBMS_AQ

    I'm having a problem using DBMS_AQ package to dequeue a JMS message of type SYS.AQ$_JMS_TEXT_MESSAGE that was put on the queue using Java JMS API.
    Both JMS header and payload return empty but if I do "select user_data" from the queue table, I can see the message.
    Appreciate any helps or tips.
    Kim

    This has been asked a lot of times - I'm not sure how my initial searching missed all of the other questions/answers related to this topic.
    In our case, the solution was to:
    1) Leave the queue as a sys.aq$_jms_text_message type
    2) Construct a sys.xmltype object with our desired payload
    3) Do a getStringVal() on the xmltype object and use that string as the payload for our queue message
    - Nathan

  • Implementation of OSB service to Http GET XML payload

    Hi,
    I am new to OSB.I have a requirement where Ecommerce system will post a XML over HTTP.
    Our OSB service has to receive that XML using Http GET and send it to a SOA composite as a SOAP.
    My doubt are
    1.can we implement the proxy service with service type any XML structure
    2.Will Ecommerce provide any WSDL so that we can configure it in our proxy service.
    Pls help.
    thanks

    Hi,
    947423 wrote:
    1.can we implement the proxy service with service type any XML structureYes, that should be alright...
    2.Will Ecommerce provide any WSDL so that we can configure it in our proxy service.\Probably not, if they are just sending an XML over HTTP that is probably not SOAP, if at least they can provide you an XSD that would be nice... Otherwise you may have to write one...
    Cheers,
    Vlad
    It is considered good etiquette to reward answerers with points (as "helpful" - 5 pts - or "correct" - 10pts)
    https://forums.oracle.com/forums/ann.jspa?annID=893

  • How to consume message with queue payload type 'SYS.AQ$_JMS' in BPEL

    In oracle database
    1. created a queue table with multi consumer, queue_payload_type => 'SYS.AQ$_JMS_OBJECT_MESSAGE' .
    2. created a queue using this queue table.
    3. started the queue.
    4. From java class, published a message into this queue.
    Now when I try to access this queue from bpel using AQ adapters, not able to see the queue name. But if I try to consume from java, it is working fine.
    Please let me know how we need to access from bpel the messages that are not of xml type and are user defined objects.
    Thanks

    Hi
    Thank You for your information,
    I have seen that link which you have provided. Here they have given a example in which they are using Database messaging, i am working on memory/file based messaging.
    I am using default JMS Queue (jms/demoQueue) and default Connection Factory (jms/QueueConnectionFactory) which is provided by default in the server. With these i am trying to push message from process to the Queue.
    From other process i am trying to receive a message.
    For default Queue and Connection factory, i think we dont need to configure any of the xml files.
    Please try to use default Queue and Connection Factory to recevie a message from the Queue. Use two different process to develop this.
    Thank You
    Rgards
    Reddy

  • Problem with Oracle Forums with Opera Browser

    Hello Oracle, i am having trouble navigating and posting thread with Opera Browser version 8.54 The problem is the following:
    When i enter an Url in the Opera Browser for example:
    BPEL
    The page apears ok except for the images that does not appear
    and the main problem is that the links appear to point to this direction
    http://forums.oracle.com/thread.jspa?threadID=384456&tstart=0
    That points to a Oracle 404 error page.
    The link should be pointing to
    Bpel Process Analytics
    It appears that the forums page generates the wrong page link, it apears that deletes the /forums part from the page link.
    Thank you very much

    I have the same problem. Here is the error from alert log
    Thu Mar 23 10:40:10 2006
    Errors in file /oracle/admin/CAASTGPD/udump/caastgpd_ora_10365.trc:
    ORA-07445: exception encountered: core dump [lnxsni()+177] [SIGSEGV] [Address not mapped to object] [0x1] [] []
    Thu Mar 23 10:44:23 2006
    Errors in file /oracle/admin/CAASTGPD/udump/caastgpd_ora_11256.trc:
    ORA-07445: exception encountered: core dump [lnxsni()+177] [SIGSEGV] [Address not mapped to object] [0x1] [] []
    Thu Mar 23 10:45:08 2006
    Here is from trace file
    Exception signal: 11 (SIGSEGV), code: 1 (Address not mapped to object), addr: 0x1, PC: [0xa1cde3d, lnxsni()+177]
    Registers:
    %eax: 0x00000000 %ebx: 0x0ad4d4c4 %ecx: 0x00000000
    %edx: 0x00000001 %edi: 0x6d9f37a0 %esi: 0x00000016
    %esp: 0xbfff4a18 %ebp: 0xbfff4a84 %eip: 0x0a1cde3d
    %efl: 0x00010202
    lnxsni()+160 (0xa1cde2c) movzb (%edx),%ecx
    lnxsni()+163 (0xa1cde2f) cmp $0x80,%ecx
    lnxsni()+169 (0xa1cde35) jz 0xa1ce706
    lnxsni()+175 (0xa1cde3b) jmp 0xa1cde40
    lnxsni()+177 (0xa1cde3d) movzb (%edx),%ecxlnxsni()+180 (0xa1cde40) mov 0xffffffd0(%ebp),%edi
    lnxsni()+183 (0xa1cde43) mov %ecx,%eax
    lnxsni()+185 (0xa1cde45) sar $0x7,%eax
    lnxsni()+188 (0xa1cde48) mov %eax,0xffffffcc(%ebp)
    *** 2006-03-23 10:44:23.963
    ksedmp: internal or fatal error
    ORA-07445: exception encountered: core dump [lnxsni()+177] [SIGSEGV] [Address not mapped to object] [0x1] [] []
    Current SQL statement for this session:
    SELECT SYS_OP_ITR("XML_CONTENT",:"SYS_B_0",:"SYS_B_1") FROM "XML_DOCUMENT" "XML_DOCUMENT"
    ----- Call Stack Trace -----
    calling call entry argument values in hex
    location type point (? means dubious value)
    ksedmp()+269 call ksedst()+0 1 ? 0 ? 0 ? 1 ? 6678302C ?

  • Restore Database with Oracle 9i with a New Host using RMAN

    Gurus,
    I am trying to restore a database from some RMAN created files on a new host with a new directory structure for some testing. I do not have access to the source database.
    The database is Oracle 9i.
    The files that have been created are the following:
    'C-2995630462-20110214-00' is the control file and SP file backup.
    'B_ABM4KAJ5_1_1' is the database backup.
    B_ACM4KARS_1_1 and B_AAM4KAIV_1_1 are archived redo logs
    Here is the RMAN listing from when the files were created:
    BS Key Size Device Type Elapsed Time Completion Time
    329 56M DISK 00:00:02 14/FEB/11
    BP Key: 329 Status: AVAILABLE Tag: TAG20110214T050015
    Piece Name: D:\BACKUPS\CRYSTAL\B_AAM4KAIV_1_1
    List of Archived Logs in backup set 329
    Thrd Seq Low SCN Low Time Next SCN Next Time
    1 184 4602414767 13/FEB/11 4602533494 14/FEB/11
    BS Key Type LV Size Device Type Elapsed Time Completion Time
    330 Full 13G DISK 00:04:33 14/FEB/11
    BP Key: 330 Status: AVAILABLE Tag: TAG20110214T050021
    Piece Name: D:\BACKUPS\CRYSTAL\B_ABM4KAJ5_1_1
    List of Datafiles in backup set 330
    File LV Type Ckp SCN Ckp Time Name
    1 Full 4602533509 14/FEB/11 D:\ORACLE\ORADATA\CRYSTAL\SYSTEM01.DBF
    2 Full 4602533509 14/FEB/11 D:\ORACLE\ORADATA\CRYSTAL\UNDOTBS01.DBF
    3 Full 4602533509 14/FEB/11 D:\ORACLE\ORADATA\CRYSTAL\USERS01.DBF
    BS Key Size Device Type Elapsed Time Completion Time
    331 37K DISK 00:00:01 14/FEB/11
    BP Key: 331 Status: AVAILABLE Tag: TAG20110214T050500
    Piece Name: D:\BACKUPS\CRYSTAL\B_ACM4KARS_1_1
    List of Archived Logs in backup set 331
    Thrd Seq Low SCN Low Time Next SCN Next Time
    1 185 4602533494 14/FEB/11 4602533686 14/FEB/11
    BS Key Type LV Size Device Type Elapsed Time Completion Time
    332 Full 3M DISK 00:00:01 14/FEB/11
    BP Key: 332 Status: AVAILABLE Tag:
    Piece Name: D:\BACKUPS\CRYSTAL\C-2995630462-20110214-00
    SPFILE Included: Modification time: 23/NOV/10
    I am new to using RMAN and I'm hoping someone could point me in a direction of some documentation to assist with the scenario described above. I've looked at several Oracle documents but have been unable to find a way to separate out the spfile from the control file.
    Any help you can provide would be greatly appreciated.
    Thanks.

    Thanks Meeran.
    I have attempted to follow the directions from the RMAN document that you posted and have run into the following error:
    C:\>rman target / nocatalog
    Recovery Manager: Release 9.2.0.6.0 - Production
    Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.
    connected to target database: DUMMY (not mounted)
    using target database controlfile instead of recovery catalog
    RMAN> startup force nomount
    startup failed: ORA-01078: failure in processing system parameters
    LRM-00109: could not open parameter file 'C:\ORACLE\ORA92\DATABASE\INITCRYSTAL.O
    RA'
    trying to start the Oracle instance without parameter files ...
    Oracle instance started
    Total System Global Area 97591104 bytes
    Fixed Size 454464 bytes
    Variable Size 46137344 bytes
    Database Buffers 50331648 bytes
    Redo Buffers 667648 bytes
    RMAN> RESTORE SPFILE TO 'C:\oracle\admin\crystal\pfile\init.ora' from 'C:\oracle
    \ora92\CRYSTALbk\C-2995630462-20110214-00';
    Starting restore at 30-MAR-11
    using channel ORA_DISK_1
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of restore command at 03/30/2011 11:30:07
    ORA-00600: internal error code, arguments: [1866], [0x41AA450], [6144], [0x41BAD
    B4], [], [], [], []
    RMAN>
    Am I not correctly connected to the target?
    It looks like it correctly tried to create a dummy spfile, but when attempting the restore from the file it breaks.
    Any suggestions? Thanks.

  • Help with oracle 10g with servlet

    Someone please help me with this error when i compile this:
    import java.io.*;
    import java.net.*;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Statement;
    import javax.servlet.*;
    import javax.servlet.http.*;
    * @author GeorgeZheng
    * @version
    public class MyServlet2 extends HttpServlet {
    /** Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods.
    * @param request servlet request
    * @param response servlet response
    protected void processRequest(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException, SQLException, ClassNotFoundException {
    response.setContentType("text/html;charset=UTF-8");
    PrintWriter out = response.getWriter();
    doPost(request,response);
    out.close();
    protected void doGet(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
    try {
    processRequest(request, response);
    } catch (SQLException ex) {
    throw new ServletException(ex);
    catch (ClassNotFoundException ex) {
    throw new ServletException(ex);
    /** Handles the HTTP <code>POST</code> method.
    * @param request servlet request
    * @param response servlet response
    protected void doPost(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
    try {
    processRequest(request, response);
    String username = request.getAttribute("username").toString();
    String password = request.getAttribute("password").toString();
    if(validateUser(username, password))
    response.sendRedirect("SQL.html");
    else
    response.sendRedirect("input.jsp");
    } catch (SQLException ex) {
    throw new ServletException(ex);
    catch (ClassNotFoundException ex) {
    throw new ServletException(ex);
    /** Returns a short description of the servlet.
    public String getServletInfo() {
    return "Short description";
    public boolean validateUser(String user, String pass)
    throws IOException, ServletException{
    int checker = 0;
    boolean test = false;
    try
    Class.forName("oracle.jdbc.driver.OracleDriver");
    Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:XE","hr", "123456kk");
    System.out.println("database connected");
    Statement sqlStatement = conn.createStatement();
    ResultSet rs = sqlStatement.executeQuery("select * from log");
    while(rs.next())
    if(rs.getString(1) == user)
    checker++;
    if(rs.getString(2) == pass)
    checker++;
    conn.close();
    return test;
    catch (SQLException e)
    throw new ServletException("Servlet cannot display the records", e);}
    catch (ClassNotFoundException e)
    throw new ServletException("JDBC Driver not found.", e);
    it gave me this error:
    Deploying application in domain failed; Error loading deployment descriptors for practiced Line 12 Column 48 -- Duplicate unique value [MyServlet2] declared for identity constraint of element "web-app".
    ; requested operation cannot be completed
    C:\Documents and Settings\GeorgeZheng\practiced\nbproject\build-impl.xml:452: Deployment error:
    The module has not been deployed.
    See the server log for details.

    I would guess that your problems has to do with your web.xml file.
    MeTitus

  • Problem with Oracle RAC with DRCP and persistent connections

    Hello,
    I am having a problem that has me stumped. I cannot get SCAN, and DRCP to work together nicely.
    Right now, I can connect through my scan hostname fine without connection pooling, once I enable it I start having connection time outs. I found if I specified outbound_connection_timeout in sqlnet.ora that it times the connection out to the time I set in there. If I don't set this option I get a "ORA-12170: TNS:Connect timeout occurred".
    The odd thing is I can leave connection pooling on and connect to one of my rac instances individually and it doesn't experience this problem. The only time it pops up is if I combine multiple rac instances (Through the use of SCAN or tnsnames.ora) and I enable connection pooling.
    I don't know which direction to go to even diagnose this, so any and all help is appreciated.
    Thank you.
    Edited by: Rarp on Oct 1, 2011 10:47 PM

    Hi,
    You need to detail the problem. Enable TRACE SQL*NET on the server and client using note below.
    How to Enable Oracle SQLNet Client , Server , Listener , Kerberos and External procedure Tracing from Net Manager [ID 395525.1]
    Also you can try check this note:
    11g: ORA-12170 With Combination RAC, DRCP and a Firewall [ID 953277.1]
    Hope this helps,
    Levi Pereira

  • How to do pagination with oracle along with java

    hi
    i want to know how to use pagination codes along with java.

    Are you sure that you're on the right forum? This is the forum for Berkeley DB, Java Edition, and we don't support SQL.
    Linda

  • Getting error  with oracle oci type driver

    Hi,
    while I'm using the oracle oci type driver I got the error but it works fine with the thin driver.
    so where should I the information regard this.I'm working with oracle 8i.
    with
    raghu

    while I'm using the oracle oci type driver I got the
    error but it works fine with the thin driver.What is the error ?
    so where should I the information regard this.I'm
    working with oracle 8i.As long as you have the 8i client set up properly, the JDBC OCI drivers will work. To test just go to the command prompt and try tnsping and/or sqlplus to connect to your DB.
    Post your JDBC URL and the exception you are getting if you are still having problems.

  • IMP-00017: following statement failed with ORACLE error 2304

    Hi,
    in 9i DB when importing I have :
    IMP-00017: following statement failed with ORACLE error 2304:
    "CREATE TYPE "T_NUMBER" TIMESTAMP '2007-04-02:10:02:26' OID '6B4C21C0310143B"
    "A97211E5E8301C09E' "
    " as table of number"
    IMP-00003: ORACLE error 2304 encountered
    ORA-02304: invalid object identifier literal
    Can any one please explaine me the problem and if possible a solution ?
    Many thanks.

    The problem is explained in the metalink Note:113335.1

  • Oracle10g RAC with Oracle clusterware

    Hi,
    We are installing Oracle10g RAC with Oracle clusterware with ASM on Solaris 10. Does anybody have a installation/configuration manual for this combination.
    Thanks,
    Murtuja

    Sun would not recommend using Oracle 10g RAC without Sun Cluster. Setup for that configuration would be found in the Sun Cluster Data Service for Oracle 10g RAC and the Oracle installation manuals.
    The installation of Oracle Clusterware alone would be documented in Oracle's manuals. If you have any problems with that, you are better off asking Oracle.
    Regards,
    Tim
    ---

  • PeopleSoft 8.53 Integration with Oracle SES

    Dear All,
    My System Details are : 
    Machine 1
    Hostname : host1
    Port : port1
    Application : PeopleSoft 8.53 + HCM 9.2 (DEMO) + Oracle 11g
    Default IB Node : PSFT_HR
    OS : Windows 7 (64 Bit)
    Machine 2
    Hostname : host2
    Port : port2
    Application :Oracle Secure Enterprise Search 11.1.2.2.0
    OS : Windows 2008 Server (64 Bit)
    Machine 3
    Hostname : host3
    Port : port3
    Application : PeopleSoft 8.53 + ELM 9.2 (DEMO) + Oracle 11g
    Default IB Node : PSFT_LM
    OS : Windows 7 (64 Bit)
    No Error was encountered while installation and systems started without any error.
    I was able to integrate PeopleSoft HCM with Oracle SES (with great help from my forum friends ).
    I was able to establish Global search in HCM 9.2.
    Now I have PeopleSoft ELM installed on host3. I need to integrate this to the same SES Server Installed on host2.
    In identity management setup on Oracle SES entry is given for host1(HCM).
    How can I achieve this. I know I need to establish Single-Signon between ELM and HCM but, I am not sure how.
    Kindly help.

    Thanks HakanBiroglu for the response.
    I went through the post. I am aware of these steps.
    But I need help on point 2.
    2.There should be single sign on setup between these DB's
    How to achieve this ?

  • Oracle UCM with Weblogic portals

    Does any one has idea working with oracle UCM with Weblogic portals. Can anyone suggest any tutorial in online.

    Provided you are using the Oracle UCM Content Adapter for WLP (UCM SPI), using content sourced from UCM in WLP applications is not different from using content from other Repositories.
    See http://download.oracle.com/docs/cd/E13155_01/wlp/docs103/ucm_adapter/index.html for information on using the Adapter and for tips on content modeling.
    Brad

Maybe you are looking for

  • HT1600 no longer mirrors with my devices

    airplay no longer works... it was working fine today and all of a sudden it stopped working.  I've restarted my apple tv and even restored to its original factory setting and nothing.  please help

  • Scanning with HP

    Is there an HP scan utility / download that I am missing? Perhaps something else? 1) I installed OS X 10.6.4 via installation disk. 2) When I installed it, I chose NOT to install the printer drivers and NOT to install printer drivers for printers clo

  • How to use a Session object in a Javascript function

    I have an object that I have set in my session. On my jsp I want to pull it out of my session and use it as a parameter for a javascript function. But I am not sure how to do that... the function call is below... I want to assign a value to ifFormat

  • Struts class not found for war file

    Hello, I am tring to deploy my struts web application in weblogic 8.1. I have all the library files in web-inf\lib directory. It gave me the error that class not found for some class in struts library. The console also told me the classpath. But I ca

  • Are Pivot and Unpivot supported in SSRS

    We're upgrading from SSRS 2005 to 2008 R2.  I'm rewriting some of my reports and using Unpivot. In SQL it works fine when I run it against the database.  But in SSRS (BIDS 2008) when I paste the working SQL statement into the Query Builder, I get an