Need help catching all members in my query
Here’s the problem: I think my very last statement is causing the report to pull ONLY people who’ve actually ever logged in. Is there any way to still pull only the latest LOGIN_TIME OR a NULL/Empty time?
Thanks for anything you can tell me!
select
PS.LNAME,
PS.FNAME,
SI.LOGIN_ID,
PS.EMAIL_ADDR,
US.col_num_20 Library_Type,
US.col_num_30 Place_of_Work,
US.col_num_10 Was_Rejected,
US.col_num_70 Date_Created,
PS.POSTAL,
PS.STATE,
DECODE (PS.NOTACTIVE, 'Y', 'N', 'Y') AS is_active, PS.NOTACTIVE,
SI.LOGIN_TIME,
SI.SEQ_NUM
from PA_STUDENT PS, PV_STUD_USER US, PA_LOGIN_SESSION_INFO SI
where PS.STUD_ID = US.STUD_ID (+)
and PS.STUD_ID = SI.LOGIN_ID (+)
and SI.LOGIN_TIME = (select max(LOGIN_TIME)from PA_LOGIN_SESSION_INFO SN where SI.LOGIN_ID=SN.LOGIN_ID)
Hi,
Without knowing your data, or the results you want from that data, I can't say for sure, but I'm guessing you want all the conditions to be outer join conditions. Using ANSI join syntax, you can do soemthing like this:
select
PS.LNAME,
PS.FNAME,
SI.LOGIN_ID,
PS.EMAIL_ADDR,
US.col_num_20 Library_Type,
US.col_num_30 Place_of_Work,
US.col_num_10 Was_Rejected,
US.col_num_70 Date_Created,
PS.POSTAL,
PS.STATE,
DECODE (PS.NOTACTIVE, 'Y', 'N', 'Y') AS is_active, PS.NOTACTIVE,
SI.LOGIN_TIME,
SI.SEQ_NUM
from PA_STUDENT PS
left outer join PV_STUD_USER US on PS.STUD_ID = US.STUD_ID
left outer join PA_LOGIN_SESSION_INFO SI on PS.STUD_ID = SI.LOGIN_ID
and SI.LOGIN_TIME = (
select max (LOGIN_TIME)
from PA_LOGIN_SESSION_INFO SN
where SI.LOGIN_ID = SN.LOGIN_ID
;Since you were using a + sign after a column from si in this condition:
and PS.STUD_ID = SI.LOGIN_ID (+)you must have a + sign in all conditions involving si; otherwise, the effect is an inner join.
Using the old join syntax (with + signs) you can't outer-join to a sub-query. If you really want to use the old syntax, re-write the condition involving si.login_time so that it doesn't join to a scalar sub-query (whihc might be more efficient anyway).
I hope this answers your question.
If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables involved, and also post the results you want from that data.
Explain, using specific examples, how you get those results from that data.
Always say which version of Oracle you're using.
Similar Messages
-
Third party app The vault anyone loose all their information and cant retrieve it? Need help lost all my info.
Contact the developer of the app.
Restore from your backup. -
I Need Help Syncing All My Music From My Desktop To My IPhone 5 Helllllllllllp Please
Hi can someone help me please I have a IPhone5 64g I need help syncing all my music from my I tunes library. I have a total of 3600 songs on my I tunes library which is 26g on my desktop all the boxes are checked on each song when I hit sync im only getting 1400 songs wich is only 10g of music I want all 26g of musicon my IPhone 5 when i hit sync all my music are not syncing and I need helping syncing all my music can someone help me please?
Are you upgrading from an existing iPhone? Back up old phone, then restore new phone with the cable. I had to do this a number of time to get all my purchases across.
-
NEED HELP IN REDUCING THE LENGTH OF QUERY WHICH IS ATTACHED IN A FILE PL_SQ
Hi Everyone,
THANKS FOR POSTING THE REPLIES FOR MY LAST THREAD. THAT REALLY HELPED. I CAME BACK AGAIN BECAUSE I NEED HELP FROM THIS FORUM IN REDUING THE LENGTH OF MY QUERY WHICH I HAD GIVEN BELOW. i DIDN'T HAD THE CHOICE OF ATTACHING A FILE OF MY DATA HERE.ITS VERY HUGE DATA SO I AM NOT ABLE TO PROVIDE ATLEAST SAMPLE DATA BECAUSE THE COLUMNS ARE OVERLAPPING IF I AM PASTING THE DATA HERE. I HOPE IT WILL BE UNDERSTANDABLE. THE QUERY WHICH I WROTE IS TOO LONG AND TAKING HOURS TOGETHER TO RUN AND DISPLAY RESULT. IT WOULD BE A GREAT FAVOUR TO ME IF ANYONE CAN REDUCE THE LINES IN MY QUERY AND MAKE IT RUN FAST....PLEASE I WAS NOT KNOWING THE WAY HOW TO MAKE IT SHORT. IT HAS MANY LOGICS IN IT... :? PLEASE SUGGEST ME IF THERE IS ANY OPTION FOR ATTACHING A FILE SO THAT I CAN SEND MY SAMPLE DATA...
select pt.product code,
pt.product status,
pt.store code,
pt.store status,
pr.scheduled date,
pr.actual date,
pl.scheduled date,
pl.actual date,
ps.scheduled date,
ps.actual date,
fo.scheduled date,
fo.actual date,
fb.scheduled date,
fb.actual date,
fod.scheduled date,
fod.actual date,
lo.scheduled date,
lo.actual date,
lom.scheduled date,
lom.actual date,
lod.scheduled date,
lod.actual date,
/*pr*/
case
WHEN pt.store status = 'Cancelled' OR
pt.store status = 'Stopped' THEN
cast('N/A' AS nvarchar2(30))
WHEN pt.store status = 'Completed' OR
pt.store status = 'Active' THEN
NVL2(pr.scheduled date,
cast(pr.scheduled date AS nvarchar2(30)),
'Null')
when pt.store status = 'Planned' THEN
NVL2(pr.scheduled date,
cast(pr.scheduled date AS nvarchar2(30)),
'Null')
end as DER_pr_SHC,
case
when pt.store status = 'Cancelled' OR
pt.store status = 'Stopped' THEN
cast('N/A' AS nvarchar2(30))
WHEN pt.store status = 'Completed' THEN
NVL2(pr.actual date,
cast(pr.actual date AS nvarchar2(30)),
'Null')
when pt.store status = 'Active' and
pr.scheduled date is null THEN
NVL2(pr.actual date,
cast(pr.actual date AS nvarchar2(30)),
'Null')
when pt.store status = 'Active' and
pr.scheduled date < CURRENT_DATE THEN
NVL2(pr.actual date,
cast(pr.actual date AS nvarchar2(30)),
'Null')
when pt.store status = 'Active' and
pr.scheduled date >= CURRENT_DATE THEN
NVL2(pr.actual date,
cast(pr.actual date AS nvarchar2(30)),
'N/A')
when pt.store status = 'Planned' and
pr.scheduled date is null THEN
NVL2(pr.actual date,
cast(pr.actual date AS nvarchar2(30)),
'N/A')
when pt.store status = 'Planned' and
pr.scheduled date < CURRENT_DATE THEN
NVL2(pr.actual date,
cast(pr.actual date AS nvarchar2(30)),
'Null')
when pt.store status = 'Planned' and
pr.scheduled date >= CURRENT_DATE THEN
NVL2(pr.actual date,
cast(pr.actual date AS nvarchar2(30)),
'N/A')
end as DER_pr_ACT,
/*pl*/
case
WHEN pt.store status = 'Cancelled' OR
pt.store status = 'Stopped' THEN
cast('N/A' AS nvarchar2(30))
WHEN pt.store status = 'Completed' OR
pt.store status = 'Active' THEN
NVL2(pl.scheduled date,
cast(pl.scheduled date AS nvarchar2(30)),
'Null')
when pt.store status = 'Planned' THEN
NVL2(pl.scheduled date,
cast(pl.scheduled date AS nvarchar2(30)),
'Null')
end as DER_pl_SHC,
case
when pt.store status = 'Cancelled' OR
pt.store status = 'Stopped' THEN
cast('N/A' AS nvarchar2(30))
WHEN pt.store status = 'Completed' THEN
NVL2(pl.actual date,
cast(pl.actual date AS nvarchar2(30)),
'Null')
when pt.store status = 'Active' and
pl.scheduled date is null THEN
NVL2(pl.actual date,
cast(pl.actual date AS nvarchar2(30)),
'Null')
when pt.store status = 'Active' and
pl.scheduled date < CURRENT_DATE THEN
NVL2(pl.actual date,
cast(pl.actual date AS nvarchar2(30)),
'Null')
when pt.store status = 'Active' and
pl.scheduled date >= CURRENT_DATE THEN
NVL2(pl.actual date,
cast(pl.actual date AS nvarchar2(30)),
'N/A')
when pt.store status = 'Planned' and
pl.scheduled date is null THEN
NVL2(pl.actual date,
cast(pl.actual date AS nvarchar2(30)),
'N/A')
when pt.store status = 'Planned' and
pl.scheduled date < CURRENT_DATE THEN
NVL2(pl.actual date,
cast(pl.actual date AS nvarchar2(30)),
'Null')
when pt.store status = 'Planned' and
pl.scheduled date >= CURRENT_DATE THEN
NVL2(pl.actual date,
cast(pl.actual date AS nvarchar2(30)),
'N/A')
end as DER_pl_ACT,
/*ps*/
case
WHEN pt.store status = 'Cancelled' OR
pt.store status = 'Stopped' THEN
cast('N/A' AS nvarchar2(30))
WHEN pt.store status = 'Completed' OR
pt.store status = 'Active' THEN
NVL2(ps.scheduled date,
cast(ps.scheduled date AS nvarchar2(30)),
'Null')
when pt.store status = 'planned' THEN
NVL2(ps.scheduled date,
cast(ps.scheduled date AS nvarchar2(30)),
'Null')
end as DER_ps_SHC,
case
when pt.store status = 'Cancelled' OR
pt.store status = 'Stopped' THEN
cast('N/A' AS nvarchar2(30))
WHEN pt.store status = 'Completed' THEN
NVL2(ps.actual date,
cast(ps.actual date AS nvarchar2(30)),
'Null')
when pt.store status = 'Active' and
ps.scheduled date is null THEN
NVL2(ps.actual date,
cast(ps.actual date AS nvarchar2(30)),
'Null')
when pt.store status = 'Active' and
ps.scheduled date < CURRENT_DATE THEN
NVL2(ps.actual date,
cast(ps.actual date AS nvarchar2(30)),
'Null')
when pt.store status = 'Active' and
ps.scheduled date >= CURRENT_DATE THEN
NVL2(ps.actual date,
cast(ps.actual date AS nvarchar2(30)),
'N/A')
when pt.store status = 'planned' and
ps.scheduled date is null THEN
NVL2(ps.actual date,
cast(ps.actual date AS nvarchar2(30)),
'N/A')
when pt.store status = 'planned' and
ps.scheduled date < CURRENT_DATE THEN
NVL2(ps.actual date,
cast(ps.actual date AS nvarchar2(30)),
'Null')
when pt.store status = 'planned' and
ps.scheduled date >= CURRENT_DATE THEN
NVL2(ps.actual date,
cast(ps.actual date AS nvarchar2(30)),
'N/A')
end as DER_ps_ACT,
/*fo*/
case
WHEN pt.store status = 'Cancelled' OR
pt.store status = 'Stopped' THEN
cast('N/A' AS nvarchar2(30))
WHEN pt.store status = 'Completed' OR
pt.store status = 'Active' THEN
NVL2(fo.scheduled date,
cast(fo.scheduled date AS nvarchar2(30)),
'Null')
when pt.store status = 'planned' THEN
NVL2(fo.scheduled date,
cast(fo.scheduled date AS nvarchar2(30)),
'Null')
end as DER_fo_SHC,
case
when pt.store status = 'Cancelled' OR
pt.store status = 'Stopped' THEN
cast('N/A' AS nvarchar2(30))
WHEN pt.store status = 'Completed' THEN
NVL2(fo.actual date,
cast(fo.actual date AS nvarchar2(30)),
'Null')
when pt.store status = 'Active' and
fo.scheduled date is null THEN
NVL2(fo.actual date,
cast(fo.actual date AS nvarchar2(30)),
'Null')
when pt.store status = 'Active' and
fo.scheduled date < CURRENT_DATE THEN
NVL2(fo.actual date,
cast(fo.actual date AS nvarchar2(30)),
'Null')
when pt.store status = 'Active' and
fo.scheduled date >= CURRENT_DATE THEN
NVL2(fo.actual date,
cast(fo.actual date AS nvarchar2(30)),
'N/A')
when pt.store status = 'planned' and
fo.scheduled date is null THEN
NVL2(fo.actual date,
cast(fo.actual date AS nvarchar2(30)),
'N/A')
when pt.store status = 'planned' and
fo.scheduled date < CURRENT_DATE THEN
NVL2(fo.actual date,
cast(fo.actual date AS nvarchar2(30)),
'Null')
when pt.store status = 'planned' and
fo.scheduled date >= CURRENT_DATE THEN
NVL2(fo.actual date,
cast(fo.actual date AS nvarchar2(30)),
'N/A')
end as DER_fo_ACT,
/*fb*/
case
WHEN pt.store status = 'Cancelled' OR
pt.store status = 'Stopped' THEN
cast('N/A' AS nvarchar2(30))
WHEN pt.store status = 'Completed' OR
pt.store status = 'Active' THEN
NVL2(fb.scheduled date,
cast(fb.scheduled date AS nvarchar2(30)),
'Null')
when pt.store status = 'planned' THEN
NVL2(fb.scheduled date,
cast(fb.scheduled date AS nvarchar2(30)),
'Null')
end as DER_fb_SHC,
case
when pt.store status = 'Cancelled' OR
pt.store status = 'Stopped' THEN
cast('N/A' AS nvarchar2(30))
WHEN pt.store status = 'Completed' THEN
NVL2(fb.actual date,
cast(fb.actual date AS nvarchar2(30)),
'Null')
when pt.store status = 'Active' and
fb.scheduled date is null THEN
NVL2(fb.actual date,
cast(fb.actual date AS nvarchar2(30)),
'Null')
when pt.store status = 'Active' and
fb.scheduled date < CURRENT_DATE THEN
NVL2(fb.actual date,
cast(fb.actual date AS nvarchar2(30)),
'Null')
when pt.store status = 'Active' and
fb.scheduled date >= CURRENT_DATE THEN
NVL2(fb.actual date,
cast(fb.actual date AS nvarchar2(30)),
'N/A')
when pt.store status = 'planned' and
fb.scheduled date is null THEN
NVL2(fb.actual date,
cast(fb.actual date AS nvarchar2(30)),
'N/A')
when pt.store status = 'planned' and
fb.scheduled date < CURRENT_DATE THEN
NVL2(fb.actual date,
cast(fb.actual date AS nvarchar2(30)),
'Null')
when pt.store status = 'planned' and
fb.scheduled date >= CURRENT_DATE THEN
NVL2(fb.actual date,
cast(fb.actual date AS nvarchar2(30)),
'N/A')
end as DER_fb_ACT,
/*fod*/
case
WHEN pt.store status = 'Cancelled' OR
pt.store status = 'Stopped' THEN
cast('N/A' AS nvarchar2(30))
WHEN pt.store status = 'Compldeted' OR
pt.store status = 'Active' THEN
NVL2(fod.scheduled date,
cast(fod.scheduled date AS nvarchar2(30)),
'Null')
when pt.store status = 'pldanned' THEN
NVL2(fod.scheduled date,
cast(fod.scheduled date AS nvarchar2(30)),
'Null')
end as DER_fod_SHC,
case
when pt.store status = 'Cancelled' OR
pt.store status = 'Stopped' THEN
cast('N/A' AS nvarchar2(30))
WHEN pt.store status = 'Completed' THEN
NVL2(fod.actual date,
cast(fod.actual date AS nvarchar2(30)),
'Null')
when pt.store status = 'Active' and
fod.scheduled date is null THEN
NVL2(fod.actual date,
cast(fod.actual date AS nvarchar2(30)),
'Null')
when pt.store status = 'Active' and
fod.scheduled date < CURRENT_DATE THEN
NVL2(fod.actual date,
cast(fod.actual date AS nvarchar2(30)),
'Null')
when pt.store status = 'Active' and
fod.scheduled date >= CURRENT_DATE THEN
NVL2(fod.actual date,
cast(fod.actual date AS nvarchar2(30)),
'N/A')
when pt.store status = 'planned' and
fod.scheduled date is null THEN
NVL2(fod.actual date,
cast(fod.actual date AS nvarchar2(30)),
'N/A')
when pt.store status = 'planned' and
fod.scheduled date < CURRENT_DATE THEN
NVL2(fod.actual date,
cast(fod.actual date AS nvarchar2(30)),
'Null')
when pt.store status = 'planned' and
fod.scheduled date >= CURRENT_DATE THEN
NVL2(fod.actual date,
cast(fod.actual date AS nvarchar2(30)),
'N/A')
end as DER_fod_ACT,
/*lo*/
case
WHEN pt.store status = 'Cancelled' OR
pt.store status = 'Stopped' THEN
cast('N/A' AS nvarchar2(30))
WHEN pt.store status = 'Completed' OR
pt.store status = 'Active' THEN
NVL2(lo.scheduled date,
cast(lo.scheduled date AS nvarchar2(30)),
'Null')
when pt.store status = 'planned' THEN
NVL2(lo.scheduled date,
cast(lo.scheduled date AS nvarchar2(30)),
'Null')
end as DER_lo_SHC,
case
when pt.store status = 'Cancelled' OR
pt.store status = 'Stopped' THEN
cast('N/A' AS nvarchar2(30))
WHEN pt.store status = 'Completed' THEN
NVL2(lo.actual date,
cast(lo.actual date AS nvarchar2(30)),
'Null')
when pt.store status = 'Active' and
lo.scheduled date is null THEN
NVL2(lo.actual date,
cast(lo.actual date AS nvarchar2(30)),
'Null')
when pt.store status = 'Active' and
lo.scheduled date < CURRENT_DATE THEN
NVL2(lo.actual date,
cast(lo.actual date AS nvarchar2(30)),
'Null')
when pt.store status = 'Active' and
lo.scheduled date >= CURRENT_DATE THEN
NVL2(lo.actual date,
cast(lo.actual date AS nvarchar2(30)),
'N/A')
when pt.store status = 'planned' and
lo.scheduled date is null THEN
NVL2(lo.actual date,
cast(lo.actual date AS nvarchar2(30)),
'N/A')
when pt.store status = 'planned' and
lo.scheduled date < CURRENT_DATE THEN
NVL2(lo.actual date,
cast(lo.actual date AS nvarchar2(30)),
'Null')
when pt.store status = 'planned' and
lo.scheduled date >= CURRENT_DATE THEN
NVL2(lo.actual date,
cast(lo.actual date AS nvarchar2(30)),
'N/A')
end as DER_lo_ACT,
/*lom*/
case
WHEN pt.store status = 'Cancelled' OR
pt.store status = 'Stopped' THEN
cast('N/A' AS nvarchar2(30))
WHEN pt.store status = 'Completed' OR
pt.store status = 'Active' THEN
NVL2(lom.scheduled date,
cast(lom.scheduled date AS nvarchar2(30)),
'Null')
when pt.store status = 'planned' THEN
NVL2(lom.scheduled date,
cast(lom.scheduled date AS nvarchar2(30)),
'Null')
end as DER_lom_SHC,
case
when pt.store status = 'Cancelled' OR
pt.store status = 'Stopped' THEN
cast('N/A' AS nvarchar2(30))
WHEN pt.store status = 'Completed' THEN
NVL2(lom.actual date,
cast(lom.actual date AS nvarchar2(30)),
'Null')
when pt.store status = 'Active' and
lom.scheduled date is null THEN
NVL2(lom.actual date,
cast(lom.actual date AS nvarchar2(30)),
'Null')
when pt.store status = 'Active' and
lom.scheduled date < CURRENT_DATE THEN
NVL2(lom.actual date,
cast(lom.actual date AS nvarchar2(30)),
'Null')
when pt.store status = 'Active' and
lom.scheduled date >= CURRENT_DATE THEN
NVL2(lom.actual date,
cast(lom.actual date AS nvarchar2(30)),
'N/A')
when pt.store status = 'planned' and
lom.scheduled date is null THEN
NVL2(lom.actual date,
cast(lom.actual date AS nvarchar2(30)),
'N/A')
when pt.store status = 'planned' and
lom.scheduled date < CURRENT_DATE THEN
NVL2(lom.actual date,
cast(lom.actual date AS nvarchar2(30)),
'Null')
when pt.store status = 'planned' and
lom.scheduled date >= CURRENT_DATE THEN
NVL2(lom.actual date,
cast(lom.actual date AS nvarchar2(30)),
'N/A')
end as DER_lom_ACT,
/*lod*/
case
WHEN pt.store status = 'Cancelled' OR
pt.store status = 'Stopped' THEN
cast('N/A' AS nvarchar2(30))
WHEN pt.store status = 'Completed' OR
pt.store status = 'Active' THEN
NVL2(lod.scheduled date,
cast(lod.scheduled date AS nvarchar2(30)),
'Null')
when pt.store status = 'planned' THEN
NVL2(lod.scheduled date,
cast(lod.scheduled date AS nvarchar2(30)),
'Null')
end as DER_lod_SHC,
case
when pt.store status = 'Cancelled' OR
pt.store status = 'Stopped' THEN
cast('N/A' AS nvarchar2(30))
WHEN pt.store status = 'Completed' THEN
NVL2(lod.actual date,
cast(lod.actual date AS nvarchar2(30)),
'Null')
when pt.store status = 'Active' and
lod.scheduled date is null THEN
NVL2(lod.actual date,
cast(lod.actual date AS nvarchar2(30)),
'Null')
when pt.store status = 'Active' and
lod.scheduled date < CURRENT_DATE THEN
NVL2(lod.actual date,
cast(lod.actual date AS nvarchar2(30)),
'Null')
when pt.store status = 'Active' and
lod.scheduled date >= CURRENT_DATE THEN
NVL2(lod.actual date,
cast(lod.actual date AS nvarchar2(30)),
'N/A')
when pt.store status = 'planned' and
lod.scheduled date is null THEN
NVL2(lod.actual date,
cast(lod.actual date AS nvarchar2(30)),
'N/A')
when pt.store status = 'planned' and
lod.scheduled date < CURRENT_DATE THEN
NVL2(lod.actual date,
cast(lod.actual date AS nvarchar2(30)),
'Null')
when pt.store status = 'planned' and
lod.scheduled date >= CURRENT_DATE THEN
NVL2(lod.actual date,
cast(lod.actual date AS nvarchar2(30)),
'N/A')
end as DER_lod_ACT
from
product table pt,
event table pr,
event table pl,
event table ps,
event table fo,
event table fb,
event table fod,
event table lo,
event table lom,
event table lod
where
pt.product code = pr.product code
and pt.store code = pr.store code
and pt.product code = pl.product code
and pt.store code = pl.store code
and pt.product code = fo.product code
and pt.store code = fo.store code
and pt.product code = fb.product code
and pt.store code = fb.store code
and pt.product code = fod.product code
and pt.store code = fod.store code
and pt.product code = lo.product code
and pt.store code = lo.store code
and pt.product code = lom.product code
and pt.store code = lom.store code
and pt.product code = lod.product code
and pt.store code = lod.store code
and pr.product code=pl.product code
and pl.store code=ps.store code
and ps.product code=fo.product code
and fo.store code=fb.store code
and fb.product code=fod.product code
and fod.store code=lo.store code
and lo.product code=lom.product code
and lom.store code=lod.store code
and pr.event code=1001
and pl.event code=1002
and ps.event code=1003
and fo.event code=1004
and fb.event code=1005
and fod.event code=1006
and lo.event code=1007
and lom.event code=1008
and lod.event code=1009
order by product code,store code;
THANKS IN ADVANCE FOR SPARING YOUR TIME IN UNDERSTANDING MY PROVLEM....
REGARDS,
MYTHRI.986300 wrote:
from
product table pt,
event table pr,
event table pl,
event table ps,
event table fo,
event table fb,
event table fod,
event table lo,
event table lom,
event table lodabove is NOT valid SQL syntax -
Need help getting ALL iTunes from old comp hard drive
Old computer XP Home died after house was hit by lightning. Surge protector gave it's life but not enough to save the day. However both hard drives from old computer are fine and function via connection of USB external hard drive enclosure.
New computer is Vista Home Premium on AMD64duo w/4G RAM and 500GB hard drive.
Connected old hard drives to USB and can see everything. Did Import Folder and copied most files from old iTunes Music directory. (I say most files because iTunes continues to crash after approx 10 minutes of this copy process. On 17th try now.)
Can see and play the music that got copied but artwork is gone. Playlists are gone. Ratings gone. Basically all the preferences of how I had the old iTunes setup.
Needing help in understanding how to get Artwork and anything else I can from the old iTunes.
Have not tried to plug in iPod yet. Will wait atm.
First old drive had Program files and Second old drive had all Data files.
AMD64 AthlonX2 Other OS Vista Home Pre AMD64 duo 4G
AMD64 AthlonX2 Other OS Vista Home Pre AMD64 duo 4GFirst, I followed the instructions on this site for Backing up itunes library by copying to a external hard drive.........
That's what it does. It makes a backup copy of the iTunes folder. iTunes will not use that folder or do anything to that folder.
All that succeeding in doing was mirroring whatever I did on the C:/ drive on the E:/ drive i.e. if I deleted itunes from the C:/ drive it disappeared from the E:/ drive.
Do you mean after you followed the instructions and copied \Music\iTunes folder to the external drive and then deleted something from iTunes, it deleted it from the external drive also?
As above, iTunes will not use or do anything to that folder.
Next, I followed these instructions for Moving the itunes media folder to the external drive.
Why? You already copied the entire iTunes folder (including th emedia folder) to the external drive.
Hold Shift and launch iTunes.
Select *Choose library* and select the _iTunes library.itl_ file in the iTunes folder on the external.
This too didn't help as the media folder is not the problem, its the library as its 735kb!
What do you mean "the library"?
735kB is small for the iTunes library.itl file and a single file in iTunes is larger than that.
Am I right in thinking there's no way of moving the library to the external drive whilst wiping it from the C;/ drive?
Yes. Follow my intruction above (Choose library) and iTunes will use the iTunes folder on the external.
You can then delete \Music\iTunes on the C: drive. -
Need help in GROUPING of COLUMN Based Query
Hi,
I am facing problem in generating a scenario:
I have built a Query like this:
SELECT
a.sal,
a.country
FROM
employee a,
department d
WHERE
a.dept_code=b.dept_code
I want the query where the Query will produce a result set based on SALARY based on COUNTRY.
For example if the COUNTRY is US then it will show the breaking of SALARIES.If the COUNTRY is NON US it will club the SALRIES
Any help will be needful for meHi,
Here's one way:
SELECT deptno
, SUM (sal) AS sal
FROM scott.emp
GROUP BY deptno
, CASE
WHEN deptno = 30
THEN empno
END
ORDER BY deptno
;Output:
` DEPTNO SAL
10 8750
20 10875
30 1600
30 1250
30 1250
30 2850
30 1500
30 950In the table, there are 3 rows with deptno=10, and 5 rows with deptno=20, but the CASE expression returns NULL for all of them, so there is only 1 sub-group for each of those deptnos.
Edited by: Frank Kulash on Mar 13, 2013 5:41 AM
This is essentially the same solution that Jeneesh already posted. (Sorry, I didn't see that before.) -
Need help in Bind variable in AF Query LOV
Hi,
i have one problem with bind variable, if i use bind variable in the LOV VO Query then my result is not coming, if there is not bind variable it's working fine and if i use the bind variable in the LOV search option then it's working fine but if i hide the bind variable and set the value in AM prepareSesstion method the LOV is not returning any value. I try to return the values also all values are also coming but those values are not setting to AF Query Attribute.
Query is:
select substr(d.description,0,40) description
from cm_system_users a,
cm_user_responsibilities b,
cm_responsibility_processes c,
cm_processes d
where a.nt_login =:B_NT_LOGIN
and a.user_id = b.user_id
and trunc(sysdate) between b.eff_date and nvl(b.exp_date,sysdate + 1)
and b.RESPONSIBILITY_ID = c.RESPONSIBILITY_ID
and c.process_type = d.process_type
and d.enabled_flag = 'Y' order by d.arguments_flag
AM Method:
CmProcessViewImpl vo = getCmProcessView();
String nt_login = getUserPrincipalName();
vo.setNamedWhereClauseParam("B_NT_LOGIN", nt_login.toUpperCase());
vo.executeQuery();
Can any one help me in this. it's urgent for me.This is a little underdescribed. IIUC, the view object in question is being used as a target for a view accessor, correct? (Otherwise you'll have to be more explicit about what you mean by "Query LOV".
If I'm right, there are two possibilities:
1) You are using a VO instance in a shared application module instance. If so, make sure your code is in the prepareSession() for that application module class if it's session dependent (as it seems to be below), you need to make sure the application module instance is shared at session scope.
2) You've based the view accessor directly on the VO definition. This basically creates an anonymous VO instance; I don't think there's any way to use prepareSession() to set a bind variable on such an instance (which won't be created until the accessor is first used). You might be able to get by with putting similar code into the view object class' create() method, but I haven't tested this.
If your code is in your primary application module class (as opposed to the class for a shared AM instance), the problem here is that getCmProcessView() returns the VO instance from that application module instance's design-time data model, which is never used by view accessors.
By the way, why do you need to do this in prepareSession() instead of at the view accessor level? I believe you can get the logged in user name (for the view accessor) in with the groovy expression
viewObject.DBTransaction.session.userPrincipalName
or possibly just
DBTransaction.session.userPrincipalName
(despite this involving DBTransaction, it returns the web app user name, not the DB username).
That's a 100% declarative solution, if you don't count the Groovy expression as non-declarative.
If you're afraid of a user executing the LOV (somehow) before the bind variable value gets set, just ensure that the bind variable is marked "required". -
Need help in optimisation for a select query on a large table
Hi Gurus
Please help in optimising the code. It takes 1 hr for 3-4000 records. Its very slow.
My Select is reading from a table which contains 10 Million records.
I am writing the select on large table and Retrieving the values from large tables by comparing my table which has 3-4 k records.
I am pasting the code. please help
Data: wa_i_tab1 type tys_tg_1 .
DATA: i_tab TYPE STANDARD TABLE OF tys_tg_1.
Data : wa_result_pkg type tys_tg_1,
wa_result_pkg1 type tys_tg_1.
SELECT /BIC/ZSETLRUN AGREEMENT /BIC/ZREB_SDAT /BIC/ZLITEM1 from
/BIC/PZREB_SDAT *******************THIS TABLE CONTAINS 10 MILLION RECORDS
into CORRESPONDING FIELDS OF table i_tab
FOR ALL ENTRIES IN RESULT_PACKAGE***************CONTAINS 3000-4000 RECORDS
where
/bic/ZREB_SDAT = RESULT_PACKAGE-/BIC/ZREB_SDAT
AND
AGREEMENT = RESULT_PACKAGE-AGREEMENT
AND /BIC/ZLITEM1 = RESULT_PACKAGE-/BIC/ZLITEM1.
sort RESULT_PACKAGE by AGREEMENT /BIC/ZREB_SDAT /BIC/ZLITEM1.
sort i_tab by AGREEMENT /BIC/ZREB_SDAT /BIC/ZLITEM1.
loop at RESULT_PACKAGE into wa_result_pkg.
read TABLE i_tab INTO wa_i_tab1 with key
/BIC/ZREB_SDAT =
wa_result_pkg-/BIC/ZREB_SDAT
AGREEMENT = wa_result_pkg-AGREEMENT
/BIC/ZLITEM1 = wa_result_pkg-/BIC/ZLITEM1.
IF SY-SUBRC = 0.
move wa_i_tab1-/BIC/ZSETLRUN to
wa_result_pkg-/BIC/ZSETLRUN.
wa_result_pkg1-/BIC/ZSETLRUN = wa_result_pkg-/BIC/ZSETLRUN.
modify RESULT_PACKAGE from wa_result_pkg1
TRANSPORTING /BIC/ZSETLRUN.
ENDIF.
CLEAR: wa_i_tab1,wa_result_pkg1,wa_result_pkg.
endloop.Hi,
1) RESULT_PACKAGE internal table contains any duplicate records or not bassed on the where condotion like below
2) Remove the into CORRESPONDING FIELDS OF table instead of that into table use.
refer the below code is
RESULT_PACKAGE1[] = RESULT_PACKAGE[].
sort RESULT_PACKAGE1 by /BIC/ZREB_SDAT AGREEMENT /BIC/ZLITEM1.
delete adjustant duplicate form RESULT_PACKAGE1 comparing /BIC/ZREB_SDAT AGREEMENT /BIC/ZLITEM1.
SELECT /BIC/ZSETLRUN AGREEMENT /BIC/ZREB_SDAT /BIC/ZLITEM1
from /BIC/PZREB_SDAT
into table i_tab
FOR ALL ENTRIES IN RESULT_PACKAGE1
where
/bic/ZREB_SDAT = RESULT_PACKAGE1-/BIC/ZREB_SDAT
AND
AGREEMENT = RESULT_PACKAGE1-AGREEMENT
AND /BIC/ZLITEM1 = RESULT_PACKAGE1-/BIC/ZLITEM1.
and one more thing your getting 10 million records so use package size in you select query.
Refer the following link also For All Entry for 1 Million Records
Regards,
Dhina..
Edited by: Dhina DMD on Sep 15, 2011 7:17 AM -
Need help in UPDATE data in SQL Query
Hi all,
I am trying to update data in the sql table as per below screenshot but couldn't able to do it. Can anyone help to update the data as I mention in screenshot.Appreciate you help.Thanks.
Yellow highlighted columns are source
Green highlighted columns are target
Colored data should be update as per source data in sql table.Data is not static as it might have more rows to update and query should be bit dynamic.
Maruthi...You have already asked this question once. You did not get any good answers, because you the information you gave was insufficient. And I'm afraid that the information is still in sufficient.
Or more exactly, from the example you have given, the answer is: can't be done. And the reason it can't be done, is as I explained in response to you first thread: there is no information in the data to from which we can deduce that Clorox Company
should be under "Week 1-1,K.B,F". The fact that rows are listed in a certain order in the screenshoot is of no importance, because a table is an unordered object.
But you said in another post that you have a timestamp column. Maybe that column is usable - maybe it is not. But at least it is a key that you have more columns that the ones you show.
The best way to get help with this type of problems is to post:
1) CREATE TABLE statement for your table(s).
2) INSERT statements with sample data.
3) The desired result given the sample.
4) A short description of the actual buisness problem you are trying to solve.
5) Which version of SQL Server you are using.
This makes it easy to copy and paste into a query window to develop a tested solution. Screenshots with an insufficient amount of data is not going to help you very much.
Erland Sommarskog, SQL Server MVP, [email protected] -
[Oracle 8i] Need help pruning branches from a hierarchical query
My problem is that my hierarchical query seems only to trim out the values that don't meet my criteria, but still includes their children. When my query hits a record that does not meet my criteria, I want it to stop there. I've tried including the criteria in just the 'where' clause of the query, and have also put the criteria in the 'connect by' clause as well, but nothing has fixed it. Please keep in mind I'm using Oracle 8i, so I can't use some of the 'nicer' statements for hierarchical queries that they introduced in 9. I'm stuck with 'Start With...Connect By'.
I have sample tables/data that I can post if someone needs to see that to help me, but to start with, here's my current query:
SELECT *
FROM (
SELECT
LEVEL
, c_bill.comp_part_nbr AS c_part_nbr
, (select c_part.part_desc
FROM part c_part
WHERE c_part.part_nbr=c_bill.comp_part_nbr) AS c_part_desc
, (SELECT c_part.part_type
FROM part c_part
WHERE c_part.part_nbr=c_bill.comp_part_nbr) AS c_part_type
, c_bill.qty_per AS c_qty_per_p
, c_bill.qty_per_type AS c_qty_per_type
, (SELECT c_part.qty_on_hand
FROM part c_part
WHERE c_part.part_nbr=c_bill.comp_part_nbr) AS c_qty_on_hand
, c_bill.oper_nbr AS rqd_at_op
, c_bill.comp_off_adj AS rqd_offset
, c_bill.bom_doc_nbr AS p_part_nbr
, (SELECT p_part.qty_on_hand
FROM part p_part
WHERE p_part.part_nbr=c_bill.bom_doc_nbr) AS p_qty_on_hand
FROM
BILL c_bill
WHERE
(c_bill.status = 'RL')
AND (c_bill.view_code IN ('M','G'))
AND (c_bill.end_eff_dt > SYSDATE)
AND (c_bill.begn_eff_dt <= SYSDATE)
START WITH c_bill.bom_doc_nbr=RPAD(?,25)
CONNECT BY PRIOR c_bill.comp_part_nbr=c_bill.bom_doc_nbr
AND c_bill.view_code IN ('M','G')
AND c_bill.status = 'RL'
AND c_bill.end_eff_dt > SYSDATE
AND c_bill.begn_eff_dt <= SYSDATE
) a
WHERE c_part_type = 'M'The outside criterion of part_type='M' isn't my problem. Where I'm actually seeing my issue rear its ugly head is in the criterion:
(c_bill.view_code IN ('M','G'))What I'll have happen is that one of the children or grandchildren of the part number I'm querying for (my parameter), will be of some view code that's not 'M' or 'G'. In my sample data below, I have a level 4 part that is part of the 'H' view code, which I don't want, nor do I want it's children. However, its child is in the 'G' view code, and my query returns it anyway.
In my sample data below, I'm assuming that the parameter = 'XYZ-100'
CREATE TABLE part
part_nbr varchar(25) not null,
part_desc varchar(25) not null,
part_type char(1) not null,
qty_on_hand double(13,4) not null
CONSTRAINT part_pk
PRIMARY KEY (part_nbr),
CONSTRAINT check_part_type
CHECK (part_type IN ('M','P','X','Y')),
CONSTRAINT check_qty_on_hand
CHECK (qty_on_hand >= 0)
CREATE TABLE bill
row_added_ts char(20) not null,
bom_doc_nbr varchar(25) not null,
comp_part_nbr varchar(25) not null,
qty_per double(9,5) not null,
qty_per_type char(1) not null,
oper_nbr char(4) not null,
comp_off_adj double(3,0),
status char(2),
view_code char(1) not null,
end_eff_dt date() not null,
begn_eff_dt date() not null
CONSTRAINT bill_pk
PRIMARY KEY (row_added_ts),
CONSTRAINT check_qty_per_type
CHECK (qty_per_type IN ('0','1','2','3')),
CONSTRAINT check_status
CHECK (status IN ('IN', 'RL')),
); Values for those tables:
INSERT INTO part
VALUES ('xyz-1', 'purchased part', 'P', 5);
INSERT INTO part
VALUES ('xyz-2', 'purchased part', 'P', 1);
INSERT INTO part
VALUES ('xyz-3', 'purchased part', 'P', 1);
INSERT INTO part
VALUES ('xyz-3a', 'manufactured part', 'M', 1);
INSERT INTO part
VALUES ('xyz-4', 'purchased part', 'P', 1);
INSERT INTO part
VALUES ('xyz-9-1', 'manufactured part', 'M', 0);
INSERT INTO part
VALUES ('xyz-9a', 'manufactured part', 'M', 0);
INSERT INTO part
VALUES ('raw-1', 'purchased raw material', 'P', 212);
INSERT INTO part
VALUES ('raw-2', 'purchased raw material', 'P', 75.5);
INSERT INTO part
VALUES ('XYZ-100', 'manufactured part', 'M', 0);
INSERT INTO part
VALUES ('(OPEN)', '(not in use)', 'Y', 0);
INSERT INTO part
VALUES ('XYZ-100-1', 'manufactured part', 'M', 0);
INSERT INTO part
VALUES ('XYZ-100-2', 'manufactured part', 'M', 1);
INSERT INTO part
VALUES ('XYZ-100-3', 'manufactured part', 'M', 0);
INSERT INTO part
VALUES ('XYZ-100-4', 'manufactured part', 'M', 2);
INSERT INTO part
VALUES ('XYZ-100-A', 'manufactured part', 'M', 0);
INSERT INTO bill
VALUES ('2008072153100150000','XYZ-100','xyz-1',3,'1','****',0,'RL','M','01-Jan-2050','01-Jan-1900');
INSERT INTO bill
VALUES ('2008072153100150000','XYZ-100','XYZ-100-1',1,'1','****',0,'RL','M','01-Jan-2050','01-Jan-1900');
INSERT INTO bill
VALUES ('2008072153100150000','XYZ-100-1','xyz-1',2,'1','****',1,'RL','M','01-Jan-2050','01-Jan-1900');
INSERT INTO bill
VALUES ('2008072153100150000','XYZ-100-1','XYZ-100-2',3,'1','****',0,'RL','M','01-Jan-2050','01-Jan-1900');
INSERT INTO bill
VALUES ('2008072153100150000','XYZ-100-2','xyz-2',6,'1','****',2,'RL','M','01-Jan-2050','01-Jan-1900');
INSERT INTO bill
VALUES ('2008072153100150000','XYZ-100-2','xyz-4',6,'1','****',2,'IN','M','01-Jan-2050','01-Jan-1900');
INSERT INTO bill
VALUES ('2008072153100150000','XYZ-100-2','xyz-100-3',1,'1','****',0,'RL','M','01-Jan-2050','01-Jan-1900');
INSERT INTO bill
VALUES ('2008072153100150000','XYZ-100-3','xyz-3',8,'1','****',1,'RL','M','01-Jan-2050','01-Jan-2000');
INSERT INTO bill
VALUES ('2008072153100150000','XYZ-100-3','xyz-3a',8,'1','****',1,'RL','M','01-Jan-2000','01-Jan-1900');
INSERT INTO bill
VALUES ('2008072153100150000','XYZ-100-3','XYZ-100-4',4,'1','****',0,'RL','M','01-Jan-2050','01-Jan-1900');
INSERT INTO bill
VALUES ('2008072153100150000','XYZ-100-3','XYZ-100-A',2,'1','****',2,'RL','M','01-Jan-2050','01-Jan-1900');
INSERT INTO bill
VALUES ('2008071153100150000','XYZ-100-3','(OPEN)',2,'1','****',0,'RL','E','01-Jan-2050','01-Jan-1900');
INSERT INTO bill
VALUES ('2008071153100150000','XYZ-100-3','xyz-9-1',2,'1','****',0,'RL','H','01-Jan-2050','01-Jan-1900');
INSERT INTO bill
VALUES ('2008072153100150000','XYZ-100-4','raw-1',8.75,'1','****',0,'RL','M','01-Jan-2050','01-Jan-1900');
INSERT INTO bill
VALUES ('2008072153100150000','XYZ-100-A','raw-2',3.75,'1','****',0,'RL','M','01-Jan-2050','01-Jan-1900');
INSERT INTO bill
VALUES ('2008075911100150000','xyz-9-1','xyz-9a',1,'1','****',0,'RL','G','01-Jan-2050','01-Jan-1900');
INSERT INTO bill
VALUES ('2008087711100150000','xyz-9a','raw-2',3.75,'1','****',0,'RL','G','01-Jan-2050','01-Jan-1900');Sample data displayed in table format:
--PART table (from insert statements above)
part_nbr part_desc part_type qty_on_hand
xyz-1 purchased part P 5
xyz-2 purchased part P 1
xyz-3 purchased part P 1
xyz-3a manufactured part M 1
xyz-4 purchased part P 1
xyz-9-1 manufactured part M 0
xyz-9a manufactured part M 0
raw-1 purchased raw material P 212
raw-2 purchased raw material P 75.5
XYZ-100 manufactured part M 0
(OPEN) (not in use) Y 0
XYZ-100-1 manufactured part M 0
XYZ-100-2 manufactured part M 1
XYZ-100-3 manufactured part M 0
XYZ-100-4 manufactured part M 2
XYZ-100-A manufactured part M 0
--BILL table (from insert statements above)
row_added_ts bom_doc_nbr comp_part_nbr qty_per qty_per_type oper_nbr comp_off_adj status view_code end_eff_dt begn_eff_dt
2008072153100150000 XYZ-100 xyz-1 3 1 **** 0 RL G 01-Jan-2050 01-Jan-1900
2008072223100150000 XYZ-100 XYZ-100-1 1 1 **** 0 RL M 01-Jan-2050 01-Jan-1900
2008072411100150000 XYZ-100-1 xyz-1 2 1 **** 1 RL M 01-Jan-2050 01-Jan-1900
2008072459100150000 XYZ-100-1 XYZ-100-2 3 1 **** 0 RL M 01-Jan-2050 01-Jan-1900
2008072578100150000 XYZ-100-2 xyz-2 6 1 **** 2 RL M 01-Jan-2050 01-Jan-1900
2008072694100150000 XYZ-100-2 xyz-4 6 1 **** 2 IN G 01-Jan-2050 01-Jan-1900
2008072786100150000 XYZ-100-2 xyz-100-3 1 1 **** 0 RL M 01-Jan-2050 01-Jan-1900
2008072865100150000 XYZ-100-3 xyz-3 8 1 **** 1 RL M 01-Jan-2050 01-Jan-2000
2008073100100150000 XYZ-100-3 xyz-3a 8 1 **** 1 RL M 01-Jan-2000 01-Jan-1900
2008073159100150000 XYZ-100-3 XYZ-100-4 4 1 **** 0 RL M 01-Jan-2050 01-Jan-1900
2008073346100150000 XYZ-100-3 XYZ-100-A 2 1 **** 2 RL M 01-Jan-2050 01-Jan-1900
2008073478100150000 XYZ-100-3 (OPEN) 2 1 **** 0 RL E 01-Jan-2050 01-Jan-1900
2008073529100150000 XYZ-100-3 xyz-9-1 2 1 **** 0 RL H 01-Jan-2050 01-Jan-1900
2008073798100150000 XYZ-100-4 raw-1 8.75 1 **** 0 RL M 01-Jan-2050 01-Jan-1900
2008073811100150000 XYZ-100-A raw-2 3.75 1 **** 0 RL M 01-Jan-2050 01-Jan-1900
2008075911100150000 xyz-9-1 xyz-9a 1 1 **** 0 RL G 01-Jan-2050 01-Jan-1900
2008087711100150000 xyz-9a raw-2 3.75 1 **** 0 RL G 01-Jan-2050 01-Jan-1900--What I want to get with my query (branches pruned off my tree)
LEVEL C_PART_NBR C_PART_DESC C_PART_TYPE C_QTY_PER_P C_QTY_PER_TYPE C_QTY_ON_HAND RQD_AT_OP RQD_OFFSET P_PART_NBR P_QTY_ON_HAND
1 XYZ-100-1 manufactured part M 1 1 0 **** 0 XYZ-100 0
2 XYZ-100-2 manufactured part M 3 1 1 **** 0 XYZ-100-1 0
3 xyz-100-3 manufactured part M 1 1 0 **** 0 XYZ-100-2 1
4 XYZ-100-4 manufactured part M 4 1 2 **** 0 XYZ-100-3 0
4 XYZ-100-A manufactured part M 2 1 0 **** 2 XYZ-100-3 0--What I actually get with my query (includes children of items that don't meet query criteria)
LEVEL C_PART_NBR C_PART_DESC C_PART_TYPE C_QTY_PER_P C_QTY_PER_TYPE C_QTY_ON_HAND RQD_AT_OP RQD_OFFSET P_PART_NBR P_QTY_ON_HAND
1 XYZ-100-1 manufactured part M 1 1 0 **** 0 XYZ-100 0
2 XYZ-100-2 manufactured part M 3 1 1 **** 0 XYZ-100-1 0
3 xyz-100-3 manufactured part M 1 1 0 **** 0 XYZ-100-2 1
4 XYZ-100-4 manufactured part M 4 1 2 **** 0 XYZ-100-3 0
4 XYZ-100-A manufactured part M 2 1 0 **** 2 XYZ-100-3 0
5 xyz-9a manufactured part M 1 1 0 **** 0 xyz-9-1 0Edited by: user11033437 on Jul 30, 2009 7:27 AM (grammar) -
Need Helping using VBA custom code to query AS400 database
Hi
I am trying to connect the AS400 using the custom page programmability in etester. I am able to make the connection for SQL queries but when i try to do the same for a SPROC, I am not able to do it successfully. Any help is very much appreciated.
Thanks
SubuThe easiest thing to open the ODBC interface and create a DSN entry for your AS400. (You will need the appropriate drivers loaded on the windows machine) Once you have done that, you can use the Microsoft Active-x data objects to connect, query, read and write data.
-
Need Help with instr/Regexp for the query
Hi Oracle Folks
I am using Oracle
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
I have some student responses and the valid values are +/-/O(alphabet)/P and spaces at the end of the sting only not in the middle.
As per my requirement the record number 2 3,4 should be listed from the query but I am getting only one (record 3).
Can we use REG_EXP
Please help.
Thanks in advance.
Rajesh
with x as (
SELECT '+-+-POPPPPPP ' STUDENT_RESPONSE, 1 record_number FROM DUAL union all
SELECT '+--AOPPPPPP++' STUDENT_RESPONSE, 2 record_number FROM DUAL union all
SELECT '+-+- OPPPPPP--' STUDENT_RESPONSE, 3 record_number FROM DUAL union all
SELECT '+-+-9OPPPPPP ' STUDENT_RESPONSE, 4 record_number FROM DUAL )
(SELECT RECORD_NUMBER,
TRIM(STUDENT_RESPONSE) FROM X
WHERE
((INSTR (UPPER(TRIM(STUDENT_RESPONSE)),'-') =0)
OR (INSTR (UPPER(TRIM(STUDENT_RESPONSE)),'+') =0)
OR (INSTR (UPPER(TRIM(STUDENT_RESPONSE)),'O') =0)
OR (INSTR (UPPER(TRIM(STUDENT_RESPONSE)),'P') =0)
OR (INSTR (UPPER(TRIM(STUDENT_RESPONSE)),' ') !=0)
)Hi, Rajesh,
Rb2000rb65 wrote:
Hi Oracle Folks
I am using Oracle
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing optionsThanks for posting this (and the WITH clause for the sample data). That's very helpful.
I have some student responses and the valid values are +/-/O(alphabet)/P and spaces at the end of the sting only not in the middle.Are you combining the responses to several qeustions in one VARCHAR2 column? It might be better to have a separate row for each question.
As per my requirement the record number 2 3,4 should be listed from the query but I am getting only one (record 3). What exactly is your requirement? Are you trying to find the rows where student_response contains any of the forbidden characters, or where it contains a space anywhere but at the end of the string?
Can we use REG_EXPYes, but it's easy enough, and probably more efficient, to not use regular expressions in this case:
Here's one way:
SELECT record_number
, student_response
FROM x
WHERE TRANSLATE ( UPPER ( RTRIM (student_response, ' '))
, 'X+-OP'
, 'X'
) IS NOT NULL
;That is, once you remove trailing spaces and all occurrences of '+', '-', 'O' or 'P', then only the forbidden characters are left, and you want to select the row if there are any of those.
If you really, really want to use a regular expression:
SELECT record_number
, student_response
FROM x
WHERE REGEXP_LIKE ( RTRIM (student_response)
, '[^-+OP]' -- or '[^+OP-]', but not '[^+-OP]'. Discuss amongst yourselves
, 'i'
;but, I repeat, this will probably be slower than the first solution, using TRANSLATE.
Edited by: Frank Kulash on Oct 17, 2011 1:05 PM
Edited by: Frank Kulash on Oct 17, 2011 1:41 PM
The following is slightly simpler than TRANSLATE:
SELECT record_number
, student_response
FROM x
WHERE RTRIM ( UPPER ( RTRIM (student_response, ' '))
, '+-OP'
) IS NOT NULL
; -
Need help getting all white background for jewelry pics and resizing help for my website
Can someone please help me? I'm completely new to photoshop and I have elements 12 and I need to make the background all white for my jewelry photos. I have googled instructions but a lot of my jewelry has chain in it so it's hard to select, erase etc. I have no idea what I'm doing. I also need to resize my photos to 400x400 but when I do they distort. Someone told me I can collect the background color and then resize the canvas but again I'm a complete newbie and none of this makes any sense to me.
Thank youno worries.
you mentioned that you have tried a number of driver packs, to no avail.
can you confirm if you've tried this: http://support.lenovo.com/en_US/downloads/detail.page?DocID=DS012809
ThinkPad 2x2 11a/b/g/n Wireless LAN PCI Express Half Mini Card Adapter for Windows 7 (32-bit, 64-bit), Vista (32-bit, 64-bit) and XP
found in the X120e driver matrix, here: http://support.lenovo.com/en_US/research/hints-or-tips/detail.page?&DocID=HT072377
cheers.
English Community Deutsche Community Comunidad en Español Русскоязычное Сообщество
Community Resources: Participation Rules • Images in posts • Search (Advanced) • Private Messaging
PM requests for individual support are not answered. If a post solves your issue, please mark it so.
X1C3 Helix X220 X301 X200T T61p T60p Y3P • T520 T420 T510 T400 R400 T61 Y2P Y13
I am not a Lenovo employee. -
Really need help - Lost All iTunes Files! I don't want to lose everything!
I moved recently and when I replugged my computer, all my iTunes songs were lost. I still have the songs on my ipod mini and I'm not daring to plug it in. I really want to restore my files.
I figure that I need to do this as if I got a new computer and re-install it. However, I am told that ipods are a one way stream from computer to ipod only and not vice versa. I'm hoping someone can help me because I have bought songs that will be lost too. If I didn't have the purchased songs, I wouldn't mind re-importing all 86 CDs of mine (although it would be a pain).
Please help me ASAP. My CD collection is growing fast and I have a very long bus ride.
Thanks.
Windows XP
Windows XPPerhaps you may still have the music files on your PC -- but not seen in iTunes or the PC.
Do a thorough search of your PC using the tips below:
First - Make sure that you enable your Windows Explorer to view 'Hidden' files:
- Open Windows Explorer
- Select 'My Computer'
- On the main Windows Explorer menu: Tools=>Folder Options=>'View' tab
- In 'Advanced Setting' --> Files and Folders --> Hidden files and folders:
-- Select 'Show hidden files and folders’
- Click 'Apply to All Folders'
- Click 'OK'
Then check using Windows Explorer in 'My Music\iTunes\iTunes Music\...' for folders containing your music (or wherever you keep your music folders).
Also check in your Recycle Bin to see if you accidentally deleted it. If so, ‘Restore’ it back to it’s original spot.
Then try running a search using Windows Explorer (or similar) for files with the extensions of: m4a, m4p, MP3, OR with the partial names of the songs you are missing.
Do all the above before you decide that your music files have been completely erased from your hard drive.
If you can locate the music files/folders, we can get iTunes to recognize it. Try one of these:
If you have a backup iTunes database file available....
1. --- Close iTunes. If you have a backup (or previous version) of the ‘iTunes Library’itl’ database file, then place a copy of that file in the ‘...\My Music\iTunes’ folder (or wherever the current, incomplete file resides).
If no backup ITL file exists….
2a. --- In iTunes choose: Edit==>Preferences==>Advanced tab. Select 'Change' and browse to the music folder in your PC drive (if it isn’t already). Click OK to save that setting.
Then....
2b. --- In iTunes choose: File==>’Add Folder to Library’ & browse to the music folder in your PC drive. Click OK.
Without the ITL file, re-‘Adding’ the music files to the Library will lose you the Ratings, Play Counts, Date Added and Last Played attributes, as well as your Playlists. No real way to recover them if you haven’t made prior backups. Something to consider for the future....
If your music files are truly gone, and you have some or all of your music files on your iPod, these links will give you several methods of recovering whatever songs remain on your iPod; some free, some third-party software, some more comprehensive for restoring playlists, ratings, playcounts, etc. Read them and their associated links before deciding on a strategy that works for you. There are many various third-party software programs that will offer a more robust process, or an easier GUI. Do a Google search for them if the links below leave you wanting…
Don King Resurrected: Deleted files from hard drive (free user steps – music recovery only)
MacMuse: Computer Crashed (free user steps – music recovery only)
Copying music from iPod to computer (a primer on various methods and software)
Copying Songs from Your iPod to a Mac or PC (resource for 3rd party software)
iPodRip Software
PodUtil Software
XPlay (Software For Cross-Platform Functionality & Music Recovery)
XPlay Photo Browser (For recovering Photos)
After recovering your song files, strongly consider developing a thorough backup strategy for just this type of situation.
You need at least three sets of your music:
-- One full set on the PC within iTunes (on internal HD or ExHD)
-- One full set on an separate external backup medium (CD/DVD/ExHD/other)
-- One (full or partial) set on the iPod
Music files on just the iPod and the computer is not considered having any backup. If you cannot store your complete music files on the computer, then create and maintain two external sets.
Backup both the music files and the Library database file (iTunes Library.itl). What are the iTunes Library files?
Here is a post on developing a backup strategy: http://discussions.apple.com/click.jspa?searchID=394618&messageID=1263275 -
I Need Help of all experts , can anybody?
Dear,
I am Mohammad Nabi, have done my MBA in June 2006,After completion of the course i immediately joined the insurance co.presently iam working as Agency Manager for Bharti Axa Life Insurance......Before that i am very much interested in pursuing SAP SD ...when i about to join the course i have consulted some consultancies their they asked me experience....for that reason i joined insurance co. for experience....Now i would like to pursue SAP SD and i need full support of all SAP SD experts suggestions...I Know only what is SAP but i dont know even concept also...for that i need support of u all.....kindly you yourself give me suggestions and mould me as an expert....i will be very thankful for this kind of act.
Hope U all definetly suggest me in making an expert....i am interested...i will work hard...
Thanx & Regards
Mohammad Nabi
<REMOVED BY MODERATOR>Hi
Its really great that you have now decided to achieve something. Lot of people take lot of time to first decide which route to ride... Just being part of this forum will help you a lot. You can read through all the queries asked here and try to find answers. Firstly it will be very difficult, but slowly you will get hang of things.
According to me, to become expert in SAP, most important is your business process understanding should be good. SAP will behave the way we design.
Keep on work.
Regards
Sandeep
Maybe you are looking for
-
Weblogic Server 6.1 Service Pack 2
Hi ! Is there any major difference between wl6.1 sp1 and wl6.1 sp2 ? My applications which otherwise work fine on former, now are not even loading at the start of wl 6.1 sp2 . They give a error java.lang.String index out of range -1 Any ideas on what
-
Can you filter messages by yes / no on attachments
I am trying to build filters and I can filter by most anything except whether or not the message contains an attachment. I was hoping I could send emails that have pictures attached to a separate folder. I could probably do it by size, but by attachm
-
N7000 : details of packets dropped by COPP policy (class-default) ?
Hi, On one of our N7K, we have some packets dropped by the COPP policy in the class-default class-map. : Partial results of "show policy-map interface control-plane" not so long after clearing the counters : class-map class-default (match-any)
-
Exam 70-483 what is it good for?
what is it good for taking the exam? if you have a CS degree and c# experience, yet can you benefit from passing the exam?
-
What is happening on launchpad with icons of a Micrsoft type with red vertical lines