INSERT Not working
I'm a total CF nub ... Do I need to format this text? Conver
it somehow or wrap it in more tags?
Or even better, use <cfqueryParam...> tags. They will
handle the
quotes, protect you from SQL injection attacks and possible
even improve
the performance of the query, especially queries that are in
a loop like
this.
<CFLOOP INDEX="rsm" LIST="#Form.whichRSM#">
<cfquery name="qAddLeadRSM" datasource="nextgen">
INSERT INTO dbo.SMS_R_USER_LEADS
(Lead_ID, RSM_Username)
VALUES (
<cfqueryparam value="#newLeadID#"
cfsqltype="cf_sql_integer">,
<cfqueryparam value="#rsm#"
cfsqltype="cf_sql_varchar">)
</cfquery>
</CFLOOP>
I made assumptions about the data type of your values. If I
missed,
just change the cfsqltype parameters to what matches your
database design.
Similar Messages
-
pcs:insert not working correctly in Content Server 6.0
Hello,
I'm having a difficult time getting the <pcs:insert> tag working in Content Server 6.0. In the previous version of Content Server, I used <pcs:insert expr="mycontentitem"></pcs:insert> and the content item that I want inserted shows up fine. Now when I try it in Content Server 6.0, the inserted (child) content item tries to reference the parent's content item variables, giving me nothing. Also, I have tried using <pcs:insert path="mycontentitem"> to the same result.
Any help, or example of a working <pcs:insert> for Content Server 6.0 would be a lifesaver!
Thank you,
PKWe have the same problem with "INSERT" tags not working in the newest version CS6.0. I am a bit surprised that anyone had replied to your post to give us some explanations or directions how to solve the problem. It looks as a serious problem to me.
-
French characters insertion not working fine
Hi all,
I'm using Oracle database 10.2.0.3, i migrate the database from 9i.
My problem is in my new database version i mean 10g when i'm inserting french characters like "éèà" in my database it's not working fine, i check to my old database (9i) it's working and i compare the parameters (NLS parameters they are same). i cannot find where is the problem making this appear, if anybody can help me.
here bellow that i did.
SQL> insert into dept values(0,'échec','éèàù');
1 ligne crÚÚe.
SQL> commit;
And from query i got:
SQL> select * from dept where deptno=0;
DEPTNO DNAME LOC
0 ┐chec ┐┐┐┐
here are some parameters i check:
SQL> sho parameter nls;
NAME TYPE VALUE
nls_calendar string
nls_comp string
nls_currency string
nls_date_format string
nls_date_language string
nls_dual_currency string
nls_iso_currency string
nls_language string AMERICAN
nls_length_semantics string BYTE
nls_nchar_conv_excp string FALSE
nls_numeric_characters string
NAME TYPE VALUE
nls_sort string
nls_territory string AMERICA
nls_time_format string
nls_timestamp_format string
nls_timestamp_tz_format string
nls_time_tz_format string
I need your help because it's very important for our database.
regards
raitsarevoI goth nothong, i think it's not yet set here bellow the result:
oracle@ab-db1:/abdb_data2/expdp$ env|grep NLS
oracle@ab-db1:/abdb_data2/expdp$
to my old server (9i) here the result:
[oracle@abillity3db oracle]$ env|grep NLS
ORA_NLS33=/home/oracle/product/9.2.0.4/ocommon/nls/admin/data
[oracle@abillity3db oracle]$
When i run the command env only i got for the new server HPux 10g:
oracle@ab-db1:/abdb_data2/expdp$ env
SFTP_PERMIT_CHOWN=1
MANPATH=/usr/share/man/%L:/usr/share/man:/usr/contrib/man/%L:/usr/contrib/man:/usr/local/man/%L:/usr/local/man:/opt/ldapux/share/man:/opt/ldapux/ypldapd/man:/opt/ipf/man:/usr/dt/share/man:/opt/samba/man:/opt/samba/WTEC_Support_Tools/man:/opt/resmon/share/man/%L:/opt/resmon/share/man:/opt/openssl/man:/opt/openssl/prngd/man:/opt/wbem/share/man:/opt/VRTS/man:/opt/graphics/common/man:/opt/sfmdb/pgsql/man:/opt/sec_mgmt/share/man:/opt/dsau/man:/opt/gnome/man:/opt/perl/man:/opt/sec_mgmt/share/man/%L:/opt/ssh/share/man:/opt/gwlm/man/%L:/opt/gwlm/man:/opt/ignite/share/man/%L:/opt/ignite/share/man:/opt/aCC/share/man/%L:/opt/aCC/share/man:/opt/audio/share/man:/opt/ansic/share/man/%L:/opt/ansic/share/man:/opt/langtools/share/man/%L:/opt/langtools/share/man:/opt/cadvise/share/man/%L:/opt/cadvise/share/man:/opt/image/share/man:/opt/imake/man
ORA_CRS_HOME=/home/oracle/crs
TERM=xterm
SHELL=/sbin/sh
ERASE=^H
SFTP_LOG_LEVEL=3
SSH_CLIENT=192.168.0.45 1525 22
SSH_TTY=/dev/pts/0
SFTP_LOG_FACILITY=2
USER=oracle
LD_LIBRARY_PATH=/home/oracle/oracle/product/10.2.0/db_1/lib
ORACLE_SID=abdb1
COLUMNS=157
MAIL=/var/mail/oracle
PATH=/home/oracle/oracle/product/10.2.0/db_1/bin:/home/oracle/crs/bin:/usr/bin:/opt/ansic/bin:/usr/ccs/bin:/usr/contrib/bin:/usr/contrib/Q4/bin:/opt/ipf/bin:/opt/hparray/bin:/opt/nettladm/bin:/opt/fcms/bin:/usr/bin/X11:/opt/resmon/bin:/usr/contrib/kwdb/bin:/opt/wbem/bin:/opt/wbem/sbin:/opt/graphics/common/bin:/usr/sbin/diag/contrib:/opt/sfm/bin:/opt/upgrade/bin:/opt/sec_mgmt/bastille/bin:/opt/dsau/bin:/opt/dsau/sbin:/opt/gnome/bin:/opt/mozilla:/opt/perl/bin:/opt/sec_mgmt/spc/bin:/opt/ssh/bin:/opt/hpsmh/bin:/opt/gwlm/bin:/usr/contrib/bin/X11:/opt/ignite/bin:/opt/aCC/bin:/opt/cadvise/bin:/opt/langtools/bin:/opt/imake/bin:.
LOG_SFTP=0
PWD=/abdb_data2/expdp
EDITOR=vi
TZ=EAT-3
PS1=oracle@ab-db1:$PWD$
LINES=60
SHLVL=1
SFTP_PERMIT_CHMOD=1
HOME=/home/oracle
LOGNAME=oracle
SSH_CONNECTION=192.168.0.45 1525 192.168.0.233 22
SFTP_UMASK=
ORACLE_HOME=/home/oracle/oracle/product/10.2.0/db_1
_=/usr/bin/env
OLDPWD=/abdb_data2
And for the old server RHL (9i):
[oracle@abillity3db oracle]$ env
PWD=/home/oracle
ORACLE_SID=abillity
HOSTNAME=abillity3db
LD_LIBRARY_PATH=/home/oracle/product/9.2.0.4/lib:
PVM_RSH=/usr/bin/rsh
LESSOPEN=|/usr/bin/lesspipe.sh %s
XPVM_ROOT=/usr/share/pvm3/xpvm
USER=oracle
LS_COLORS=no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=01;32:*.cmd=01;32:*.exe=01;32:*.com=01;32:*.btm=01;32:*.bat=01;32:*.sh=01;32:*.csh=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tz=01;31:*.rpm=01;31:*.cpio=01;31:*.jpg=01;35:*.gif=01;35:*.bmp=01;35:*.xbm=01;35:*.xpm=01;35:*.png=01;35:*.tif=01;35:
MACHTYPE=i386-redhat-linux-gnu
MAIL=/var/spool/mail/oracle
INPUTRC=/etc/inputrc
EDITOR=vi
LANG=en_US
ORACLE_BASE=/home/oracle
ORACLE_HOME=/home/oracle/product/9.2.0.4
LOGNAME=oracle
SHLVL=1
ORA_NLS33=/home/oracle/product/9.2.0.4/ocommon/nls/admin/data
SHELL=/bin/bash
HOSTTYPE=i386
OSTYPE=linux-gnu
HISTSIZE=1000
LAMHELPFILE=/etc/lam/lam-helpfile
PVM_ROOT=/usr/share/pvm3
HOME=/home/oracle
TERM=xterm
SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
PATH=/home/oracle/product/9.2.0.4/bin:/opt/IBMJava2-131/bin:/opt/IBMJava2-131/jre/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/oracle/bin
SSH_TTY=/dev/pts/1
_=/usr/bin/env
I saw that in my old server environment variable LANG=en_US is set but in the new not.
What's your advice.
Thanks Nicolas
raitsarevo -
How to load data to a "clustered table" quickly? direct insert not work
We have a single hash clustered table whose size is 45G, and we used the command:
insert /*+ append */ into t_hashed as select * from source.
the source is about 30G, it takes a very long time(several days, and not yet completed).
I dumped the redo log, and find there are lots of redo info about the insert. I have thought it should create much redo as it is "direct path insert", but from the dump info I could say the direct path insert didn't take effect.Your assessment is correct. INSERT /*+ APPEND */ does not work with a hash clustered table.
If you think about how hash clusters work, and how direct load insert works, it should be clear to you why a direct load insert via the append hint can never work.
How hash clusters work (well, only the part that's relevant to the current discussion):
Initially, at creation time, the storage for the entire cluster is preallocated, based on the various cluster parameters you chose. Think about that. All the storage is allocated to the cluster.
How direct load works (well, only the part that's relevant to the current discussion):
Space already allocated to and used by the segment is ignored. Space is taken from free, unformatted blocks from above the high water mark.
So, hopefully it's clear how these features are incompatible.
Bottom line:
It doesn't work, there's no way around it, there's nothing you can do about it....
-Mark -
U430 function Insert not working
I have a u430 with Windows 8.1. Fn Insert is not toggling between insert and type over mode. The other Fn Top keys are working.
Any ideas why Fn Insert is not working?
Thankshi broadmoor,
Welcome to Lenovo Community Forums!
If the laptop's touchscreen is not working in Windows right now, Try Booting into the REcovery Environment.
While the computer is Off press the One key Recovery Button and choose Recovery.
While on recovery check if your touchscreen is working in that mode.
Let me know your findings
Solid Cruver....
Did someone help you today? Press the star on the left to thank them with a Kudo!
If you find a post helpful and it answers your question, please mark it as an "Accepted Solution"! This will help the rest of the Community with similar issues identify the verified solution and benefit from it.
Follow @LenovoForums on Twitter! -
AFTER INSERT OR UPDATE TRIGGER the insert not working
The update works but the insert is not working. I have two version that I have tried. I amd executing the inserts/update from Oracle Applications and the table row is either being inserted or updated correctly.
DROP TRIGGER APPS.CCC_HZ_ORG_CONTACTS_ARU;
CREATE OR REPLACE TRIGGER APPS.CCC_HZ_ORG_CONTACTS_ARU
/* --Created By: SKELLEHER
--Creation Date: 07/15/09
--Last Updated By:
--Last Update Date:
AFTER INSERT OR UPDATE OF department, job_title
ON apps.hz_org_contacts
FOR EACH ROW
WHEN (
NEW.department <> OLD.department OR
NEW.job_title <> OLD.job_title
DECLARE
v_ChangeType VARCHAR2(10);
BEGIN
/* Use 'I' for Insert, 'U'' for Update, and'D' for delete(not part of app at this time). */
IF INSERTING THEN
v_ChangeType := 'INSERT';
ELSIF UPDATING THEN
v_ChangeType := 'UPDATE';
ELSE
v_ChangeType := 'DELETE';
END IF;
INSERT INTO cust.ccc_tca_po_tf_event_tbl
VALUES (ccc_tca_po_tf_event_tbl_s.NEXTVAL
, 'hz_org_contacts'
, v_ChangeType
, 'org_contact_id'
, :NEW.org_contact_id
, 'PENDING'
, NULL
, 0
, 'N'
, 'Y'
, :NEW.LAST_UPDATED_BY
, :NEW.LAST_UPDATE_DATE
, -1
, SYSDATE
, 'DEPARTMENT_JOBTITLE_UPDATE'
,'LDAP'
END;
AND I TRIED ANOTHER VERSION:I have simplified it so it's just checking for insert but it's not picking up. Is the syntax IF INSERTING correct?
CREATE OR REPLACE TRIGGER APPS.CCC_HZ_ORG_CONTACTS_ARU
AFTER INSERT OR UPDATE
ON ar.hz_org_contacts
FOR EACH ROW
DECLARE
BEGIN
IF INSERTING THEN
INSERT INTO cust.ccc_tca_po_tf_event_tbl
VALUES (ccc_tca_po_tf_event_tbl_s.NEXTVAL
, 'hz_org_contacts'
, 'UPDATE'
, 'org_contact_id'
, :NEW.org_contact_id
, 'PENDING'
, NULL
, 0
, 'N'
, 'Y'
, :NEW.LAST_UPDATED_BY
, :NEW.LAST_UPDATE_DATE
, -1
, SYSDATE
, 'DEPARTMENT_JOBTITLE_UPDATE'
,'LDAP'
END IF;
END;
/ -
Insert not working in updatable report
I have created an updatable report using the htmldb_item function with the facility to display an extra row (in order to create a new row).
I have then created a Create button that branches to the same page as the updatable reportn and a Branch.
I then created an after submit process that makes the insert of the data.
But apparently the process is not fired when I click the create button.
How do I have to do to fire a Submit on the page in order for my process to be run?
Thanks.Just to amplify MtD's explanation, if you start to move a SINGLE clip and THEN hold down the Option key, the arrow will change form so that it has a 90 degree bend in it. Then when you release the clip in a new position by letting go of the mouse button, not only will it "insert" into the timeline at that position, but the gap in the timeline (where you pulled it from) will close.
It's really helpful when you are rearranging sound bites and don't want to have to manually close up the holes in the timeline. Unfortunately this only works when you are grabbing a single clip. If you do it with multiple clips it will still insert, but will leave an open hole in the timeline where you pulled the group from. Having Snapping (N) turned on is very helpful for this operation, by the way. -
Hello SdNers,
I was trying to insert records into table CSKA Cost Elements (Data Dependent on Chart of Accounts).
I have an excel file with 45 records.
I am able to upload to records from the file and display it on the list processing screens.
It is not getting inserted to DB table...CSKA.
data : begin of t_ks06 occurs 0,
KOKRS type KOKRS, " Controlling area
KSTAR type KSTAR, " Cost element
DATAB type DATAB, " Valid from date
DATBI type DATBI, " Valid to date
KTEXT type KTEXT, " Name
LTEXT type LTEXT, " Description
KATYP type KATYP, " Cost element cat
KOSTL type KOSTL, " Cost center
end of t_ks06.
data : wa like line of t_ks06.
data : it_excel type alsmex_tabline occurs 0 with header line.
selection-screen begin of block b1 with frame title text-001.
parameter: f_name type rlgrap-filename default 'C:\Documents and Settings\Administrator\Desktop\Project_data\Cost_element_KS06.xls'.
parameter : p_begcol type i default 1 no-display,
p_begrow type i default 2 no-display,
p_endcol type i default 8 no-display,
p_endrow type i default 46 no-display.
selection-screen end of block b1.
at selection-screen on value-request for f_name.
perform f_get_file using f_name.
start-of-selection.
perform f_xls_itab using f_name changing it_excel.
perform f_move_data.
perform f_insert_db.
perform f_display_data.
form f_get_file using p_file_nam.
call function 'KD_GET_FILENAME_ON_F4'
exporting
program_name = syst-repid
dynpro_number = syst-dynnr
* FIELD_NAME = ' '
* STATIC = ' '
* MASK = ' '
changing
file_name = f_name
exceptions
mask_too_long = 1
others = 2.
endform. " f_get_file
form f_xls_itab using p_file_nam changing p_it_excel.
call function 'ALSM_EXCEL_TO_INTERNAL_TABLE'
exporting
filename = f_name
i_begin_col = p_begcol
i_begin_row = p_begrow
i_end_col = p_endcol
i_end_row = p_endrow
tables
intern = it_excel
exceptions
inconsistent_parameters = 1
upload_ole = 2
others = 3.
endform. " f_xls_itab
form f_move_data.
data : lv_index type i.
field-symbols <fs>.
* Sorting the internal table
sort it_excel by row col.
clear it_excel.
loop at it_excel.
move it_excel-col to lv_index.
* Assigning each record to the internal table row.
assign component lv_index of structure wa to <fs>.
* Assigning the field value to a field symbol
move it_excel-value to <fs>.
at end of row.
append wa to t_ks06.
* flg_mv = 1.
clear wa.
endat.
endloop.
endform. " f_move_data
form f_display_data.
write:/1 sy-uline(140).
write:/1 sy-vline, 'Cont area', " Controlling area
16 sy-vline, 'Cost ele', " Cost element
31 sy-vline, 'Valid from', " Valid from date
46 sy-vline, 'Valid to ' , " Valid to date
61 sy-vline, 'Name', "Cost element cat
76 sy-vline, 'Description', " Cost center
101 sy-vline, 'Cost ele cat', " Cost element cat
126 sy-vline, 'Cost center', " Cost center
140 sy-vline.
write:/1 sy-uline(140).
skip 1.
clear wa.
loop at t_ks06 into wa.
write:/2 sy-uline(139).
write:/2 sy-vline, wa-KOKRS, " Controlling area
16 sy-vline, wa-KSTAR, " Cost element
31 sy-vline, wa-DATAB, " Valid from date
46 sy-vline, wa-DATBI, " Valid to date
61 sy-vline, wa-KTEXT, " Name
76 sy-vline, wa-LTEXT, " Description
101 sy-vline, wa-KATYP, " Cost element cat
120 sy-vline, wa-KOSTL, " Cost center
140 sy-vline.
endloop.
endform. " f_display_data
form f_insert_db .
if t_ks06[] is initial.
write:/ 'No records fetched from file' color 3.
else.
clear wa.
loop at t_ks06 into wa.
insert into CSKA values wa.
endloop.
* if sy-dbcnt ge 1.
* perform f_display_data.
* endif.
endif.
endform. " f_insert_db
Help highly appreciated and would be rewarded.
Regards,
Ranjith NHello Ranjinth,
To insert the record into data base table. you need to create a work area type of data base table.
because for insert purpose we need the all the field in header or in work area for inserting the new record into data base table. it doesn't mean that you need to use old the field that is avaible in data base table.
you can use only those field that you need in your program with primary key.Because primary key is mandatory to enter for inserting new record.
you can try this..
wa_wrk1 type CSKA.
to insert record.
INSERT CSKA FROM wa_work1.
hope it will help you.
Thanks.
Arun Kayal. -
Case statement insert not working
This cursor is retrieving data for each pidm
SPRIDEN_PIDM ACTIVITY1 ACTIVITY2 ACTIVITY3 ACTIVITY4 ACTIVITY5 ACTIVITY6
2287953 RA RC RF RJ RN RU
CURSOR activities_cursor
IS
SELECT spriden_pidm,
REGEXP_SUBSTR (szcasup_activities,
'[[:alpha:]]+',
1,
1
) activity1,
REGEXP_SUBSTR (szcasup_activities,
'[[:alpha:]]+',
1,
2
) activity2,
REGEXP_SUBSTR (szcasup_activities,
'[[:alpha:]]+',
1,
3
) activity3,
REGEXP_SUBSTR (szcasup_activities,
'[[:alpha:]]+',
1,
4
) activity4,
REGEXP_SUBSTR (szcasup_activities,
'[[:alpha:]]+',
1,
5
) activity5,
REGEXP_SUBSTR (szcasup_activities,
'[[:alpha:]]+',
1,
6
) activity6
FROM saturn_midd.szcasup, saturn.spriden
WHERE szcasup_common_appl_id = spriden_id
AND spriden_ntyp_code = 'CAPP';Then I fetched the results in variadles
FETCH activities_cursor
INTO v_pidm, v_activity1, v_activity2, v_activity3, v_activity4,
v_activity5,v_activity6;
Created a loop with a case statement
LOOP
FETCH activities_cursor
INTO v_pidm, v_activity1, v_activity2, v_activity3, v_activity4,
v_activity5,v_activity6;
EXIT WHEN activities_cursor%NOTFOUND;
IF activities_cursor%FOUND
THEN
CASE
WHEN (v_activity1 IS NOT NULL)
THEN
INSERT INTO saturn.sorints
(sorints_pidm, sorints_ints_code,
sorints_activity_date)
values
v_pidm,
v_activity1,
sysdate
WHEN (v_activity2 IS NOT NULL)
THEN
INSERT INTO saturn.sorints
(sorints_pidm, sorints_ints_code,
sorints_activity_date)
values
v_pidm,
v_activity2,
sysdate
WHEN (v_activity3 IS NOT NULL)
THEN
INSERT INTO saturn.sorints
(sorints_pidm, sorints_ints_code,
sorints_activity_date)
values
v_pidm,
v_activity3,
sysdate
WHEN (v_activity4 IS NOT NULL)
THEN
INSERT INTO saturn.sorints
(sorints_pidm, sorints_ints_code,
sorints_activity_date)
values
v_pidm,
v_activity4,
sysdate
END CASE;
END IF;
END LOOP;
It is working just for one activity (activity1) The variable definition is correctv_activity1 sorints.sorints_ints_code%TYPE;
v_activity2 sorints.sorints_ints_code%TYPE;
v_activity3 sorints.sorints_ints_code%TYPE;
v_activity4 sorints.sorints_ints_code%TYPE;
v_activity5 sorints.sorints_ints_code%TYPE;
v_activity6 sorints.sorints_ints_code%TYPE;
Edited by: peace4all on Aug 16, 2009 9:42 AMpeace4all wrote:
It is working just for one activity (activity1) The variable definition is correct
Well, what else did you expect? CASE evaluates brances starting first one. If WHEN condition is not met it continues to next one. As soon as WHEN condition is met, THEN clause is executed after that CASE exits. You need to use IF statement, not case:
with t as (
select to_date('01/11/2005','dd/mm/yyyy') Start_Date,to_date('13/11/2005','dd/mm/yyyy') End_Date,13 Days,'CMP1' Component,1000.00 Amount from dual union all
select to_date('01/11/2005','dd/mm/yyyy'),to_date('13/11/2005','dd/mm/yyyy'),13,'CMP2',826.67 from dual union all
select to_date('15/11/2005','dd/mm/yyyy'),to_date('20/11/2005','dd/mm/yyyy'),6,'CMP1',413.33 from dual union all
select to_date('15/11/2005','dd/mm/yyyy'),to_date('20/11/2005','dd/mm/yyyy'),6,'CMP2',166.67 from dual union all
select to_date('21/11/2005','dd/mm/yyyy'),to_date('28/11/2005','dd/mm/yyyy'),8,'CMP1',633.00 from dual union all
select to_date('21/11/2005','dd/mm/yyyy'),to_date('28/11/2005','dd/mm/yyyy'),8,'CMP2',111.00 from dual union all
select to_date('21/11/2005','dd/mm/yyyy'),to_date('28/11/2005','dd/mm/yyyy'),8,'CMP3',22.00 from dual union all
select to_date('21/11/2005','dd/mm/yyyy'),to_date('28/11/2005','dd/mm/yyyy'),8,'CMP4',333.00 from dual union all
select to_date('01/12/2005','dd/mm/yyyy'),to_date('15/12/2005','dd/mm/yyyy'),15,'CMP1',2480.00 from dual union all
select to_date('01/12/2005','dd/mm/yyyy'),to_date('15/12/2005','dd/mm/yyyy'),15,'CMP2',1488.00 from dual union all
select to_date('01/12/2005','dd/mm/yyyy'),to_date('15/12/2005','dd/mm/yyyy'),15,'CMP3',496.00 from dual union all
select to_date('01/12/2005','dd/mm/yyyy'),to_date('15/12/2005','dd/mm/yyyy'),15,'CMP4',200.00 from dual union all
select to_date('16/12/2005','dd/mm/yyyy'),to_date('31/12/2005','dd/mm/yyyy'),16,'CMP1',522.00 from dual union all
select to_date('16/12/2005','dd/mm/yyyy'),to_date('31/12/2005','dd/mm/yyyy'),16,'CMP2',166.00 from dual union all
select to_date('16/12/2005','dd/mm/yyyy'),to_date('31/12/2005','dd/mm/yyyy'),16,'CMP3',242.00 from dual
SELECT P_Month,
SUM(LEAST(LAST_DAY(P_Month),end_date) - GREATEST(P_Month,start_date) + 1) Total_Days
FROM t,
SELECT ADD_MONTHS(first_month,LEVEL - 1) P_Month
FROM (
SELECT TRUNC(MIN(start_date),'MM') first_month,
TRUNC(MAX(end_date),'MM') last_month
FROM t
CONNECT BY LEVEL <= MONTHS_BETWEEN(last_month,first_month) + 1
WHERE P_Month BETWEEN TRUNC(start_date,'MM') and end_date
GROUP BY P_Month
ORDER BY P_Month
with t as (
select to_date('01/11/2005','dd/mm/yyyy') Start_Date,to_date('13/11/2005','dd/mm/yyyy') End_Date,13 Days,'CMP1' Component,1000.00 Amount from dual union all
select to_date('01/11/2005','dd/mm/yyyy'),to_date('13/11/2005','dd/mm/yyyy'),13,'CMP2',826.67 from dual union all
select to_date('15/11/2005','dd/mm/yyyy'),to_date('20/11/2005','dd/mm/yyyy'),6,'CMP1',413.33 from dual union all
select to_date('15/11/2005','dd/mm/yyyy'),to_date('20/11/2005','dd/mm/yyyy'),6,'CMP2',166.67 from dual union all
select to_date('21/11/2005','dd/mm/yyyy'),to_date('28/11/2005','dd/mm/yyyy'),8,'CMP1',633.00 from dual union all
select to_date('21/11/2005','dd/mm/yyyy'),to_date('28/11/2005','dd/mm/yyyy'),8,'CMP2',111.00 from dual union all
select to_date('21/11/2005','dd/mm/yyyy'),to_date('28/11/2005','dd/mm/yyyy'),8,'CMP3',22.00 from dual union all
select to_date('21/11/2005','dd/mm/yyyy'),to_date('28/11/2005','dd/mm/yyyy'),8,'CMP4',333.00 from dual union all
select to_date('01/12/2005','dd/mm/yyyy'),to_date('15/12/2005','dd/mm/yyyy'),15,'CMP1',2480.00 from dual union all
select to_date('01/12/2005','dd/mm/yyyy'),to_date('15/12/2005','dd/mm/yyyy'),15,'CMP2',1488.00 from dual union all
select to_date('01/12/2005','dd/mm/yyyy'),to_date('15/12/2005','dd/mm/yyyy'),15,'CMP3',496.00 from dual union all
select to_date('01/12/2005','dd/mm/yyyy'),to_date('15/12/2005','dd/mm/yyyy'),15,'CMP4',200.00 from dual union all
select to_date('16/12/2005','dd/mm/yyyy'),to_date('31/12/2005','dd/mm/yyyy'),16,'CMP1',522.00 from dual union all
select to_date('16/12/2005','dd/mm/yyyy'),to_date('31/12/2005','dd/mm/yyyy'),16,'CMP2',166.00 from dual union all
select to_date('16/12/2005','dd/mm/yyyy'),to_date('31/12/2006','dd/mm/yyyy'),381,'CMP3',242.00 from dual
SELECT P_Month,
SUM(LEAST(LAST_DAY(P_Month),end_date) - GREATEST(P_Month,start_date) + 1) Total_Days
FROM t,
SELECT ADD_MONTHS(first_month,LEVEL - 1) P_Month
FROM (
SELECT TRUNC(MIN(start_date),'MM') first_month,
TRUNC(MAX(end_date),'MM') last_month
FROM t
CONNECT BY LEVEL <= MONTHS_BETWEEN(last_month,first_month) + 1
WHERE P_Month BETWEEN TRUNC(start_date,'MM') and end_date
GROUP BY P_Month
ORDER BY P_Month
LOOP
FETCH activities_cursor
INTO v_pidm, v_activity1, v_activity2, v_activity3, v_activity4,
v_activity5,v_activity6;
EXIT WHEN activities_cursor%NOTFOUND;
IF v_activity1 IS NOT NULL
THEN
INSERT INTO saturn.sorints
(sorints_pidm, sorints_ints_code,
sorints_activity_date)
values
v_pidm,
v_activity1,
sysdate
ELSIF v_activity2 IS NOT NULL
THEN
INSERT INTO saturn.sorints
(sorints_pidm, sorints_ints_code,
sorints_activity_date)
values
v_pidm,
v_activity2,
sysdate
ELSIF v_activity3 IS NOT NULL
THEN
INSERT INTO saturn.sorints
(sorints_pidm, sorints_ints_code,
sorints_activity_date)
values
v_pidm,
v_activity3,
sysdate
ELSIF v_activity4 IS NOT NULL
THEN
INSERT INTO saturn.sorints
(sorints_pidm, sorints_ints_code,
sorints_activity_date)
values
v_pidm,
v_activity4,
sysdate
END IF;
END LOOP;SY. -
MM_editRedirectUrl on insert not working
I'm trying to just insert a record then move on to other
parts of the form by passing the ID, but I can't seem to get it to
work. here's what doesn't work:
MM_editRedirectUrl = "insert3.asp?projectID=" &
rsProjectID.Fields.Item("projectID").Value
Microsoft VBScript runtime error '800a01a8'
Object required: ''
/commFlash-admin/insert2.asp, line 45I you are using the inset wizard/extension check to be sure
all fields
are completed. If the snipet is what is on line 45, then it
appears
that projectID is not poplulated. Is this populated or is it
a
autoincrement value? -
Multiple row insert not working as before after applying hotfix apsb13-13
Coldfusion 9.01
Windows Server 2003
Microsoft Access database (yeah, we know)
Before the hotfix was applied, we could add multiple rows (anywhere from 1-100 or more) and now we're limited to 15 rows at a time after applying the hotfix. We've narrowed it down to the hotfix being the culprit as we had to rebuild the server not to long after this hotfix was applied (~ 1 month) and the multiple row inserts were once again working fine until we got to the point of applying this hot fix again.
Anyone heard of this happening? Any ideas how to correct?
Thanks in advance,
fmHelp
Below is code of how we're doing the multiple row insert (it's performed over 3 pages):
Page 1
<cfform name="form1" method="post" action="handler.cfm?page=update_2">
<input type="hidden" name="sProductID" value="<cfoutput>#qProducts.sProductID#</cfoutput>">
<table width="100%" border="0" cellspacing="3" cellpadding="3">
<tr>
<th scope="row" colspan="2" align="center">Update an Inventory Product</th>
</tr>
<tr>
<th width="42%" scope="row">Product ID</th>
<td width="58%"><cfoutput>#qProducts.sProductID#</cfoutput></td>
</tr>
<tr>
<th width="42%" scope="row">Friendly Name</th>
<td width="58%"><cfoutput>#qProducts.sFriendly_Name#</cfoutput></td>
</tr>
<tr>
<th width="42%" scope="row">Description</th>
<td width="58%"><cfoutput>#qProducts.sDescription#</cfoutput></td>
</tr>
<tr>
<th width="42%" scope="row">Vendor</th>
<td><select name="sVendor">
<cfoutput><option value="#qProducts.sVendor#">#qProducts.sVendor#</option></cfoutput>
<option value=""></option>
<cfoutput query="qVendor">
<option value="#sVendor#">#sVendor#</option>
</cfoutput>
</select></td>
</tr>
<tr>
<th scope="row">Order No.</th>
<td><cfinput name="sOrder_No" type="text" value="" required="yes" message="Order number is a required field."></td>
</tr>
<tr>
<th scope="row">Lot No.</th>
<td><input name="sLot" type="text" value=""/></td>
</tr>
<tr>
<th scope="row">Date Expires</th>
<td><input name="dtExpire" type="text" value=""/></td>
</tr>
<tr>
<th scope="row">Boxes received</th>
<td><input name="iBoxes" type="text" value="" /></td>
</tr>
<tr>
<th scope="row">Doses/Units</th>
<td><input name="pcount" type="text" value="" /></td>
</tr>
<tr>
<th scope="row">Note</th>
<td><cfoutput>#qProducts.sNote#</cfoutput></td>
</tr>
<tr>
<th scope="row"> </th>
<td> </td>
</tr>
<tr>
<th scope="row" colspan="2" align="center"><input type="submit" value="Submit" /></th>
</tr>
</table>
</cfform>
</table>
Page 2
<form name="form1" method="post" action="handler.cfm?page=update_3">
<cfoutput><input type="hidden" name="pcount" value="#FORM.pcount#"></cfoutput>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="6" align="left">Record count (Doses/Units)= <cfoutput>#FORM.pcount#</cfoutput></td>
</tr>
<tr>
<td>Product ID</td>
<td>Vendor</td>
<td>Order No.</td>
<td>Lot No.</td>
<td>Expiration Date</td>
<td>Num. of Boxes</td>
</tr>
<cfset Peoplecount = 0>
<cfloop index="Add" from="1" to="#form.pcount#" step="1">
<tr>
<cfset Peoplecount = PeopleCount + 1>
<td><input <cfoutput> value="#FORM.sProductID#" </cfoutput> name="sProductID_<cfoutput>#Peoplecount#</cfoutput>" type="text" id="sProductID_"></td>
<td><input <cfoutput>value="#FORM.sVendor#"</cfoutput> name="sVendor_<cfoutput>#Peoplecount#</cfoutput>" type="text" id="sVendor_"></td>
<td><input <cfoutput> value="#FORM.sOrder_No#" </cfoutput> name="sOrder_No_<cfoutput>#Peoplecount#</cfoutput>" type="text" id="sOrder_No_"></td>
<td><input <cfoutput>value="#FORM.sLot#"</cfoutput> name="sLot_<cfoutput>#Peoplecount#</cfoutput>" type="text" id="sLot_"></td>
<td><input <cfoutput> value="#DateFormat(FORM.dtExpire, 'MM/DD/YY')#" </cfoutput> name="dtExpire_<cfoutput>#Peoplecount#</cfoutput>" type="text" id="dtExpire_"></td>
<td><input <cfoutput>value="#FORM.iBoxes#"</cfoutput> name="iBoxes_<cfoutput>#Peoplecount#</cfoutput>" type="text" id="iBoxes_"></td>
</tr>
</cfloop>
<tr>
<td> </td>
<td>
<input type="submit" name="Submit" value="Submit">
<input name="HowMany" type="hidden" id="HowMany" value="<cfoutput>#Form.pcount#</cfoutput>">
</td>
</tr>
</table>
</form>
</table>
Page 3
<cfquery name="qGetOnHand" datasource="#variables.DSNCI#">
SELECT *
FROM Products
WHERE sProductID = '#session.sProductID#'
</cfquery>
<cfquery datasource="#variables.DSNCI#">
UPDATE Products
SET iOnHandQty = (#FORM.pcount# + #qGetOnHand.iOnHandQty#)
WHERE sProductID = '#session.sProductID#'
</cfquery>
<cfset quantity = #FORM.pcount#>
<cfset Pcount = 0>
<!-- Start Loop -->
<cfloop index="Add" from="1" to="#form.howmany#" step="1">
<cfset Pcount = Pcount + 1>
<cfset Product = "Form.sProductID_#Pcount#">
<cfset Product = Evaluate(Product)>
<cfset Vendor = "Form.sVendor_#Pcount#">
<cfset Vendor = Evaluate(Vendor)>
<cfset Order = "Form.sOrder_No_#Pcount#">
<cfset Order = Evaluate(Order)>
<cfset Lot = "Form.sLot_#Pcount#">
<cfset Lot = Evaluate(Lot)>
<cfset Expires = "Form.dtExpire_#Pcount#">
<cfset Expires = Evaluate(Expires)>
<cfset Boxes = "Form.iBoxes_#Pcount#">
<cfset Boxes = Evaluate(Boxes)>
<cfquery datasource="#variables.DSNCI#" name="InsertData">
Insert into Received_History (sProductID, sVendor, sOrder_No, sLot, dtExpire, iBoxes, dtReceived)
values ('#Product#', '#Vendor#', '#Order#', '#Lot#', <cfif Expires IS "">NULL<cfelse>#CreateOdbcDate(Expires)#</cfif>, #Boxes#, #CreateOdbcDate(Now())#)
</cfquery>
</cfloop>Rasi wrote:show your complete default.pa (also make sure that you dont override pulse settings in ~/.config/pulse) this setting should allow sound for ANY user - i just tried it and it works
also: of course you restarted pulseaudio?
I restarted pulseaudio and my computer.
My default.pa is displayed in the first post.
My files in /etc/pulse:
> ls -la /etc/pulse
total 28
drwxr-xr-x 1 root root 116 May 16 10:22 .
drwxr-xr-x 1 root root 3740 May 16 10:47 ..
-rw-r--r-- 1 root root 1269 Mar 3 21:31 client.conf
-rw-r--r-- 1 root root 2348 Oct 8 2013 daemon.conf
-rw-r--r-- 1 root root 5756 May 16 10:24 default.pa
-rw-r--r-- 1 root root 5718 Oct 8 2013 default.pa.pacnew
-rw-r--r-- 1 root root 2112 Oct 8 2013 system.pa
-la
My files in ~/.config/pulse:
> ls -la ~/.config/pulse
total 1048
drwx------ 1 homeuser homeuser 660 Sep 12 2013 .
drwx------ 1 homeuser homeuser 1054 Apr 24 14:06 ..
-rw-r--r-- 1 homeuser homeuser 40960 Oct 17 2013 1a8726d55f9140ae9d95dc512eacea67-card-database.tdb
-rw-r--r-- 1 homeuser homeuser 43 May 16 10:37 1a8726d55f9140ae9d95dc512eacea67-default-sink
-rw-r--r-- 1 homeuser homeuser 42 May 16 10:37 1a8726d55f9140ae9d95dc512eacea67-default-source
-rw-r--r-- 1 homeuser homeuser 12288 May 16 10:49 1a8726d55f9140ae9d95dc512eacea67-device-volumes.tdb
lrwxrwxrwx 1 homeuser homeuser 23 Sep 12 2013 1a8726d55f9140ae9d95dc512eacea67-runtime -> /tmp/pulse-cDmMRoO9oFBz
-rw-r--r-- 1 homeuser homeuser 12288 May 15 22:43 1a8726d55f9140ae9d95dc512eacea67-stream-volumes.tdb
-rw------- 1 homeuser homeuser 256 Jun 15 2013 cookie
-rw-r--r-- 1 homeuser homeuser 331776 Jun 21 2013 equalizer-presets.tdb
-rw-r--r-- 1 homeuser homeuser 659456 Sep 20 2013 equalizer-state.tdb
Thanks for your efforts. -
Widget insertion not working DW CS5 Mac
I've got a template open and am trying to insert the JBuilder Accordian widget. I've done all the necessary processes to download the widget from Adobe and put it into my "My Widgets" in the browser. I click on Insert / Widget and get nothing, no dialog asking for which widget to insert. This also fails from the Insert panel and clicking on the Widget icon.
Is this a bug or am I doing something wrong?
Thanks,
SteveMaybe it would help if I re-asked the question in different terms:
a) Does DW5 on MacOS monitor the user interface for a "cancel current operation" input? If so, what is it?
b) Is there any alternative to "Force Quit" to cancel a "long" operation?
Note 1: Monitoring the UI is problematic because it slows down the application; how much depends on how often. Depending on the app's internal architecture, it may simply not be possible to stop certain operations cleanly. Both these would be reasonable motivations to omit a UI cancel function.
Note 2: I think MacOS "Force Quit" sends a Unix "kill" signal (SIGKILL) which stops a running process in its tracks. The process disappears, and unsaved changes are lost. I think Unix defines milder signals, signifying something like, "please stop what you are doing", but I have no idea if these are effective in the case of DW. -
Insert not working in forms 6i
Hi
I have a non database block in forms 6i and have the values written into the database using insert statement.
I have a situation where only for a couple parent records, i am not able to insert child records using forms.
I am able to insert through backend.
any ideas.
thanks,
Edited by: 699704 on Sep 22, 2011 12:49 PM
Edited by: 699704 on Sep 27, 2011 7:52 AMWhat error do you get?
If you get no error, check if you have proper error handling, not something like "when others than null", or an on-error trigger that doesn't show you the error. -
Insert not working in php to mysql
Ive been trying to enter information into mysql for the longerst. My guess is the sql statement. But if anybody can find anything wrong please tell me
Heres my database
and heres my code
please helpCan you try this in your insert.php (its mysqli rather than mysql)
<?php
$NameofOrganization = $_GET['NameofOrganization'];
$Tickets = $_GET['Tickets'];
$OriginalPrice = $_GET['originalprice'];
$DiscountedPrice = $_GET['DiscountedPrice'];
$Date = $_GET['Date'];
$Time = $_GET['Time'];
$Email = $_GET['Email'];
$Description = $_GET['Description'];
$Event_name = $_GET['event_name'];
$con=mysqli_connect("localhost", "root" , "", "user_registration");
// Check connection
if (mysqli_connect_errno()) {
echo "Failed to connect to MySQL: " . mysqli_connect_error();
mysqli_query($con,"INSERT INTO events (name_organization, event_name, number_of_tickets, orginal_price, discounted_price, date, time, email,description) VALUES('$NameofOrganization' , '$Event_name', '$Tickets', ' $OriginalPrice', '$DiscountedPrice', '$Date', '$Time', '$Email', '$Description' )");
?>
Below is the mysql version for insert.php:
<?php
$NameofOrganization = $_GET['NameofOrganization'];
$Tickets = $_GET['Tickets'];
$OriginalPrice = $_GET['originalprice'];
$DiscountedPrice = $_GET['DiscountedPrice'];
$Date = $_GET['Date'];
$Time = $_GET['Time'];
$Email = $_GET['Email'];
$Description = $_GET['Description'];
$Event_name = $_GET['event_name'];
?>
<?php
// Make a MySQL Connection
mysql_connect("localhost", "root", "") or die(mysql_error());
mysql_select_db("user_registration") or die(mysql_error());
// Insert a row of information into the table "events"
mysql_query("INSERT INTO events
(name_organization, event_name, number_of_tickets, orginal_price, discounted_price, date, time, email,description) VALUES('$NameofOrganization' , '$Event_name', '$Tickets', ' $OriginalPrice', '$DiscountedPrice', '$Date', '$Time', '$Email', '$Description') ")
or die(mysql_error());
?> -
Hibernate data insertion not working with oracle auto increment
hi i have created a table and the id is set to auto increment by a sequence trigger pair
when i manually giving value to id its working fine
but when i tried without maually giving the id i am getting this error
org.hibernate.id.IdentifierGenerationException: ids for this class must be manually assigned before calling save(): com.pojo.Example
at org.hibernate.id.Assigned.generate(Assigned.java:33)
at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:99)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:187)
at org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:33)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:172)
at org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:27)
at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70)
at org.hibernate.impl.SessionImpl.fireSave(SessionImpl.java:535)
at org.hibernate.impl.SessionImpl.save(SessionImpl.java:523)
at org.hibernate.impl.SessionImpl.save(SessionImpl.java:519)
at hibernetsample.Main.main(Main.java:30)>
hi i have created a table and the id is set to auto increment by a sequence trigger pair
when i manually giving value to id its working fine
but when i tried without maually giving the id i am getting this error
org.hibernate.id.Assigned
>
That is because you are using the hibernate 'assigned' generator which, by definition
>
lets the application to assign an identifier to the object before save() is called.
This is the default strategy if no <generator> element is specified.
>
For your use case you can use the 'sequence' generator.
The valid generator options and one way to use a sequence generator is shown in this article
http://www.hibernate-training-guide.com/identifiers-generators.html
The hibernate section of this article also uses a trigger with sequence generator
http://blog.lishman.com/2009/02/auto-generated-primary-keys-in-oracle.html
You should check the hibernate documention and tutorial for examples or search 'hibernate generator sequence example'
Maybe you are looking for
-
Hi All, In my JSP I have something like a row of TextBox-----Combox-----TextBox Button--Add When user clicks on "Add" I need to add exactly the same row as above. I am using struts and have following code My jsp <html:text property="paramName" size="
-
Windows 7 64 bit on Mac Pro Ver 1.1 installation options!
Hi All, There seems to be a lot of concern that Win 7 wont run on MP V:1.1. I have this MP and do want to install Win 7 on it. My Spec is as follows: Mac Pro (2 x 2.66GHz Dual Core Intel Xeon) Ver 1.1. HD4870 Graphics Card and a 24" Dell U2410 Displa
-
Adobe Creative Suite 5 cursor issues
In Illustrator CS5 while drawing a straight line while holding down the shift key, my screen will jump about 7 to 8 inches to the left or right, usually at the end of my line when I release the mouse button. This occurs in InDesign as well for me. Wh
-
I want to learn how to install OS in MAC
-
Dear all, Is there a BADI available for ME27? The scenario is such that the client wants to make the POu2019s through ME27 only and not through ME21N We have used the BADI ME_PROCESS_PO_CUST and put the code in PROCESS_ITEM and getting the required