March 7, 2011 at 3:19 pm
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'
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
March 7, 2011 at 3:45 pm
Can any one help me on this syntax,I refered everywhere it seems to right.
(T3.lastchangedtimestamp between
ImportFromDate=? and ImportToDate=?)
these two parmeters are already defined in the datastage .
any help will be greatly appreciated by me and my manager
March 8, 2011 at 1:32 pm
wenkat_j (3/7/2011)
Can any one help me on this syntax,I refered everywhere it seems to right.(T3.lastchangedtimestamp between
ImportFromDate=? and ImportToDate=?)
these two parmeters are already defined in the datastage .
any help will be greatly appreciated by me and my manager
The syntax of a between is as follows:
T3.lastChangedTimestamp BETWEEN ImportFromDate AND ImportToDate
NOT
T3.lastChangedTimestamp BETWEEN ImportFromDate = ? AND ImportToDate = ?
Is this your exact code? That would make things easier.
Michael L John
If you assassinate a DBA, would you pull a trigger?
To properly post on a forum:
http://www.sqlservercentral.com/articles/61537/
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply