Teradata Studio Express 14.01 now available

Tools
Tools covers the tools and utilities you use to work with Teradata and its supporting ecosystem. You'll find information on everything from the Teradata Eclipse plug-in to load/extract tools.
Teradata Employee

Re: Teradata Studio Express 14.01 now available

Yes, that works. You can simply choose a difference connection profile from the drop down list.  If the connection profile is not connected, it will ask you if you want to connect. If you are getting a Parse Error, you have something wrong with your SQL statement. It sounds like, with a split error that a semi-colon is in the wrong place. Are there any red underscores present in the SQL?

Enthusiast

Re: Teradata Studio Express 14.01 now available

Hi, the SQL I tested was very simple. Select * from dbc.dbcinfo;

I did not change anything in the sql, I just chose the other connection wich also had status connected. I got this split error message when I tried execute to the other connection. A red underscore occured under the "*" in my statement.

Teradata Employee

Re: Teradata Studio Express 14.01 now available

@Bjorn, Which versions of Teradata are you connected to for the two systems?

Enthusiast

Re: Teradata Studio Express 14.01 now available

I'm switching between Teradata 13.00 and 13.10. Just to clearify: This is related to Teradata Studio 14.10

Enthusiast

Re: Teradata Studio Express 14.01 now available

Hi, now it works, the only change I have done is a "Reset to Default" on both my database connections, but they did not change, they still show "TMODE=TERADATA" and "CHARSET=UTF8"

But still I get red underscores on some legal syntaxes and a red cross in front of the statement starting with: "Was expecting one of ....." a long list of legal names.

This happens when I right click on a procedure and choosing "Show DDL". One example: The statement "Locking Table CRM_KAPDB.ActiveLeads FOR WRITE;" get a red underscore under the Locking statement and a red cross in front of the statement. This happens both against Teradata 13.00 and 13.10

Teradata Employee

Re: Teradata Studio Express 14.01 now available

If you can send the DDL for the procecure, we can take a look to see if there is a problem in the parser.

Enthusiast

Re: Teradata Studio Express 14.01 now available

Hi this is the DDL. The 3 Locking Table statements and the "IF"-test are all marked with red indicating syntax-errors.

REPLACE PROCEDURE CRM_KAPDB.KAP_InsertResponse
( INbruker_id CHARACTER(7)
 ,INselskap_id INTEGER
 ,INresponse_dt DATE
 ,INresponse_tm CHARACTER(8)
 ,INchannel_typ_cd INTEGER
 ,INchannel_id INTEGER
 ,INresponse_id INTEGER
 ,INnext_step_dt DATE
 ,INmore_info_cd VARCHAR(12)
 ,INmore_info_txt VARCHAR(100)
 ,INkunde DECIMAL(11,0)
 ,INecamp_id CHARACTER(12)
 ,INselection_dt DATE
 ,INlogonid CHARACTER(7)
 ,INfreetext VARCHAR(2048)
 ,INeier CHARACTER(7)
 ,INfrist_kl INTEGER
 ,INaccount_id INTEGER

)
BEGIN

DECLARE  gid CHAR(7);

BEGIN TRANSACTION
;

/* Usman 20110411, moved locking statement in the beginning to avoid Deadlock */
LOCKING TABLE CRM_KAPDB.ActiveLeads FOR WRITE;
LOCKING TABLE CRM_KAPDB.ReservedLeads FOR WRITE;
/*  B.Saastad Bevisst lock for å unngå Deadlock: */
LOCKING TABLE CRM_KAPDB.Channel_Responses FOR WRITE;

DELETE FROM CRM_KAPDB.Channel_Responses
WHERE
 kunde = :INkunde
 AND account_id = :INaccount_id
 AND ecamp_id = :INecamp_id
 AND selection_dt = :INselection_dt
 AND response_dt = :INresponse_dt
 AND invalid_resp_reason_cd = 4
;

UPDATE CRM_KAPDB.Channel_Responses
SET
 invalid_resp_reason_cd = 4
WHERE
 kunde = :INkunde
 AND account_id = :INaccount_id
 AND ecamp_id = :INecamp_id
 AND selection_dt = :INselection_dt
 AND response_dt = :INresponse_dt
 AND invalid_resp_reason_cd = 0
