#DateForumTypeThreadPost
907 Jun 2006 @ 11:05 PDTDatabaseReplywhy this error was raised? help me!Just adding to Jim's reply- you can use 'group by' also.'GROUP BY' is faster than 'Distinct'.UPDATE TTEMP.TB_MID_NEW_INNET_SUBSCRIBERFROM (SELECT MSISDN FROM PVIEW.VW_NET_GSM_NL_200604 GROUP BY 1) ...
807 Jun 2006 @ 10:59 PDTDatabaseReplyFinding Foreign Key for Primary Key ColumnYou can use the following system views.DBC.RI_CHILD_TABLESDBC.RI_DISTINCT_CHILDRENDBC.RI_DISTINCT_PARENTSDBC.RI_PARENT_TABLES
703 Jun 2006 @ 07:23 PDTUDAReplyAll the GURU'S out theirIf your min year is '1999' & max year is '2005'. That means (2005-1999 = 7) 7 times you can use - MAX(CASE WHEN RN = x THEN YEAR ELSE '' END)||','|| to achieve your result set.SEL ID_NO,NAME,MAKE,...
605 May 2006 @ 02:17 PDTUDAReplySQL syntax to check values in a groupHi,Look for the "PREV_VALUE" & "RESULT" logic in below query.SEL SS_ID, CURR_VALUE, (SUM(CURR_VALUE)OVER(ROWS 1 PRECEDING) - CURR_VALUE) "PREV_VALUE" ,(CASE WHEN CURR_VALUE > PREV_VALUE THEN 'TRUE'...
505 May 2006 @ 01:02 PDTUDAReplyFastexport helpRemove 'TRIM' from TRIM(Policy_Insurance_Score_Cd) in your Group By.GROUP BYTRIM(State_Cd) ,TRIM(Company_Cd) ,TRIM(SUBSTR(Line_Cd,1,1)) ,TRIM(Line_Of_business_Cd) ,TRIM(Policy_Form_Cd) ,TRIM(Policy...
404 Mar 2006 @ 04:30 PSTAnalyticsReplyFormating TIME to load using multi loadI am assuming :TIME_FLD as your host variable.1. Use SUBSTR FUNCTION SUBSTR(:TIME_FLD,1,2) || ':' || SUBSTR(:TIME_FLD,3,2) || ':' || SUBSTR (:TIME_FLD,5,2) || '.' || SUBSTR(:TIME_FLD,7,2) to...
323 Jan 2006 @ 09:42 PSTDatabaseReplyRemoving Column FormatYou can use Alter DML for this: Alter table table_nameadd existing_column_name data_type; //without format phraseBut you can't change the column attributes if it requires modification of internal s...
220 Jan 2006 @ 12:29 PSTDatabaseReplyduplicate unique primary key errorSharad,UPK error occurs only when the UPI column that you are trying to insert is alraedy present there in your table.Check if you are passing identity column value also , if yes then don't pass it...
119 Jan 2006 @ 01:01 PSTDatabaseReplyrenaming a column name.....?I ASSUME THAT YOU ARE HAVING THE TABLE STRUCTURE LIKE:CUSTOMER...... MNTHX................. 1 Y................. 2 V................. 1Z................. 2 A...