I am Learning Sql + ...Please help me with my queries ..Thanx in Advance
1. what is the meaning of 'MGR" in EMP table ?
2.DISPLAY EMPNO,ENAME,SAL,ANNUAL SAL, ROUND TO NEAREST 100, EXPERIANCE WITH 3 DECIMAL PLACES,
DNAME,LOCATION OF EMPLOYEE IN THE SORDED ORDER OF LOCATION?
PLEASE HELP WITH ABOVE TWO ...
HAVE A GREAT DAY...
RAVI
856530 wrote:
Hi Aman thanks for your kind reply, i will make sure no more upper case anymore...
display empno,ename,sal,annual sal, round to nearest 100, experiance with 3 decimal places,
dname,location of employee in the sorded order of location?
In the above query only i need to know how to round to nearest 100 rest of the query i was aware of it.
thanks
RaviAll the functions (including ROUND) are documented in the fine SQL Reference manual. See
http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/functions135.htm#i78633
Similar Messages
-
Hi All,
I have a number on the selection-screen.I need to prepare a structure with fields equal to the number provided on the selection screen.please help me with it.
Thanks in advance,
kushagra sharmaHi Kushagra,
Below is one way of doing it.
First create a dynamic internal table, taking number of fields from selection screen using cl_alv_table_create=>create_dynamic_table.
Then create a dynamic structure for that dynamic internal table.
Ex:
DATA:fcat_wa TYPE lvc_s_fcat,
fcat_itab TYPE lvc_t_fcat,
poi_itab TYPE REF TO data,
poi_itab1 TYPE REF TO data,
cha(4) TYPE c.
FIELD-SYMBOLS: <itab> TYPE STANDARD TABLE,
<wa> TYPE ANY.
PARAMETERS: p_num TYPE i. " Number of fields
DO p_num TIMES.
cha = sy-index.
CONCATENATE 'F' cha INTO cha.
CONDENSE cha NO-GAPS.
fcat_wa-fieldname = cha.
fcat_wa-datatype = 'STRG'.
APPEND fcat_wa TO fcat_itab.
ENDDO.
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = fcat_itab
IMPORTING
ep_table = poi_itab
EXCEPTIONS
generate_subpool_dir_full = 1
OTHERS = 2.
ASSIGN poi_itab->* TO <itab>. " Dynamic internal table
CREATE DATA poi_itab1 LIKE LINE OF <itab>.
ASSIGN poi_itab1->* TO <wa>. " Dynamic structure
Hope it helps u.
Thanks,
Edited by: Sap Fan on Oct 28, 2009 3:41 PM -
i cannot transfer some videos to my iphone 3gs. the file is in MPEG4 format. i can view in itunes but cannot be transfered to iphone. Please help me with this problem.
In iTunes, Advanced>Create iPod or iPhone version
-
Please help me with this SQL query
I am practicing SQL queries and have come across one involving fetching data from 3 different tables.
The three tables are as below
<pre>
Country
location_id country
loc1 Spain
loc2 England
loc3 Spain
loc4 USA
loc5 Italy
loc6 USA
loc7 USA
</pre>
<pre>
User
user_id location_id
u1 loc1
u2 loc1
u3 loc2
u4 loc2
u5 loc1
u6 loc3
</pre>
<pre>
Post
post_id user_id
p1 u1
p2 u1
p3 u2
p4 u3
p5 u1
p6 u2
</pre>
I am trying to write an SQL query - for each country of users, display the average number of posts
I understand the logic behind this that we first need to group together all the locations and then the users belonging to one country and then find the average of their posts.
But, i'm having a difficulty in putting this in SQL form. Could someone please help me with this query.
Thanks.select
country.country,
count(*) Totalpostspercountry,
count(distinct post.user_id) Totaldistincuserspercountry,
count(*)/count(distinct post.user_id) Avgpostsperuserbycountry
from
country, muser, post
where country.location_id = muser.location_id
and muser.user_id = post.user_id
group by country.country
The output is like this for your sample data - hope this is what you were looking for :)
COUNTRY,TOTALPOSTSPERCOUNTRY,TOTALDISTINCUSERSPERCOUNTRY,AVGPOSTSPERUSERBYCOUNTRY
England,1,1,1,
Spain,5,2,2.5, -
Please help me with spry bar menu
I have laid out my page with the div tags in Dreamweaver. I defined the different sections by putting colors in them until i am ready to put stuff into them however when i insert the spry menu bar into my navigation section, the area below it is behaving like a drop down box of color. What i mean is that the area below which is supposed to stretch from left to right as a single box is now broken up by a different color box the width of the spry bar and goes down to the next box. When i preview it in the browser the page appears normal. How can i get rid of the intruding box in dreamweaver.
HI
I am practicing for the webmaster design course pratical exam. The web page i will be asked to construct will consist of a home page with two or three other pages pages in the site it will have to link to. I know how to do most of the steps individualy but i do not know in what order some of them are done. What i mean is this. ... after setting up the root folder..images..laying out the divs .. i would like to know ... at what point do i do the various things like, set up a styles folder...make a template... make the other pages of the site ..etc. I think i am able to do nearly all of these things but not sure in what order they should be done so the site will work.
I have reached the point where i have established the site and layout, i.e. the wrapper, logo, navigation,header,bodycontent,right and left columns, clearbar, footer. i would like someone to list the sequence i should follow after this. I am praticing on a trial CS5.5 which seems to simplfy to a freat extent what we learned on the course because it is a later version. The version we used on course was CS4 and if the pratical is in this version then i will need to know how it is done in this format.
Date: Sun, 22 Jan 2012 17:45:18 -0700
From: [email protected]
To: [email protected]
Subject: Please help me with spry bar menu
Re: Please help me with spry bar menu created by Nancy O. in Dreamweaver - View the full discussion
If this only happens in DW Design View, use Live View or turn off your CSS display.
View > Style Rendering > un-tick Display Styles.
Nancy O.
Alt-Web Design & Publishing
Web | Graphics | Print | Media Specialists
http://alt-web.com/
http://twitter.com/altweb
Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/4157994#4157994
To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/4157994#4157994. In the Actions box on the right, click the Stop Email Notifications link.
Start a new discussion in Dreamweaver by email or at Adobe Forums
For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746. -
Please help me with simple program
Can someone please write a simple program for me that opens up a webpage in the center of the screen , with a set size, and then asks the user where they would like to click on the screen. Then once the person clicks it asks how many times they would like to click there, and then once they enter the # the program opens up the webpage (in the center at the same spot as before, with the same set size) and automatically clicks on the predesignated spot , and then closes all open internet windows, and keeps doing it for however many times the person chose. PLEASE HELP ME WITH THIS!!! If you could, please post the source code here. Thank you so much to whoever helps me!!!!!!!
If it's not to learn, then what is the purpose of
this project?well, if it's not HW and its not for learning java, then why the hell would anyone like to have a program that may open a webpage and then repeatedly click on predefined place...
let me see...
now if he had asked for program that fakes IP as well, then i would suggest that he tryes to generate unique clicks, but now... i'm not sure... maybe just voting in some polls or smthing... though, i would not create a program that clicks on the link or form element, but rather just reload url with given parameters for N times... -
Please help me with this statement
Hi gurus, glad to be back!
Please help me with this XML processing statement. The XMl I get is like this,
<EnumerationValue description="Motor Carriers-Operate w/o Certificate or Permit"
effectiveDate="1859-01-01">
<Text>26</Text>
<AssociatedValue type="SeverityLevelText" code="MSD">
<Text>Misdemeanor</Text>
</AssociatedValue>
<AssociatedValue type="SeverityLevelText" code="PMD">
<Text>Petty Misdemeanor</Text>
</AssociatedValue>
<AssociatedValue type="StatuteOrdinanceRuleCite">
<Text>221.291.4</Text>
</AssociatedValue>
I need to get the number value from <Text>26</Text>, the attribute description and the text value of <Text>221.291.4</Text> inside one of those AssociatedValue node. The following is what I have, though I get the 26, I do not get the description and I get the Misdemeanor, Petty Misdemeanor concatenated with the text value of <Text>221.291.4</Text>. The output I get is this,
26
MisdemeanorPetty Misdemeanor221.291.4MisdemeanorPe
4
MisdemeanorPetty Misdemeanor221.291.4MisdemeanorPe
My Code:
declare
v_xml sys.xmltype;
v_sid number;
v_SText varchar2(50);
begin
v_xml := sys.xmltype('<SimpleTypeCompanion>
<EnumerationValue description="Motor Carriers-Operate w/o Certificate or Permit" effectiveDate="1859-01-01">
<Text>26</Text>
<AssociatedValue type="SeverityLevelText" code="MSD">
<Text>Misdemeanor</Text>
</AssociatedValue>
<AssociatedValue type="SeverityLevelText" code="PMD">
<Text>Petty Misdemeanor</Text>
</AssociatedValue>
<AssociatedValue type="StatuteOrdinanceRuleCite">
<Text>221.291.4</Text>
</AssociatedValue>
</EnumerationValue>
<EnumerationValue description="Police Communication Equipment-Possession, Use-First Offense-M" effectiveDate="1859-01-01">
<Text>4</Text>
<AssociatedValue type="SeverityLevelText" code="MSD">
<Text>Misdemeanor</Text>
</AssociatedValue>
<AssociatedValue type="SeverityLevelText" code="PMD">
<Text>Petty Misdemeanor</Text>
</AssociatedValue>
<AssociatedValue type="StatuteOrdinanceRuleCite">
<Text>299C.37.1(b)</Text>
</AssociatedValue>
</EnumerationValue>
</SimpleTypeCompanion>');
---dbms_output.put_line(v_xml.getStringVal());
declare
cursor c_statutes is
select ms.* from
xmltable('for $s in /SimpleTypeCompanion/EnumerationValue/Text
let $sa := /SimpleTypeCompanion/EnumerationValue/AssociatedValue
let $sd := /SimpleTypeCompanion/EnumerationValue/@description
where $sa/@type = "StatuteOrdinanceRuleCite"
return
<MyStatutes>
<TextID>{$s}</TextID>
<SDesc>{$sd/@description}</SDesc>
<StatuteNumber>{$sa/Text}</StatuteNumber>
</MyStatutes>'
passing v_xml
columns
myTextID number path '/MyStatutes/TextID',
mySDesc varchar2(150) path '/MyStatutes/SDesc',
myStatute varchar2(50) path '/MyStatutes/StatuteNumber'
) ms;
begin
for v_s in c_statutes loop
dbms_output.put_line(v_s.myTextID);
dbms_output.put_line(v_s.MySDesc);
dbms_output.put_line(v_s.myStatute);
end loop;
end;
end;
Please show me the correct way to get the result I want.
Thanks a lot!
BenSQL> var xmltext varchar2(4000)
SQL> --
SQL> begin
2 :xmltext :=
3 '<SimpleTypeCompanion>
4 <EnumerationValue description="Motor Carriers-Operate w/o Certificate or Permit" effectiveDate="1859-01-01">
5 <Text>26</Text>
6 <AssociatedValue type="SeverityLevelText" code="MSD">
7 <Text>Misdemeanor</Text>
8 </AssociatedValue>
9 <AssociatedValue type="SeverityLevelText" code="PMD">
10 <Text>Petty Misdemeanor</Text>
11 </AssociatedValue>
12 <AssociatedValue type="StatuteOrdinanceRuleCite">
13 <Text>221.291.4</Text>
14 </AssociatedValue>
15 </EnumerationValue>
16 <EnumerationValue description="Police Communication Equipment-Possession, Use-First Offense-M" effectiveDate="1859-01-01">
17 <Text>4</Text>
18 <AssociatedValue type="SeverityLevelText" code="MSD">
19 <Text>Misdemeanor</Text>
20 </AssociatedValue>
21 <AssociatedValue type="SeverityLevelText" code="PMD">
22 <Text>Petty Misdemeanor</Text>
23 </AssociatedValue>
24 <AssociatedValue type="StatuteOrdinanceRuleCite">
25 <Text>299C.37.1(b)</Text>
26 </AssociatedValue>
27 </EnumerationValue>
28 </SimpleTypeCompanion>';
29 end;
30 /
PL/SQL procedure successfully completed.
SQL> set lines 150
SQL> --
SQL> select ms.*
2 from xmltable
3 (
4 '/SimpleTypeCompanion/EnumerationValue'
5 passing xmltype(:xmltext)
6 columns
7 DESCRIPTION varchar2(32) path '@description',
8 STATUTE_ID number(2) path 'Text/text()',
9 STATUTE_RULE_CITE varchar2(16) path 'AssociatedValue[@type="StatuteOrdinanceRuleCite"]/Text/text()',
10 MSD_TEXT varchar2(10) path 'AssociatedValue[@code="MSD"]/Text/text()',
11 PMD_TEXT varchar2(10) path 'AssociatedValue[@code="PMD"]/Text/text()'
12 ) ms
13 /
DESCRIPTION STATUTE_ID STATUTE_RULE_CIT MSD_TEXT PMD_TEXT
Motor Carriers-Operate w/o Certi 26 221.291.4 Misdemeano Petty Misd
Police Communication Equipment-P 4 299C.37.1(b) Misdemeano Petty Misd
SQL>
SQL> -
First of all, I live in Ho Chi Minh City, Vietnam. Sometimes, I use a VPN to search on the web here. I purchased Toy Story 3 on my MacBook Pro 2011 OS/X - Lion through iTunes. I initially had trouble downloading it which may be due to being on and off the VPN but after a while it finally downloaded and shows up in my iTunes library on my MacBook.
Under my Apple ID account (which is the only Apple ID account I have), I look under purchase history and it shows that I paid for Toy Story which is where I got my Order # from. But if you go to the iTunes Store then to the Quick Links then click on Purchased, under all my Movies, it does NOT show Toy Story 3 as one of my movies.
Now when I go to my iPad (3rd gen.), Toy Story 3 does not show up under purchased movies (all or not on my iPad). It does not show up on my Apple TV as well. If I want to have Toy Story 3 on my iPad or Apple TV, then it says I have to purchase it again.
I have searched for help via Apple support communities but so far none of their solutions have worked for me. I have tried logging off iTunes & App Store on iPad and also shutting down the iPad. I also made sure that under iTunes Preferences>Store that iTunes in the Clouds purchases is checked. Can someone please help me with this? Your consideration is greatly appreciated. Thanks.Thanks King_Penguin for taking time to read and reply.
I just purchased this movie on Thursday, May 15, so just a few days ago. I have never had any trouble whatsoever since I have been in Vietnam. I have downloaded several movies and even music and they have all synced to my respected Apple products except for this purchase.
Sorry, I don't quite understand what you mean by studios and different versions. Could you please explain?
I checked my purchased list in my purchase history under my account and there are no hidden items. -
I just bought this movie "Godzilla 2014" but it won't show in my Movie Library. I closed my Itunes and put it back on again but still won't show up. I checked my purchased list and it shows that I recently bought the movie but when I checked the itunes store it wants to buy the movie again. Please help me with this right away Apple.
Apple Store Customer Service at 1-800-676-2775 or visit online Help for more information.
To contact product and tech support: Contacting Apple for support and service - this includes
international calling numbers..
For Mac App Store: Apple - Support - Mac App Store.
For iTunes: Apple - Support - iTunes. -
HELP!!!! My Hotmail no longer works with Safari v. 5.0.6 and my Imac Leopard operating system 10.5.8. Please help me with any suggestions on what to do. Thank you. I cannot find any new downloads for Safari that work with Leopard. The newest ones only work with Lion. My Firefox browser still works though but I would rather use Safari and cannot access any e-mails or send any e-mails via Safari. This happened about 3 weeks ago and I thought it was just a glitch on Hotmail's site. Now I realize Hotmail must have released an update that no longer works with Leopard 10.5.8. PLEASE HELP ME!!!! Thanks to anyone and everyone who reads this and attempts to help me. I do not know what to do....
Hi Sue,
What exactly happens when trying Safari?
They did change it to Outlook recently, but while not pretty, I can access mine with Safari 4.0 still...
You can also set it up in Mail so you don't need a browser at all if you want. -
Hello, Honestly I just updated my 4s and my iPad 3 to iOS 6 and when try to press on the Music app or the iTunes app it says "cannot connect to iTunes Store" Could you please help me with this thank you so much, Charbel from Lebanon
See these previous discussions help.
App Store Updates (but only Updates)...: Apple Support Communities
Apps suddenly don't update: Apple Support Communities -
Please help me with an error 1418...
OK I have iPod mini 4GB and I have the latest iTunes installed 7.02 or something I don't know anymore.
Anyway a sad iPod icon displayed on my screen a few days ago and I managed to restart it and to put it in a disk mode and then iTunes finally recognized iPod and I clicked on Restore and then Restore and Updated and after a few seconds during the restore process it says:
An iPod 'iPod' couldn't be resoterd. An unknown error occurred (1418).
I am desperate and i don't know what to do.
I read almost everything about this but nothing helped.
Please help me with any kind of solution...I did a Support Search for that error number and this is what I got. I hope one of these links helps:
http://docs.info.apple.com/article.html?artnum=304508
http://docs.info.apple.com/article.html?artnum=304996 -
I cannot install Itunes and Icloud on my Sony Vaio Laptop - Window 7. Error says " computer/system not modified". Please help me with this problem.
Hello there, jag123059.
The following Knowledge Base article offers up some great steps to follow for resolving issues with installing iTunes:
Issues installing iTunes or QuickTime for Windows
http://support.apple.com/kb/ht1926
Thanks for reaching out to Apple Support Communities.
Cheers,
Pedro. -
Hi there. Can someone please help me with copying photos from my old iPad to my new ipad2? Thanks.
If you have a pc, when you plug your iPad in you should see the windows pop up window offering to backup the photos. Do that and it will save all your photos and videos to your computer where you can then sync them back to your new one.
If the pop up doesn't come up, double click on my computer and navigate your way to the iPad. Double cick on it an d navigate to the DCIM folder. Drag your photos and videos to your pc, then sync them back onto your iPad. -
I would like to create a view on this table with four columns
1. PN#_EXP_DATE
2. PN#
3. PN#_EFF_DATE
4. PN#
P_S_C A_C P EXP_DT
21698 13921 1 5/29/2009 3:15:41 PM
21698 13921 1 5/29/2009 3:54:57 PM
21698 1716656 4 5/29/2009 3:15:41 PM
21698 3217 3 5/29/2009 3:15:40 PM
21698 3217 3 5/29/2009 3:54:57 PM
21698 60559 2 5/29/2009 3:15:41 PM
21698 60559 2 5/29/2009 3:54:57 PM
I have a trigger on A, which inserts the DML records into B. (Table A and B structure is the almost the same,
where table B will have one extra column exp_dt)
NOw Table B can have records with same P_S_C and A_C columns and exp_dt will capture the history.
for example: from the above sample data, let us take first two records..
P_S_C A_C P EXP_DT
21698 13921 1 5/29/2009 3:15:41 PM --- Record 1
21698 13921 1 5/29/2009 3:54:57 PM --- Record 2
from this..
Note: 1. Table A and Table C can be joined using A.P_S_C and C.R_C to get the start_date.
2. PN# comes from table D. It contains numbers for the resp. weeks.
3. PN#_EFF_DATE is the previous immediate previous date for that record in history table (Table B).
I wanted the data like..
---- this is for the second record in the above..
PN#_EXP_DATE PN# PN#_EFF_DATE PN#
5/29/2009 3:54:57 PM 214 5/29/2009 3:15:41 PM 214
---- this is for the first record in the above..
PN#_EXP_DATE PN# PN#_EFF_DATE PN#
5/29/2009 3:54:41 PM 214 ( for this we should query the table C to get the
start_date, for this combinatation of P_S_C and A_C in table B
where B.P_S_C = C.A_C
and that value should be the EFF_DT for this record)
Please help me with this....
Thanks in advance..Hi All,
select d.P# as "PN#_EXP_DATE", exp_date
from daily_prd d, cbs1_assoc_hist b
where to_char(d.day_date,'MM/DD/YYYY') = to_char(b.exp_date,'MM/DD/YYYY')
and d.period_type = 'TIMEREPORT';
This above query gives the output as follows:
pn#_exp_date exp_date
214 5/29/2009 3:15:40 PM
214 5/29/2009 3:15:41 PM
214 5/29/2009 3:15:41 PM
214 5/29/2009 3:15:41 PM
214 5/29/2009 3:54:57 PM
214 5/29/2009 3:54:57 PM
214 5/29/2009 3:54:57 PM
This below is the data from history table (Table B).
P_S_C A_C PLACE EXP_DATE
21698 3217 3 5/29/2009 3:15:40 PM
21698 13921 1 5/29/2009 3:15:41 PM
21698 1716656 4 5/29/2009 3:15:41 PM
21698 60559 2 5/29/2009 3:15:41 PM
21698 13921 1 5/29/2009 3:54:57 PM
21698 3217 3 5/29/2009 3:54:57 PM
21698 60559 2 5/29/2009 3:54:57 PM
I got the pn#_exp_date from the Table 'D', for the given exp_date from Table B.
My question is again....
CASE - 1
from the given records above, I need to look for exp_date for the given same P_S_C and A_C.
in this case we can take the example...
P_S_C A_C PLACE EXP_DATE
21698 3217 3 5/29/2009 3:15:40 PM
21698 3217 3 5/29/2009 3:54:57 PM
In this case, the
pn#_exp_date exp_date pn#_eff_date eff_date
214 5/29/2009 3:15:57 PM < PN# corresponding to the 5/29/2009 3:15:40 PM
eff_date .>
<Basically the eff_date is
nothing but the exp_date only.
we should take the immediate before one.
In this case, our eff_date is '5/29/2009 3:15:40 PM'.
but how to get this.
CASE - 2
from the above sample data, consider this
P_S_C A_C PLACE EXP_DATE
21698 1716656 4 5/29/2009 3:15:41 PM
In this case, there is only one record for the P_S_C and A_C combination.
The expected result :
pn#_exp_date exp_date pn#_eff_date eff_date
214 5/29/2009 3:15:41 PM < PN# corresponding to the 5/29/2009 3:15:40 PM
eff_date .>
<Basically the eff_date is
nothing but the exp_date only.
we should take the immediate before one.
In this case to get the eff_date, we should query the Table 'C', to get the eff_date, which is START_DT column in this table.
for this join B.P_S_C and C.R_C.
Hope I am clear now..
Thanks in advance.....
Maybe you are looking for
-
How do I get a byte array from an object passed into the JNI?
This is what my java code looks like: public class streamedData protected byte[] m_value = null; public byte[] getByteArray () return m_value; /* code not pertaining to this question snipped. */ jclass streamedDataClass = env->GetObjectClass(jstreame
-
I used migration to send photos form my Mac Book to my I Mac now i get an error message "iPhoto can not be opened because of a problem" Check with the developer to make sure iPhoto works with this version of Max OSX. You may need to install any ava
-
How do I disable the pop-up that asks me to install Mavericks?
I'm getting a popup on my computer that states: Upgrade to Mavericks Upgrade your Mac to the latest version of OS X for free ( Now Now ) ( Details ) How to I keep this from happening (without installing Mavericks)?
-
Opening/Saving Softimage PIC files in Photoshop CC
Greetings Collective, I am trying to open and save Softimage .PIC files in Photoshop CC and having no luck. In my previous version of Photop, CS3, everything worked fine after loading the correct plugin from the goodies dir on disk. In CC I've attemp
-
Searching for a more elegant way to write my where clause.
Hi, I have a table T which has two columns : X(Varchar2(100)), and Y(Varchar2(100)).I want to know all the rows in the table T for which two conditions are simultaneously true: the first condition is X is not null or Y is not null, and the second con