;

SELECT gident INTO :gid FROM CRM_KAPDB.Selger_Ss WHERE gident=INlogonid
;

IF gid <> '' THEN
 INSERT INTO CRM_KAPDB.Channel_Responses
 (  kunde
  ,household_id
  ,customer_id
  ,account_id
  ,ecamp_id
  ,selection_dt
  ,response_id
  ,response_dt
  ,response_tm
  ,resp_channel_typ
  ,resp_channel_id
  ,next_step_dt
  ,invalid_resp_reason_cd
  ,more_info_cd
  ,more_info_txt
  ,gident
  ,freetxt
  ,opprettet_av
  ,eier
  ,frist_kl
 )
 SELECT
   :INkunde
  ,Cust.household_id
  ,Cust.customer_id
  ,Cust.account_id
  ,:INecamp_id
  ,:INselection_dt
  ,:INresponse_id
  ,:INresponse_dt
  ,:INresponse_tm
  ,'105'
  ,:INchannel_id
  ,:INnext_step_dt
  ,0
  ,COALESCE(Mic.more_info_cd,'')
  ,:INmore_info_txt
  ,:INlogonid
  ,:INfreetext
  ,:INbruker_id
  ,:INeier
  ,:INfrist_kl
 FROM
  CRM_FO.Customer_All AS Cust
  LEFT OUTER JOIN
  CRM_Kapdb.more_info_cd AS Mic
  ON Mic.ecamp_id=:INecamp_id
 WHERE
  Cust.kunde = :INkunde
  AND Cust.account_id = :INaccount_id
 ;
ELSE
 INSERT INTO CRM_KAPDB.Channel_Responses
 (  kunde
  ,household_id
  ,customer_id
  ,account_id
  ,ecamp_id
  ,selection_dt
  ,response_id
  ,response_dt
  ,response_tm
  ,resp_channel_typ
  ,resp_channel_id
  ,next_step_dt
  ,invalid_resp_reason_cd
  ,more_info_cd
  ,more_info_txt
  ,gident
  ,freetxt
  ,opprettet_av
  ,eier
  ,frist_kl
 )
 SELECT
   :INkunde
  ,Cust.household_id
  ,Cust.customer_id
  ,Cust.account_id
  ,:INecamp_id
  ,:INselection_dt
  ,:INresponse_id
  ,:INresponse_dt
  ,:INresponse_tm
  ,'101'
  ,:INchannel_id
  ,:INnext_step_dt
  ,0
šššššššššš,COALESCE(Mic.more_info_cd, '')
  ,:INmore_info_txt
  ,:INlogonid
  ,:INfreetext
  ,:INbruker_id
  ,:INeier
  ,:INfrist_kl
 FROM
  CRM_FO.Customer_All AS Cust
  LEFT OUTER JOIN
  CRM_Kapdb.more_info_cd AS Mic
  ON Mic.ecamp_id=:INecamp_id
 WHERE
  Cust.kunde = :INkunde
  AND Cust.account_id = :INaccount_id
 ;
END IF
;

UPDATE CRM_KAPDB.ActiveLeads
FROM
(
 SELECT
   id_nr
  ,navn
 FROM
  CRM_fo_kDB.gident
) AS GNM
SET
  eier = :INeier
 ,frist_kl = :INfrist_kl
 ,behandlet = 1
 ,eier_navn = GNM.navn
 ,next_step_dt = :INnext_step_dt
 ,reservert_av= NULL
WHERE
 ecamp_id = :INecamp_id
 AND selection_dt = :INselection_dt
 AND kunde = :INkunde
 AND account_id = :INaccount_id
 AND :INeier = GNM.id_nr
;

DELETE FROM CRM_KAPDB.ReservedLeads
 WHERE kunde = :INkunde
 AND account_id = :INaccount_id
 AND ecamp_id = :INecamp_id
 AND selection_dt = :INselection_dt
;

END TRANSACTION
;

END;
Highlighted
Teradata Employee

Re: Teradata Studio Express 14.01 now available

Thanks for sharing this large SQL statement. It looks like we have a parser issue with the null statement after the LOCKING FOR WRITE clause. We will look into fixing this.