User_id should be one greater than the last
i want to insert a new row and make the user_id one greater than the last user_id. anyone any ideas
user8652681 wrote:
ive wrote the code and it updates the row i want once, is there anyway i can change this so it adds a message into REPORT for evey instance of where last_login is < '05-MAY-09'
insert into REPORT (message_id)
select max(message_id) + 1 from REPORT
where exists
select
null
from
users u
where
last_login < '05-MAY-09'
)For that sort of thing you'll want a sequence.
SQL> select max(empno) from emp;
MAX(EMPNO)
7934
SQL> create sequence empno_seq start with 7935 nocache;
Sequence created.
SQL> create table emp2 as select * from emp;
Table created.
SQL> insert into emp2
2 select empno_seq.nextval, ename, job, mgr, hiredate, sal*2, 0, deptno
3 from emp;
14 rows created.
SQL> select * from emp2;
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7369 SMITH CLERK 7902 17-DEC-80 800 20
7499 ALLEN SALESMAN 7698 20-FEB-81 1600 300 30
7521 WARD SALESMAN 7698 22-FEB-81 1250 500 30
7566 JONES MANAGER 7839 02-APR-81 2975 20
7654 MARTIN SALESMAN 7698 28-SEP-81 1250 1400 30
7698 BLAKE MANAGER 7839 01-MAY-81 2850 30
7782 CLARK MANAGER 7839 09-JUN-81 2450 10
7788 SCOTT ANALYST 7566 19-APR-87 3000 20
7839 KING PRESIDENT 17-NOV-81 5000 10
7844 TURNER SALESMAN 7698 08-SEP-81 1500 0 30
7876 ADAMS CLERK 7788 23-MAY-87 1100 20
7900 JAMES CLERK 7698 03-DEC-81 950 30
7902 FORD ANALYST 7566 03-DEC-81 3000 20
7934 MILLER CLERK 7782 23-JAN-82 1300 10
7935 SMITH CLERK 7902 17-DEC-80 1600 0 20
7936 ALLEN SALESMAN 7698 20-FEB-81 3200 0 30
7937 WARD SALESMAN 7698 22-FEB-81 2500 0 30
7938 JONES MANAGER 7839 02-APR-81 5950 0 20
7939 MARTIN SALESMAN 7698 28-SEP-81 2500 0 30
7940 BLAKE MANAGER 7839 01-MAY-81 5700 0 30
7941 CLARK MANAGER 7839 09-JUN-81 4900 0 10
7942 SCOTT ANALYST 7566 19-APR-87 6000 0 20
7943 KING PRESIDENT 17-NOV-81 10000 0 10
7944 TURNER SALESMAN 7698 08-SEP-81 3000 0 30
7945 ADAMS CLERK 7788 23-MAY-87 2200 0 20
7946 JAMES CLERK 7698 03-DEC-81 1900 0 30
7947 FORD ANALYST 7566 03-DEC-81 6000 0 20
7948 MILLER CLERK 7782 23-JAN-82 2600 0 10
28 rows selected.
SQL>
Similar Messages
-
PO is getting released even if the total amount is less than the last PO am
Purchase Order is getting released even if the total amount is less than the last PO amount. The release strategy is only working for the first Purchase Order and if the PO amount is greater than the last PO amount.
Please let me know how to correct this scenario (release strategy).
Regards,
PrishuHi,
Release strategy has nothing do with the previous PO amount. May be, Co-incidently the amount in previous PO which you are referring and the characteristics value maintained in the release strategy is same.
1) Please go in release strategy by the path mentioned below
IMG u2013 Material Management u2013 Purchasing u2013 Purchase Requisition u2013 Release Procedure u2013 Procedure with Classification u2013 Set Up Procedure with Classification
2) Then go to release strategy. Here the total available release strategies would be displayed. Double click the strategy which is getting reflected in the PO you want and go the classifiction tab. There you will get the PO value. Based on this characteristic value the respective release streategy gets refelected.
I hope this clarifies.
Regards
sachin -
Goods receipt date should be greater than the P.O. date
Hi
Is there any option to control the Goods receipt date should not be lesser than the P.O.Date??
Eg: P.O. is raised in 10.1.9, User should not do the GRN before 10.1.9. In which way we can control this???
Regards
RaviDear,
You have to include User exit in MIGOwhich will trhrow an error at the time when Goods receipt date is greater than the P.O. date.
Regards
Utsav -
"Reversal value greater than the value invoiced to date" error
Hi all,
I have a scenario. there is a invoice which we tried to reverse through MR8M. But it was not successful. Now , as a alternative solution I am trying to book credit memo. There were two line items in the PO. When I try to book Credit memo, the system throws error "Reversal value greater than the value invoiced to date" only for line item 2. Line item 1 is perfectly OK. Any suggestions why this is happening ? If it would have been exchange rate problem then I think the error should be for both the line items.
Regards,
VivekHi,
You told that youtr PO is having two line utems and you are trying to post the credit memeo for the two line items.
Does your po is invoiced for the two line items ?
if the second line item is not posted with any invoice , while posting credit memo to second line item system will give this error.This is one scenario.
May be you would have wrongly entered the values ?
There could have been already reversed or posted the credit memo for then second line item .
check whather you are posting any subsequent posting ?
Regards, -
Java always returns 15 minutes greater than the current time.
Hi,
I am using Microsoft Windows Server 2003R2,Standard X64 edition with Service Pack 2 and jdk1.6.0-03.
Java always returns time 15 minutes greater than the current system time.
eg:
SimpleDateFormat simpleDateFormat=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
System.out.println("Now time: "+simpleDateFormat.format(new Date()));
System.out.println("Now time: "+new Date());The output of the program is :
Now time: 2008-12-22 18:47:04
Now time: Mon Dec 22 18:47:04 NPT 2008
When my actual system time is 6:32 PM or (18:32)
I have checked the current time with other programming languages like python and it always returns the actual date and time.
Note: To my observation java is always utilizing a time which is 15 minutes greater than the current time even for its log.
Thanks,
Rajeswari (Msys)I think a more practical time machine would be one that actually travels back in time rather than forward (by 15 minutes). Sounds like it needs some more work.
Anyway, I suggest changing the system time on your computer to some other value (say, 2 hours ahead), then running the program again. If its off by 2 hours and 15 minutes, its getting the time from your computer. However, if its still off by only 15 minutes (from your wristwatch's time), then its getting the time form somehere other than the computer clock. -
Can the maximum number of Logical Processors allowed in a Processor Group be increased by Bcdedit command or registry key to a number greater than the default (64) to allow non-group-aware applications to seamlessly scale via multithreading across more cores
MSDN documents methods to reduce the max number of LP's in a Processor Group to 1 or any power of 2 less than 64 in order to increase the number of Processor Groups. But there is no discussion of how to increase the maximum number of Logical Processors
allowed in a Processor Group to a number greater than the default (64), e.g. to 128 or 256.
Since a non-group-aware application/process can only run on 1 Processor Group, increasing this limit is needed to allow non-group-aware multithreaded applications to scale seamlessly for parallel computation across more than 64 cores simultaneously on systems
with more than 64 cores (for example, a quad-socket Intel Xeon system with 24 cores per socket, including true and hyper cores). If that limit can be set via registry key or command line, or if there is another way to force all the cores on
all 4 sockets (4 NUMA nodes in this case) to join in 1 Processor Group, then non-group-aware applications will not need to be rewritten using group-aware thread-affinity APIs.Hi John,
Are you trying to specify a static NUMA-node-to-group assignment, rather than letting Windows dynamically assign NUMA nodes to groups at boot time? If yes, You can refer the
following related KB:
How to manually configure K-Group assignment on multiprocessor machines
http://support.microsoft.com/kb/2506384
Systems with fewer than 64 logical processors always have a single group, Group 0. On systems with 64 or fewer processors, existing applications will operate correctly without
modification. Applications that do not call any functions that use processor affinity masks or processor numbers will operate correctly on all systems, regardless of the number of processors. To operate correctly on systems with more than 64 logical processors,
the following kinds of applications might require modification:
•Applications that manage, maintain, or display per-processor information for the entire system must be modified to support more than 64 logical processors. An example of
such an application is Windows Task Manager, which displays the workload of each processor in the system.
•Applications for which performance is critical and that can scale efficiently beyond 64 logical processors must be modified to run on such systems. For example, database
applications might benefit from modifications.
•If an application uses a DLL that has per-processor data structures, and the DLL has not been modified to support more than 64 logical processors, all threads in the application
that call functions exported by the DLL must be assigned to the same group.
By design, a non-NUMA computer is considered to have one NUMA node. Because NUMA nodes cannot span groups, the system creates a node for each group after you restart the computer.
The related KB:
Processor Groups
http://msdn.microsoft.com/en-us/library/windows/desktop/dd405503(v=vs.85).aspx
More information:
Uneven Windows Processor Groups
http://blogs.msdn.com/b/saponsqlserver/archive/2011/10/08/uneven-windows-processor-groups.aspx
Boot Parameters to Test Drivers for Multiple Processor Group Support
http://msdn.microsoft.com/en-us/library/windows/hardware/ff542298(v=vs.85).aspx
I’m glad to be of help to you!
We
are trying to better understand customer views on social support experience, so your participation in this
interview project would be greatly appreciated if you have time.
Thanks for helping make community forums a great place. -
Oracle 11G/ MV log is newer than the last full refresh
MV log is newer than the last full refresh / MV-Log ist neuer als letzter vollständiger Refresh
Oracle 11G
We access from two data banks about MATERIALIZED VIEWs a big master table.
The second data bank is new created. A Complete-Refresh lasts > one hour.
Then never takes place fast-refresh because the MV log on the master db
does not reproach with the data long enough. What can we do? Can one
increase the hold duration of the data in the MV LOG?
Thanks!
Edited by: 952865 on 15.08.2012 02:27
Edited by: 952865 on 15.08.2012 02:28What do you get with the following query on the side of your master table?
with
sg as
(select segment_name,owner, bytes
from sys.dba_segments
where segment_name like 'MLOG$%'),
tb as
(select owner, object_name, object_type, created, last_ddl_time
from sys.dba_objects where object_type = 'TABLE')
select
bm.owner bm_owner,
ml.log_owner ml_owner,
bm.master bm_table,
ml.master ml_table,
ml.log_table log_table,
sg.bytes log_size,
tb.created log_created,
tb.last_ddl_time log_modified,
bm.mview_id bm_id,
rm.mview_id rm_id,
rm.owner s_owner,
rm.name s_table,
rm.mview_site s_site,
rm.can_use_log,
rm.version,
ml.rowids ml_rwid,
ml.primary_key ml_pk,
rm.refresh_method rm_meth,
ml.sequence ml_seq,
ml.include_new_values ml_new,
bm.mview_last_refresh_time
from sys.dba_registered_mviews rm
full outer join sys.dba_base_table_mviews bm
on bm.mview_id = rm.mview_id
full outer join sys.dba_mview_logs ml
on bm.master = ml.master and bm.owner = ml.log_owner
full outer join sg
on ml.log_table = sg.segment_name and ml.log_owner = sg.owner
left outer join tb
on tb.owner = sg.owner and tb.object_name = sg.segment_name
where
bm.master is null
or bm.master = :mastertable
or ml.master is null
or ml.master = :mastertable
order by 1,2;For :mastertable you have to insert the name of the table, where you created the MV LOG on. -
COMPAQ presarioc700 my lap showing that MBR nomber is greater than the BIOS nomber
when am trying to start my laptop it saying that some MBR no is greater than the BIOS nomber and after that its taking time and up to click enter and sometimes its giving sound like a crack, and when am trying to update my bios in that its not showing my OS presently am using WINDOWS7,is there require to update bios or what should i do please help thank u
Hi SURESH13,
Welcome to the HP Forums! I see that you are having some problems with your Master Boot Record. I have included a link to a third-party site that will show you how to fix the MBR corruption.
Thank you,
Please click “Accept as Solution ” if you feel my post solved your issue.
Click the “Kudos Thumbs Up" on the right to say “Thanks” for helping!
Thank you,
BHK6
I work on behalf of HP -
Error Message FF747 -The tax amount must not be greater than the tax base
Hello,
We are attempting to post an import vendor invoice through transaction FB60 for Israel company code . Since the tax charged by the vendor is not fixed every time , we are entering the tax amount in the FB60 screen manually , without selecting 'calculate tax'.The amount of tax is greater than the amount of expense as per the real business scenario. For example amount of expense is 100, amount of tax is 200 and the total amount charged by the vendor is 300 .However when we simulate the posting we get an error - The tax amount must not be greater than the tax base-Message no. FF747
We tried putting a very high percentage in the tax code also but it didn't help
We would like to go ahead with this posting. Could you pl throw light on the same . ? Is there any way (OSS note ) or a work around which can resolve the issue ?
Best Regards
Amit KulkarniHello
This may be a work around in other cases , but since we want the amount to be updated in the BSET table for further VAT reports , we would like this to be posted along with the expense item -
The tax amount must not be greater than the tax base
Hi Experts,
User is trying to "Relase to Account" in t-code VF01 he is getting an error message The tax amount must not be greater than the tax base.
During Debuging i found the error is raised in Function module RV_ACCOUNTING_DOCUMENT_CREATE
Message raised is
Message Class : FF
Message number: 747
Mesage "The tax amount must not be greater than the tax base"
Request to through some lights on this issue.
Reagrds
SreeHi,
did you check SAPNET notes with "VF01" and the message class/number as search terms. There are some notes dealing with this case eg 872449, and 184985.
Best regards, Christian -
SAP Table index size is greater than the size of the actual table
Hello Experts,
We are resolving an issue related to database performance. The present database size is 9 Terabytes. The analysis of response times through ST03N shows that the db time is 50% of the total response time. We are planning to reorganize the most updated tables (found from DB02old tx).
Here we see that the size of the index for a table is greater than the actual size of the table. Is this possible, if yes then how can we reorganize the index as it does not allow us to reorganize the index using brspace command.
Hope to hear from you soon, and if any additional activities you can suggest to improve the performance of the database will be appreciated.
Thank youHi Zaheer,
online redef may help you (for a little while) , but also check WHY the index became fragmented.
Improper settings can bring the index fragmented again and you have reoccuring reorg needs.
i.e.
check if PCT_INCREASE >0 if you are using Dictionary Managed Tablespaces or locally managed tablespaces that uses a "User" allocation policy. Set it to 0 to generate uniform next extents in the online reorg.
select
SEGMENT_NAME,
SEGMENT_TYPE,
round((NEXT_EXTENT*BLOCKS)/(EXTENTS*BYTES))*(BYTES/BLOCKS),
PCT_INCREASE
from
DBA_SEGMENTS
where
OWNER='SAPR3'
and
SEGMENT_TYPE in ('INDEX',
'TABLE')
and
PCT_INCREASE > 0
and segment_name in ('Yourtable','Yourindex')
In the following cases, it may be worthwhile to rebuild the index:
--> the percentage of the space used is bad - lower than 66%: PCT_USED
--> deleted leaf blocks represent more than 20% of total leaf blocks: DEL_LF_ROWS
--> the height of the tree is bigger than 3: HEIGHT or BLEVEL
select
name,
'----------------------------------------------------------' headsep,
'height '||to_char(height, '999,999,990') height,
'blocks '||to_char(blocks, '999,999,990') blocks,
'del_lf_rows '||to_char(del_lf_rows,'999,999,990') del_lf_rows,
'del_lf_rows_len '||to_char(del_lf_rows_len,'999,999,990') del_lf_rows_len,
'distinct_keys '||to_char(distinct_keys,'999,999,990') distinct_keys,
'most_repeated_key '||to_char(most_repeated_key,'999,999,990') most_repeated_key,
'btree_space '||to_char(btree_space,'999,999,990') btree_space,
'used_space '||to_char(used_space,'999,999,990') used_space,
'pct_used '||to_char(pct_used,'990') pct_used,
'rows_per_key '||to_char(rows_per_key,'999,999,990') rows_per_key,
'blks_gets_per_access '||to_char(blks_gets_per_access,'999,999,990') blks_gets_per_access,
'lf_rows '||to_char(lf_rows, '999,999,990')||' '||+
'br_rows '||to_char(br_rows, '999,999,990') br_rows,
'lf_blks '||to_char(lf_blks, '999,999,990')||' '||+
'br_blks '||to_char(br_blks, '999,999,990') br_blks,
'lf_rows_len '||to_char(lf_rows_len,'999,999,990')||' '||+
'br_rows_len '||to_char(br_rows_len,'999,999,990') br_rows_len,
'lf_blk_len '||to_char(lf_blk_len, '999,999,990')||' '||+
'br_blk_len '||to_char(br_blk_len, '999,999,990') br_blk_len
from
index_stats where index_name = 'yourindex'
bye
yk -
Currency IDR becomes greater than the maximum price
Dear All
We have error message (no 06217), when create PO, like bellow :
=================
Net price in IDR becomes too large
Message no. 06217
Diagnosis
The calculated net price in currency IDR becomes greater than the maximum price ("99999999999") defined in the system.
Procedure
Make sure your entries are correct.
Check the following:
The exchange rate, if the currency differs from the local currency;
The conversion order unit --> order price unit.
==================
Would you like help me please
thanks
imronHello,
The PO value in IDR currency is larger than the maximum length the SAP field and hence the error message. Either your order currency or your company code currency must be IDR in the PO and the total order value is exceeding the technical field length limitation in SAP.
The best way ahead would be to break down the PO line into different purchase orders.
Regards
Greg -
HT6058 Will this new update slow down my iphone 4 even more than the last update?
Will this new update slow down my iphone 4 even more than the last update?
Thats a hard question to answer. The iPhone 4 has older technology than newer models which can cause the device to lag. Depending on what data and settings you have on the device, it could run slower. I would probably make sure to constantly close apps in multitasking and possible think about restoring the device as a new device. Make sure to backup your data prior to the restore
-
Syncing photos from more than the last 20 iPhoto events?
How can I sync more than the last 20 iPhoto events with my iPhone?
When I select folders instead of events I can get more photos (ex: last 12 months) to my iPhone but at the same time I no longer have access to the "events" view which I use to organize my photos.
Is there a solution to sync/copy more than 20 events to my iPhone?For whatever the reason, syncing iPhoto Events is limited.
I make use of iPhoto albums in addition to Events - primarily for transferring photos to my iPhone. -
FF747 Tax amount must not be greater than the tax base
We have sample orders where the order amount is calculated and then discounted fully. However, our freight goes to our tax software separately due to different taxability rules. Therefore, the original tax amount (pre-discount) is sent and we end up with FF 747: The tax amount must not be greater than the tax base.
The business wants to track this freight amount. How do we change the message from error to warning or does anyone have a work around so we can invoice these customers?
Thanks,
MichelleHello ,
I am facing the same issue. Could you please let me know how you resolved it ?
Thanks.
Maybe you are looking for
-
Using CardLayout and Null Layout
I used search on the forums and found one person that asked the exact question I'm needing answered. But, he didn't get any responses either. I have a JFrame(myJFrame) which has a JPanel(myJpanel). myJpanel uses a CardLayout. I then have another clas
-
What should I do if I want to display on the front panel in real time the values from Polarizer #, P1, P2 and the last calculated value (P2/P1 * 100) called T% in a table or some graphical representation like that? What would I have to do? It could
-
hi people out there...! I have an iPod Touch 4G purchased on november 2010, and since then until two days ago, I had iOs 4.3.x and everything went very good about battery charge...I used to have my iPod on standby mode for several days, and never had
-
How to save a JPG in 256 colors?
I'm using Photoshop CS2. 1. How to save a JPG in 256 colors? 2. Is there a way to see an image properties? -- I want to know if that image is in 256 color or not...
-
ABAP code to automatic generate an BW Report
HI Sap BW gurus, Can anyone tell me if exists an abap code to automatic generate an report from a query and save it on an directory in HTML format? Thanks in advanced, Pedro Martins