Is there any function to get the name of the days?
Hi,
I'm using oracle 10.2.0.1.0
Is there any function to get the days of the week?
like i need to get sunday,monday,tuesday.....saturday.
I know i can use union and select the name from dual one by one.
But just want to know whether there is any other way.
I need to show the 7 days in a poplist in my form, thats the requirement
Thanks
David_Aldridge wrote:
BluShadow wrote:
Note: you may want to include "fm" in the format mask, otherwise the name of the day is padded with spaces:
SQL> ed
Wrote file afiedt.buf
1 select replace(to_char(dt,'Day'),' ','*') as fmt1
2 ,length(to_char(dt,'Day')) as length_fmt1
3 ,replace(to_char(dt,'fmDay'),' ','*') as fmt2
4 ,length(to_char(dt,'fmDay')) as length_fmt2
5 from (select TRUNC(SYSDATE ,'DAY')+Level-1 dt
6 from dual
7 connect by Level<8
8* )
SQL> /
FMT1 LENGTH_FMT1 FMT2 LENGTH_FMT2
Monday*** 9 Monday 6
Tuesday** 9 Tuesday 7
Wednesday 9 Wednesday 9
Thursday* 9 Thursday 8
Friday*** 9 Friday 6
Saturday* 9 Saturday 8
Sunday*** 9 Sunday 6
7 rows selected.
SQL>
I think you should use a pl/sql function for this.
Nah ... just joking.
I'd be tempted to just use a union all statement to return the seven literals. People will look at it and know exactly what it does.Yeah, agreed, I was just demonstrating that the format mask of a to_char(..., 'Day') pads with spaces, which seems to have been missed in the above answers. ;)
Similar Messages
-
Is there any function module getting the cpu type?
Is there any function module getting the cpu type?
I guess the database server...
I would like to get the SAP system cpu type as done in transaction st06 under system information.
Thanks. -
Is there any way to get the canvases names on the form
i have a form in Orcle 6i
i want when the form load i get the names of the Canvases on the Form automatically
to change their visual attribute
is there any way to get the name of the canvases on the form automatically
Thanks in advanceThe amount of time to evaluate each item in a Form is a lot less than you think. You are dealing with milliseconds. Worse case scenario, you might add 1 second to your form load time.
I think Francois's suggestion is the best solution, but if this is still too much time, you might concider creating strategic When-New-Item-Instance triggers on an item in each of your canvases that would perform what you want to do.
This will most likely cause problems of its own, but it is an alternative.
Food to get the thought process flowing... :-)
Craig... -
Is there a function to get the IP of this remote system
Hello EveryBody
Currently I have an application that runs on our network. When someone logs on to the network it checks there system and gets the pc name. I would like to also get the IP address of that system. As well I may later like to ping that computer.
1) Is there a function to get the IP of this remote system?
2) IS the a function to ping a remote system and receive back the response?
Thanks a lot.
RHello EveryBody
Currently I have an application that runs on our
network. When someone logs on to the network it
checks there system and gets the pc name. I would
like to also get the IP address of that system. As
well I may later like to ping that computer.
1) Is there a function to get the IP of this remote system?
2) IS the a function to ping a remote system and
receive back the response?Is this lan only?
Because if wan or internet then the remote computer would have to have an address that is reachable from your computer. For the internet this would mean it would have to be public. And for a wan the IP would have to be unique across the wan. -
Is there any way to get the files from other computer ?
Hai all,
I have 2 computers connected. I know the IP address of other computer. Is there any way to get the files from other computer. (for e.g. I want to get the files from specific folder. In Java netwroking is it possible? (Any programs)
regards,
NamancBro Take it easy.
Think you need to send a Image file named ("abc.gif")
now develop a server using ServerSocket and connect it in local IP and any PORT
For example i think ur server is connected in "localhost" and 9000 port.
Now make ur server educated using some commands.
For example:
FileName: <File Name String>
[Means new file is sending by connected client]
FileSize: <File size long or int value>
[ So that ur server can determind about the total length of sender file]
DataModeOpen
[Now your client will send its image data, this command means your client software is sending data]
fjadlkfjaofaijojfwoeiurfodkjflsajlfksa
l23j4lj23lkjlasjfoq23j4rokjelfkjasldkf
2o3j4lk2j3ljslakdjf2l3j4 l23kjlk23k4j
DataModeClose
[Means file sending finished]
Close
[Means your client connection is closed]
Now develop a client supporting this command.
For example(Server):
String getFileName=null;
long getFileSize=0;
public handleCommand(String getCmd) {
if(getCmd.startsWith("FileName")) {
String[] splitData=getCmd.split(":");
this.getFileName= splitData[1];
outPutStream.writeBytes("+OK");
} else if(getCmd.startsWith("FileSize")) {
String[] splitData=getCmd.split(":");
this.getFileSize=Long.parseLong(splitData[1]);
outPutStream.writeBytes("+OK");
} else if(getCmd.startsWith("DataModeOpen")) {
//data mode open so receive data
receiveData();
outPutStream.writeBytes("+OK");
} else if(getCmd.startsWith("DataModeClose")) {
//close client socket
getClientSocket.close();
}For client:
DataInputStream dataIn=null;
BufferedOutputStream bout=null;
public sendFile(bytes[] getBytes) {
//if ok found then do other or show error message
if(sendCmd("FileName:"+getFileName)) {
if(sendCmd("FileSize:"+getFileSize)) {
if(sendCmd("DataModeOpen")) {
bout.write(getBytes);
} else {
showError(3);
} else {
showError(2);
} else {
showError(1);
}i think it will help u -
Is there any function to change the width of froms'graphic ?
Hi All,
Is there any function to change the width of froms'graphic ?
May be like set***property.
Thanks,
ke xiongHi;
For your issue i suggest close your thread here as changing thread status to answered and move it to Forum Home » Application Development in PL/SQL » Forms which you can get more quick response
Regard
Helios -
Is there any function to get baseline date
Dear all,
Is there any function to get baseline date according to the payment terms?
Thank you in advance.have a lokk here:
determine due date
A. -
Hi All,
I need to obtain an image's attributes such as dimensions (height, width in pixels) without placing image in indesign document.
I have full path of the image (say abc.jpg is stored at c:\my pic\abc.jpg).
I have obtained the IDFile for this image, tried getting size using GetFileSize() which correctly return size in bytes.
Is there any way to get the height/width of image without importing it in the indesign document.
Please, give me some hints. I have spent quite a lot time digging in CHM. I have searched in FileUtils, IDFile API's but found no method which serves this purpose.
At this point I am clueless where to search next.
Any help will be appriciated.
Just a point to mention, I am able to get image height and width for an image in indesign doc though Its not my requirement.
Thnx,
D.You might be able to examine the contents of the PlaceGun after calling kImportAndLoadPlaceGunCmdBoss without actually placing the image in a document. Not sure, but would be worth looking at.
Otherwise you will probably have to write platform specific code, ideally with a generic platform-independant wrapper (see SDKSamples/paneltreeview/PlatformFileSystemIterator).
For the Mac, look at CGImageGetWidth() etc., not sure what the best option is for windows.
Perhaps Quicktime could provide you with a platform independant solution. -
When using an external (ergonomic mouse) is there any way to get the wheel to scroll one full page at a time? Much appreciated.
I can't use the keyboard to scroll. I need to keep my hand on the mouse, otherwise I'd never get anything done. Since I have no problem getting Firefox to scroll one page at a time, and I'm constantly jumping between 3 browsers, it would be nice to be able to scroll a full page at a time in Safari, just like I can in Firefox. Thanks.
-
I have downloaded a Audio Book from Itunes Store, but rencently i have had to reinstall windows, is there any way to re-download the audio book from Itunes, i know that the audio books are one time downloads, but is there any way to get the audio book back as i have already paid for it once and i would not like to pay for it twice.
If you haven't got a backup copy and if it's still in the store then you can try contacting iTunes support and see if they will grant you a re-download (there is no guarantee that they will) : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page
-
is there any way to get the server app other than through the app store. The system that I need it on are not connected to the internet.
We run a closed-loop network of apple systems and I tipically downloaded updates on a non-apple system that was on the internet.
Any ideas?I did buy the server app, went to the app store to download it. This system I'm using for downloads is Snow Leopard 10.6.8, it shows that I can download it but only as an Install which says I need 10.8. I can't seem to find a way for it to just download as a package or .dmg file so that I can copy it to DVD/CD or flash drive.
-
Is there any report to get the header/item text at GR stage together?
Hi gurus,
Is there any report to get the header/item text at GR stage together with a date range?
at the point of goods receipt? Or a report that could be run to search for header/item text at GR stage together with a date range?
Text that was entered at the point of goods receipt?Hi
Check MB51 report with posting dates for materials/vendors and use the display variant document header text (which is GR header text). I hope this is the one you are looking for.
Thanks -
i synced my phone that had an itunes account but no music on it to a computer and it erased all the music on that computer. is there any way to get the music back?
See this older post from another forum member Zevoneer covering the different methods and software available to assist you with the task of copying content from your iPod back to your PC and into iTunes.
https://discussions.apple.com/thread/2452022?start=0&tstart=0
B-rock -
Is there any way to get the query used in discoverer from backend??
Hi All,
I am new to dicoverer.
Is there any way to get the query used in discoverer from backend??
Thanks,
SachinHi,
you can view the SQL from within the discoverer menu:
in desktop: View-> SQL Inspector
in Plus: Tools-> Show SQL
The SQL in the DB tables is encrypted so it's a problem getting it from there.
You can export the workbook into SQL but it is not working for every worksheet (subquery, inline pivot tables...)
you can create a batch file to export them all using the output of this script:
select null,null,'echo off'
from dual
union all
select distinct
qs.qs_doc_name Workbook_name,
qs.qs_doc_details Worksheet_Name,
'start /wait <path>\dis51usr.exe /connect '||'&p_user_name'||'/'||'&p_password'||'@'||'&p_env'||' /apps_user /apps_responsibility "&responsibility" /opendb '||
chr(34)||qs.qs_doc_name||chr(34)||' /sheet "'||qs.qs_doc_details||'"'||' /export SQL "C:\Export Discoverer SQL\'||qs.qs_doc_name||'-'||qs.qs_doc_details||'.sql" /batch'
from eul_us.eul5_qpp_stats qs
where qs.qs_doc_name is not null
--order by 1,2
union all
select null,null,'echo off'
from dual
union all
select null,null,'exit'
from dual -
Is there any function to change the width of forms'graphic ?
Hi All,
Is there any function to change the width of forms'graphic ?
May be like set***property.
Thanks,
ke xiongNo. Graphics cannot be handled at runtime.
Francois
Maybe you are looking for
-
Symbol and Text Substitution not working correctly
Hello, in „Language & Text" I have the following symbol and text substitutions enabled, which aren't working in Pages version 5.1.1 (iMac 2011, Yosemite 10.10.1): „- - >" (written without blank space between the characters) which should be substitute
-
Generated RoboHelp Packager for Adobe Air Errors
Generated RH 8 to AIR 2 help yesterday and it is working. Now I want to package the AIR file for deployment using the RoboHelp Packager for Adobe AIR utility. My Finish Dialog box displays" The Adobe AIR package was not generated". The 1st grouping o
-
Hi my airplay connection from my computer to my apple tv it doesn't work anymore why?
-
Exporting multiple files with passthrough settings at once
I have a gaggle of videos in mp4 format (some with m4v extensions) that I want to export in Quicktime Pro to change the headers so that my PS3 can play them (some currently come up as corrupted data on the PS3 because it doesn't like some of the info
-
How to track non-valued customer owned inventory, including retained
How to track non-valued customer owned inventory, including retained samples