Teradata SQL? - response (2) by TcognosD
I want both MONTH_END_DATE and MONTH_BGN_DATE. thanks.
View ArticleSQL rewrite - Group by - forum topic by TcognosD
The following query gives the higest #number count per day, which is 7 rows each for 1 day. I want to include HOURS column to the results set with changing the resulting result set.So I want to know at...
View Articlequalify rank() over (partition) - question - response (9) by gksenthilkumar
Sorry for late response, I tried but it didn’t work as expected and expecting belowcreatetable ppi (a int, b date, c int, d int); insertinto ppi values (1, CURRENT_TIMESTAMP, 1,1);insertinto ppi values...
View ArticleOn Update Current_TimeStamp - response (1) by CarlosAL
No 'On Update' feature in TD (it seems more appropriate for OLTP's, not DW's) You may use a TRIGGER instead. HTH Cheers. Carlos.
View ArticleSQL rewrite - Group by - response (1) by dnoeth
First i would simplify the calculation on LOG_TIME, why do you cast every part to a string? CAST((log_time (FORMAT 'hh:mi:ss')) AS CHAR(8)) AS HOUR_MIN_SECYou might also avoid typecasting to a string:...
View ArticleTeradata SQL? - response (3) by dnoeth
Sorry, i didn't notice it was different columns. Simply UNION ALL both selects. Dieter
View ArticleCursor-Getting Error - forum topic by AmarnathG
Hi Experts, I am getting following error whlie creating cursor.Please help me. Create procedure Order_Proc() Begin Declare K INTEGER default 0; Declare V_TOTAL INTEGER default 0; Declare v_empno...
View ArticleHow to Calculate the total IO used by System for a particular week - response...
Depending on the level of details it's probably Table:ResUsageSpma, View:ResGeneralInfoView and Macro:ResNode. (FileAcqReads + FilePreReads + FileWrites) is the number of IOs. Regarding Larry Higa's...
View ArticleFull Table Scans - response (1) by dnoeth
Hi Usmans, you can probably get that info from DBQL, a high "Unneccessary IO" ratio (=Higa Larry Ratio) for retrieve steps indicates lots of IO, but hardly CPU. If DBQL is enabled on objects you might...
View ArticleCursor-Getting Error - response (1) by dnoeth
Hi Amarnath, IF( K>1000) THENSET V_TOTAL=V_TOTAL+K; Dieter
View ArticleHow to get 2 value from same id and same column? - response (4) by nubie
thank you for your kindness, but i try another way to solve it because Cognos can't execute with recursive. :)
View ArticleHow to get 2 value from same id and same column? - response (5) by dnoeth
How many rows into one column? Is there a know maximum? A typical solution might involve aggregation using MIN(CASE) or OLAP. Btw, if Cognos can't use recursion you can create a recursive view and tell...
View ArticleGet the count of rows in the respective tables using cursors - forum topic by...
Hi I have a scenario like If I fired a query ,i will be getting a list of tables.In addition to that,I need to get the count of that tables. What I thought is to make use of cursors inside a...
View ArticleSynchronized scanning - response (11) by Shelley
sorry, i did not read your comment correctly. for the row hash match join , the scan is going on as the join is happening --Shelley--
View Articleusing a Timestamp value within a dynamic sql statement - forum topic by bala2121
Hi All, I want to execute the below call procedure statement using a dynamic sql within a For loop of stored procedure. call dbc.sysexecsql ('CALL...
View Articleselected non-aggregate values must be part of the associated group - forum...
I'm trying to run the following query: SELECT vtiger_products.productcategory AS "Product Category", SUM(vtiger_inventoryproductrel.quantity) AS "Line Item Qt" FROM bi_batch.vtiger_inventoryproductrel...
View Articleselected non-aggregate values must be part of the associated group - response...
Ahh, the well known 3504 error :-) You have to add GROUP BY 1 or GROUP BY vtiger_products.productcategory Dieter
View Articleusing a Timestamp value within a dynamic sql statement - response (1) by dnoeth
Hi Bala, you have to use an implicit typecast for a TIMSTAMP column: CAST(timestamp_variable as VARCHAR(24). But i doubt you can use dynamic SQL to CALL an SP. Dieter
View ArticleGet the count of rows in the respective tables using cursors - response (1)...
If you need an exact count the only reliable way is to run a COUNT(*). If doesn't have to be exact, extracting it from stats uses no additional resources. Dieter
View Article