Service Desk Practitioners Forum
cancel

Extracting History Lines

Highlighted
Shaun Oelofsen
Honored Contributor.

Extracting History Lines

Hi All,

I am trying to extract the History lines for Service calls, in order to import into a new SD installation.

I tried this SQL statement, that I used from another post, and modified it, but it does not work. Could someone please assist me, with the script, or advise on another way of extracting the history for Service calls and incidents. Thanks

SELECT "ITSM_SERVICECALL"."SER_ID", "ITSM_HISTORYLINES_SERVICECALL"."HSC_CREATED"
, "ITSM_HISTORYLINES_SERVCECALL"."REG_CREATEDBY_OID"
, "ITSM_HISTORYLINES_SERVICECALL"."HSC_SUBJECT"
, "REP_ACCOUNTS"."ACC_SHOWNAME", "ITSM_HISTORYLINES_SERVICECALL"."REG_MODIFIEDBY_OID"
FROM ("sd_userDB"."dbo"."ITSM_HISTORYLINES_SERVICECALL
" "ITSM_HISTORYLINES_SERVICECALL" INNER JOIN "sd_userDB"."dbo"."ITSM_SERVICECALLS" "ITSM_SERVICECALLS" ON "ITSM_HISTORYLINES_SERVICECALL"."HSC_SER_OID"="ITSM_SERVICECALLS"."SER_
OID") INNER JOIN "sd_userDB"."dbo"."REP_ACCOUNTS" "REP_ACCOUNTS" ON "ITSM_HISTORYLINES_SERVICECALL"."REG_CREATEDBY_OID"="REP_ACCOUN
TS"."ACC_OID"

If there are errors please assist.. Unfortuantley I am not a DBA at all, or a developer on SQL scripts.

Regards
Shaun
2 REPLIES
George M. Meneg
Acclaimed Contributor.

Re: Extracting History Lines

Why don't you try to extract items from v_historylineservicecall ?
menes fhtagn
Saji Soman
Trusted Contributor.

Re: Extracting History Lines

Hi,

Try this

SELECT * FROM V_historylineservicecall;

If views are not available in database, then do the following in SD:
1> go to Tools-->system
2> go to system panel --> report setting
3> click on "(Re)generate database views for reporting".

BR,
Saji Soman