Query Code in List Manager

Former Member
Former Member $organization

I have some code that is running fine in SQL but when I copy it to a list (using the manual edit) then I get an error message. The error says:

Insert error: Column name or number of supplied values does not match table definition.

Here is the code I am using. Any ideas? I just don't know why it's working in SQL and not the list.

 

 

 

 

 

 

 

 

 

SELECT

 

 

DISTINCT o.order_no, c.customer_no FROM dbo.

T_ORDER o

JOIN

 

 

dbo.T_LINEITEM l ON o.order_no = l.

order_no

JOIN

 

 

dbo.T_CUSTOMER c ON c.customer_no = o.

customer_no

WHERE

 

 

o.order_dt BETWEEN '2010/07/10' AND

'2010/08/04'

AND

 

 

l.tot_pur_amt >

0

AND

 

 

EXISTS(select 1 from dbo.T_LINEITEM l (NOLOCK)

Where

 

 

l.order_no = o.

order_no

HAVING

 

 

count(distinct convert(char(12), perf_no)) <=4

)

AND

 

 

l.perf_no IN (SELECT p.perf_no FROM dbo.

VS_PERF p

WHERE

 

 

p.season = 165

)

  • Former Member
    Former Member $organization

    Right! Thanks Brian!

     

    From: Tessitura Technical Forum [mailto:forums-technical@tessituranetwork.com] On Behalf Of Brian Wilbur Grundstrom
    Sent: Wednesday, August 04, 2010 2:27 PM
    To: Gloria Ormsby
    Subject: RE: [Tessitura Technical Forum] Query Code in List Manager

     

    You can only select customer_no in a list.   You have to remove order no.

     

    From: Gloria Ormsby [mailto:bounce-gloriaormsby5026@tessituranetwork.com]
    Sent: Wednesday, August 04, 2010 2:07 PM
    To: Brian Grundstrom
    Subject: [Tessitura Technical Forum] Query Code in List Manager

     

    I have some code that is running fine in SQL but when I copy it to a list (using the manual edit) then I get an error message. The error says:

    Insert error: Column name or number of supplied values does not match table definition.

    Here is the code I am using. Any ideas? I just don't know why it's working in SQL and not the list.

     

     

     

     

     

     

     

     

     

    SELECT

     

     

    DISTINCT o.order_no, c.customer_no FROM dbo.

    T_ORDER o

    JOIN

     

     

    dbo.T_LINEITEM l ON o.order_no = l.

    order_no

    JOIN

     

     

    dbo.T_CUSTOMER c ON c.customer_no = o.

    customer_no

    WHERE

     

     

    o.order_dt BETWEEN '2010/07/10' AND

    '2010/08/04'

    AND

     

     

    l.tot_pur_amt >

    0

    AND

     

     

    EXISTS(select 1 from dbo.T_LINEITEM l (NOLOCK)

    Where

     

     

    l.order_no = o.

    order_no

    HAVING

     

     

    count(distinct convert(char(12), perf_no)) <=4

    )

    AND

     

     

    l.perf_no IN (SELECT p.perf_no FROM dbo.

    VS_PERF p

    WHERE

     

     

    p.season = 165

    )




    This message was sent automatically to you by www.tessituranetwork.com because you subscribed to the Tessitura Technical Forum. You may reply to this message to post to the Technical forum or visit the site to search, read and post to the forums. In the interest of keeping the forum posts from becoming cluttered, we encourage you to delete previous message text from your reply before sending. Thank you!




    This message was sent automatically to you by www.tessituranetwork.com because you subscribed to the Tessitura Technical Forum. You may reply to this message to post to the Technical forum or visit the site to search, read and post to the forums. In the interest of keeping the forum posts from becoming cluttered, we encourage you to delete previous message text from your reply before sending. Thank you!