TD - GOTO equivalent

Moderator: NorbertKrupa

Post Reply
User avatar
Posts: 302
Joined: Fri Apr 13, 2012 6:28 am

TD - GOTO equivalent

Post by nnani » Thu May 30, 2013 9:26 am

Hello All,

Here I am with an issue when converting a TD script to Vertica

My scenario include a deduping script to be converted to Vertica, and this is tricky one

What my TD script does is it counts the distincts values from a select query, If the count is greater then 1 .i.e. if there are duplicate records then the flow is transfered to bunch of SQL statement creating temporary table and inserting and deleting records so as to have no duplicates.

Bascially the issue is TD uses variable to store the first count and validates the count if it is greater then 1 using the IF clause and,
If the count is greater then one it uses the GOTO statement to take the flow to the bunch of SQL statements.

The pain points are usage of variable, IF clause, GOTO clause.

Any good susggestion on implemeting these type of script in Vertica standards
Long way to go

You can check out my blogs at vertica-howto

Post Reply

Return to “Vertica Database Development”