Teradata Lock in Insert Statement - response (3) by Prabhu_Teradata
Hi Dieter, Is it possible to Lock a particular Table for Complete Session? Thanks and Regards, Prabhu
View ArticleParse and validate select statement - response (2) by tomnolan
Yes, the way to parse and validate a SQL select statement without executing it, using the Teradata JDBC Driver, is to prepare the SQL statement: PreparedStatement ps = con.prepareStatement("select *...
View Articleerror when loading into column partititioned table - topic by cloghin
Hello, I am seeing this error when loading into a column partitioned table ( TD 14.00) . The table create executes fine and i can also insert a subset of columns, however i see this error when loading...
View ArticleTemporal Macro / Dynamic SQL in a View - response (6) by fnewbrough
This is not difficult. CREATE MACRO PassValidtime(mydate DATE) AS ( validtime as of :mydate select * from MyTemporal_Table;) EXEC PassValidtime('2012-12-01') You can also pull the validtime date from...
View ArticleTeradata Lock in Insert Statement - response (4) by sunni1221
A user can lock the table/Row only for access. They cant be locked for DML operations by the user. The system will apply the lock at table/row level based on the DML operations.
View ArticleTeradata Lock in Insert Statement - response (5) by Fred
Not quite true. With a SELECT, you can downgrade from the default READ lock to ACCESS, or you can upgrade to WRITE or EXCLUSIVE. For INSERT/UPDATE/DELETE you can upgrade from the default WRITE to...
View ArticleInsertion Problem - response (1) by Qaisar Aftab Kiani
Seems like cust_Acct_nbr contains a character data and thus failing the casting operation. Make sure that cust_Acct_Nbr is numeric only!
View ArticleTeradata Lock in Insert Statement - response (6) by sunni1221
Thanks Fred for correcting me. I have tried this and worked :)
View ArticleDate variable to be applied to all date prompts - Teradata - topic by DataHead
Hi, I have a long script Teradata SQL in SQL Assistant 13.11 that has about 20 places where a date is used, each time I run it, I need to change the dates manually & want to name the Date at the...
View ArticleBTEQ is not returning proper error code when run file is not present. - topic...
Hi, Bteq experts, I am running the following beteq script. I noticed that if the bteq script is not present ( /path/to/my_none_existing_bteq.bteq ), the script still return success instead of error....
View Articlebteq - .run file - topic by Lavanya324
Is it possible to call a bat file with input parameter using .run file command in bteq. Eg. .run file 'test,bat' (param1); Please suggest!!!!
View Article3504: Selected non-aggregate values must be part of the associated group...
Hi there... I have been working on similar problem but my sql translation does not look god for now. Sorry for terrible question bot for now I have no idea how to find good solution. select event,...
View Article3504: Selected non-aggregate values must be part of the associated group...
Try using: select event, logonsource, username, max(logontime) from log_TABLE group by event, logonsource, username
View ArticleMerge SQL Duplicate Key error - response (7) by dsaini
I fixed the error message. Production table had null in the key field and merge was trying to insert another null instead of updating. I removed the null value from the production table and updated the...
View Article3504: Selected non-aggregate values must be part of the associated group...
Wow it worked :) But gave me over 90 000 which is way to big answer for 1.5k of users :) The point is to find last 2 top logins of each user. I wonder, maybe I have used wrong sql query for it....
View ArticleLog Option While Creating Table - topic by rajeev saravanan
Hi, How does the turning the LOG option on and off while creating a table affect the performance, where can we view this log?
View Article3504: Selected non-aggregate values must be part of the associated group...
Perhaps this code would do what you need: SELECT event, logonsource, username, RANK() OVER (PARTITION BY username ORDER BY logontime DESC) AS RankedLogons FROM log_TABLE QUALIFY RankedLogons <=2;
View Article