error when passing syntax in sql server 2000

  • I have a question,I am using data stage to get data from sql server 2000 and one of my query is behaving indifferently.Can you please check its parameters for its syntax.

    im having error in 'the between', where I am passing the parameters.I have predefined parameters for the fromdate and todate but its giving me unusual error 'unknown error invoking sql builder'

    HELP WILL BEE GREATLY APPRECIATED>>>>PLZZZ very urgent

    select distinct T1.dbid,

    T1.id,

    T1.crtype,

    T5.name AS State,

    T1.status,

    T3.name AS APAR,

    T3.state AS APARstate,

    T3.closecode_1 AS APARcloseCode ,

    T6.product,

    T4.resolutioncode,

    T7.name AS HowFound,

    T1.headline,

    T8.login_name as Submitter

    from ( ( ( ( ( ( ( ( cqu_user.changerequest T1 INNER JOIN cqu_user.statedef T5 ON T1.state = T5.id )

    INNER JOIN cqu_user.product T6 ON T1.product = T6.dbid )

    INNER JOIN cqu_user.resolutioncode T4 ON T1.resolutioncode_1 = T4.dbid )

    INNER JOIN cqu_user.howfound T7 ON T1.howfound_1 = T7.dbid )

    INNER JOIN cqu_user.users T8 ON T1.submitter = T8.dbid )

    INNER JOIN cqu_user.component T11 ON T1.component = T11.dbid )

    LEFT OUTER JOIN cqu_user.parent_child_links T3mm ON T1.dbid = T3mm.parent_dbid and 16789888 = T3mm.parent_fielddef_id )

    LEFT OUTER JOIN cqu_user.apar T3 ON T3mm.child_dbid = T3.dbid )

    where T1.dbid <> 0 and ((T1.crtype = 'Defect' and T3.state = 'CLOSED'

    and (T3.lastchangedtimestamp between //// CAN YOU CHECK ITS SYNTAX//

    ImportFromDate=? and ImportToDate=?)

    and (T3.closecode_1 <> 'PER' or T3.closecode_1 is NULL)

    and (T3.closecode_1 <> 'DOC' or T3.closecode_1 is NULL)

    and (T3.closecode_1 <> 'PRS' or T3.closecode_1 is NULL)

    and (T3.closecode_1 <> 'UR3' or T3.closecode_1 is NULL)))

    and ((T11.dbid in (select parent_dbid from cqu_user.parent_child_links where parent_fielddef_id = 16791309

    and child_dbid in (select child_dbid from cqu_user.parent_child_links where parent_fielddef_id = 16777355

    and parent_dbid = 35938126) )))

    order by T3.name DESC

    Reply

    Forward

    Meera is not available to chat

  • Please don't cross post. The original thread is here

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/

Viewing 2 posts - 1 through 1 (of 1 total)

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