tag:blogger.com,1999:blog-1561253375800464394.post8601804070936717498..comments2024-03-28T10:48:36.635+01:00Comments on Denes Kubicek ApEx BLOG: Create Virtual TablesDenes Kubicekhttp://www.blogger.com/profile/01962373591521960882noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-1561253375800464394.post-2189040155894717922007-05-18T20:34:00.000+02:002007-05-18T20:34:00.000+02:00There is a third parameter for the to_char functio...There is a third parameter for the to_char function: NLS_DATE_LANGUAGE. For example, <BR/>TO_CHAR(TO_DATE('18052007','DDMMYYYY'), 'day','NLS_DATE_LANGUAGE=german') returns freitag.<BR/>By using datetime format element 'day' instead of 'd' we are also bypassing the setting of NLS_TERRITORY which specifies the first day of the week. As a result the SQL is not dependent of an 'hidden' NLS setting (not included in the statement) and easier to read as well.Jornicahttps://www.blogger.com/profile/15492511382521784329noreply@blogger.comtag:blogger.com,1999:blog-1561253375800464394.post-16156301866381677402007-05-16T09:59:00.000+02:002007-05-16T09:59:00.000+02:00anonymus, why not? AboutTO_CHAR(each_day, 'D') = '...anonymus, why not? About<BR/><BR/>TO_CHAR(each_day, 'D') = '5'<BR/><BR/>the fifth day of the week in Europe is Friday. In the US it would be<BR/><BR/>TO_CHAR(each_day, 'D') = '6'<BR/><BR/>An explanation and a name would be good.<BR/><BR/>Denes KubicekDenes Kubicekhttps://www.blogger.com/profile/01962373591521960882noreply@blogger.comtag:blogger.com,1999:blog-1561253375800464394.post-62821513493168069382007-05-16T08:24:00.000+02:002007-05-16T08:24:00.000+02:00Why not using CONNECT BY in a production environme...Why not using CONNECT BY in a production environment? Or are you talking about the TO_CHAR(each_day, 'D') = '5' ?<BR/><BR/>PatrickPatrick Wolfhttps://www.blogger.com/profile/16652802762749621200noreply@blogger.comtag:blogger.com,1999:blog-1561253375800464394.post-59710345101776174262007-05-16T01:59:00.000+02:002007-05-16T01:59:00.000+02:00Hope you are not using this in a production enviro...Hope you are not using this in a production environment. If so, use it at your own risk.Anonymousnoreply@blogger.com