Between Times not working - topic by mattie4
I get error someting between a string or a Unicode character literal and the 'and' keyword. SELECT CREAT_TM, Case CREAT_TM read more
View ArticleLock row for access : In insert-Select - response (3) by So
Create a view for the "tab1" table using LOCK ROW FOR ACCESS and then select from the view when doing the INSERT/SELECT.
View ArticleCan some one provide the solution for the below scenario? - response (4) by...
I think you are looking for something like this... select base.cust_id, base.src_id, base.branch, base.month_end_date, coalesce(amt,0) as MTD, sum(coalesce(amt,0)) over (partition by base.cust_id,...
View ArticleBetween Times not working - response (1) by WAQ
The CASE syntax in your given query is not correct. It should be like this: Case When ASKME_CREAT_DT Between ('2012/08/29') and ('2012/08/30') Then 'AM' Else 'unknown' END AS TimeofDAY
View ArticleBetween Times not working - response (2) by ulrich
Your case is odd as you mix two syntax types, so it will not work. What data type is ASKME_CREAT_TM?
View ArticleBetween Times not working - response (3) by ulrich
Select current_timestamp(0) cts, cast(cts as time) as ctime, case when ctime between cast('08:00:00' as time) and cast('12:00:00' as time) then 'AM' else 'unkown' end ;
View ArticleParent Child Relationship Flattening - response (2) by itrave007
DATABASE XXXX; CREATE MULTISET TABLE TEST123 ,NO FALLBACK , NO BEFORE JOURNAL, NO AFTER JOURNAL, CHECKSUM = DEFAULT ( COMMON_KEY VARCHAR(20), PARENT VARCHAR(20) CHARACTER SET LATIN NOT CASESPECIFIC,...
View ArticleParent Child Relationship Flattening - response (3) by ulrich
But WS WG1 WG2 WA W1 B1 W2 B2 is not WS- WG1-W1-B1- WG22-W2-B2-WA So, what is the final call on this?
View ArticleParent Child Relationship Flattening - response (4) by itrave007
This is what is needed, sorry for the confusion WS WG1 WG2 WA W1 B1 W2 B2
View ArticleHow to check access privileges?? - response (11) by sandyinside
Try this: Brief and nice. SELECT A.ROLENAME, A.GRANTEE, A.GRANTOR, A.DefaultRole, A.WithAdmin, B.DATABASENAME, B.TABLENAME, B.COLUMNNAME, B.GRANTORNAME...
View ArticleParent Child Relationship Flattening - response (5) by ulrich
Your DDL seems not to be matching the inserts. Below SQLs should do CREATE SET TABLE TEST123 ( PARENT VARCHAR(20) CHARACTER SET LATIN NOT CASESPECIFIC, CHILD VARCHAR(20) CHARACTER SET LATIN NOT...
View ArticleRE:performance tuning for query with 27 left joins - response (1) by ulrich
The high estimate is most likely related to missing stats. How many rows does EFBI_DEV1_CSPR_T.STG_CSPR_WST_CDR has in the production environment?
View ArticleRE:performance tuning for query with 27 left joins - response (2) by ulrich
P.S. The PI of EFBI_DEV1_CSPR_T.STG_CSPR_WST_CDR doesn't seem to follow the first priceple that the PI should support access.
View ArticleBetween Times not working - response (4) by mattie4
ASKME_CREAT_TM is a [TIME(0)] field. I had posted the syntax wrong and corrected it below. I can do CASE When AskME_CREAT_TM 09:00:00 for example, and it will show AM on any of the records where...
View ArticleBetween Times not working - response (5) by mattie4
Ulrich, I got it to work as this. Thanks for your help. SELECT ASKME_CREAT_TM, cast(ASKME_CREAT_TM as time) , case when ASKME_CREAT_TM between cast('08:00:00' as time) and cast('12:00:00' as...
View ArticleBetween Times not working - response (6) by WAQ
As mentioned by Ulrich you need to cast the time to make it time (type) before comparing it. Similarly, you also need to do the same with your dates in WHERE clause (assuming ASKME_CREAT_DT is of DATE...
View ArticleBetween Times not working - response (7) by ulrich
case when cast(ASKME_CREAT_TM as time) between cast('08:00:00' as time) and cast('12:00:00' as time) then 'AM' else 'unkown' end, should work as well, so no need for the additional field. Might be...
View ArticleDBQLOBJTBL - unknown values - topic by kepler
Hi , The field typeofuse of the table dbc.dbqlobjtbl according to the manual (TD14) has the following values: 1 = Found in the resolver read more
View Articlehow to get the sqltext from queries that ran during an time interval without...
Hello. I want to get the sql text of the queries that ran at the database during a interval time without enabling the logging mechanisms (access or query). Is there any system table/view that keeps...
View Article