Delete query not working ?
hi all,
this delete query is not working for me. Could you please help me and tell me ho to resolve this ? The error i get when executing this query is "ORA-00903: invalid table name". The table name is correct I fail to understand why does it show invalid table name.
Thanking you all.
Regards
Obviously the table name isn't correct. Either that, or the user that the query is running under doesn't have permissions to view it, so it's getting the response that the table does not exist.
Look at the user you are connecting as. Log in to sqlplus and make sure that user has select perms on the table.
Check your spelling of the table name. Typos happen.
Similar Messages
-
Oracle date parameter query not working?
http://stackoverflow.com/questions/14539489/oracle-date-parameter-query-not-working
Trying to run the below query, but always fails even though the parameter values matches. I'm thinking there is a precision issue for :xRowVersion_prev parameter. I want too keep as much precision as possible.
Delete
from CONCURRENCYTESTITEMS
where ITEMID = :xItemId
and ROWVERSION = :xRowVersion_prev
The Oracle Rowversion is a TimestampLTZ and so is the oracle parameter type.
The same code & query works in Sql Server, but not Oracle.
Public Function CreateConnection() As IDbConnection
Dim sl As New SettingsLoader
Dim cs As String = sl.ObtainConnectionString
Dim cn As OracleConnection = New OracleConnection(cs)
cn.Open()
Return cn
End Function
Public Function CreateCommand(connection As IDbConnection) As IDbCommand
Dim cmd As OracleCommand = DirectCast(connection.CreateCommand, OracleCommand)
cmd.BindByName = True
Return cmd
End Function
<TestMethod()>
<TestCategory("Oracle")> _
Public Sub Test_POC_Delete()
Dim connection As IDbConnection = CreateConnection()
Dim rowver As DateTime = DateTime.Now
Dim id As Decimal
Using cmd As IDbCommand = CreateCommand(connection)
cmd.CommandText = "insert into CONCURRENCYTESTITEMS values(SEQ_CONCURRENCYTESTITEMS.nextval,'bla bla bla',:xRowVersion) returning ITEMID into :myOutputParameter"
Dim p As OracleParameter = New OracleParameter
p.Direction = ParameterDirection.ReturnValue
p.DbType = DbType.Decimal
p.ParameterName = "myOutputParameter"
cmd.Parameters.Add(p)
Dim v As OracleParameter = New OracleParameter
v.Direction = ParameterDirection.Input
v.OracleDbType = OracleDbType.TimeStampLTZ
v.ParameterName = "xRowVersion"
v.Value = rowver
cmd.Parameters.Add(v)
cmd.ExecuteNonQuery()
id = CType(p.Value, Decimal)
End Using
Using cmd As IDbCommand = m_DBTypesFactory.CreateCommand(connection)
cmd.CommandText = " Delete from CONCURRENCYTESTITEMS where ITEMID = :xItemId and ROWVERSION = :xRowVersion_prev"
Dim p As OracleParameter = New OracleParameter
p.Direction = ParameterDirection.Input
p.DbType = DbType.Decimal
p.ParameterName = "xItemId"
p.Value = id
cmd.Parameters.Add(p)
Dim v As OracleParameter = New OracleParameter
v.Direction = ParameterDirection.Input
v.OracleDbType = OracleDbType.TimeStampLTZ
v.ParameterName = "xRowVersion_prev"
v.Value = rowver
v.Precision = 6 '????
cmd.Parameters.Add(v)
Dim cnt As Integer = cmd.ExecuteNonQuery()
If cnt = 0 Then Assert.Fail() 'should delete
End Using
connection.Close()
End Sub
Schema:
-- ****** Object: Table SYSTEM.CONCURRENCYTESTITEMS Script Date: 1/26/2013 11:56:50 AM ******
CREATE TABLE "CONCURRENCYTESTITEMS" (
"ITEMID" NUMBER(19,0) NOT NULL,
"NOTES" NCHAR(200) NOT NULL,
"ROWVERSION" TIMESTAMP(6) WITH LOCAL TIME ZONE NOT NULL)
STORAGE (
NEXT 1048576 )
Sequence:
-- ****** Object: Sequence SYSTEM.SEQ_CONCURRENCYTESTITEMS Script Date: 1/26/2013 12:12:48 PM ******
CREATE SEQUENCE "SEQ_CONCURRENCYTESTITEMS"
START WITH 1
CACHE 20
MAXVALUE 9999999999999999999999999999still not comming...
i have one table each entry is having only one fromdata and one todate only
i am running below in sql it is showing two rows. ok.
select t1.U_frmdate,t1.U_todate ,ISNULL(t2.firstName,'')+ ',' +ISNULL(t2.middleName ,'')+','+ISNULL(t2.lastName,'') AS NAME, T2.empID AS EMPID, T2.U_emp AS Empticket,t2.U_PFAcc,t0.U_pf
from [@PR_PRCSAL1] t0 inner join [@PR_OPRCSAL] t1
on t0.DocEntry = t1.DocEntry
inner join ohem t2
on t2.empID = t0.U_empid where t0.U_empid between '830' and '850' and t1.U_frmdate ='20160801' and t1.u_todate='20160830'
in commond promt
select t1.U_frmdate,t1.U_todate ,ISNULL(t2.firstName,'')+ ',' +ISNULL(t2.middleName ,'')+','+ISNULL(t2.lastName,'') AS NAME, T2.empID AS EMPID, T2.U_emp AS Empticket,t2.U_PFAcc,t0.U_pf
from [@PR_PRCSAL1] t0 inner join [@PR_OPRCSAL] t1
on t0.DocEntry = t1.DocEntry
inner join ohem t2
on t2.empID = t0.U_empid where t0.U_empid between {?FromEmid} and {?ToEmid} and t1.U_frmdate ={?FDate} and t1.u_todate={?TDate}
still not showing any results.. -
in iTunes 11.1 (I26) , I cannot find how to delete podcast listings showing undownloaded podcasts. Delete does not work. Option Delete does not work. Dragging to the trash does not work. Under Edit, Delete is greyed out. Mac OS 10.6.8.
Tom at the Genius Bar told me that Option Delete would work. It does not.
I had to upgrade to iTunes 11.1.(I26) because it is required with OS7 on my iPod Touch (5th Gen). I have tried shutting down iTunes, then shutting down the entire system. This is the first in many visits that the Genius Bar gave me a solution that did not work.
This is a big awkward computer locked to my desk. I would rather not unlock it and then carry it through a shopping center to the Genius Bar if i can avoid oit.
When I installed iTunes 11.1, I discovered that Ihad to resubscribe to virtually all of the podcasts that I had previously been subscribed to. That was a surprise.Hello Achates:
I did not read the rather long post. If you wish to reinstall OS X 10.4, use your software install DVD. Backup is essential. To minimize your risk, I would use an archive and install:
http://docs.info.apple.com/article.html?artnum=107120
In that way, you will have a fresh copy of OS X and your current settings will be preserved.
Incidentally, I do not agree that the printer problem is best solved by reinstalling OS X. I have had HP printers for sometime and, on one occasion, had difficulty after an upgrade. HP technical support walked me through uninstalling all traces of the HP driver and then reinstalling.
Barry -
Other database delete is not working on forall statement
Dear all,
My scenario is , i create a program, the program fetch the data from database x and i want to delete on the same x database but i am running this program at y database, so
so i created a view
create or replace view vw_ibs_pda_bills_x as
SELECT *
FROM ibs_pda_bills_x@testarch1my program
Declare
CURSOR c2 IS
SELECT *
FROM vw_ibs_pda_bills_x
WHERE bill_month <= '31-dec-2008'; -- AND bpref_no = :cons;
opr varchar2(10) := 'DELETE';
TYPE tsch IS TABLE OF c2%ROWTYPE;
vtsch tsch;
cnt NUMBER := 0;
stime NUMBER;
etime NUMBER;
DURATION NUMBER;
rcount NUMBER;
errorsd PLS_INTEGER;
ecode NUMBER;
val1 VARCHAR2 (100);
val2 VARCHAR2 (100);
val3 VARCHAR2 (100);
val4 VARCHAR2 (100);
BEGIN
BEGIN
stime := DBMS_UTILITY.get_time ();
OPEN c2;
LOOP
FETCH c2
BULK COLLECT INTO vtsch LIMIT 1000;
IF vtsch.COUNT = 1000
THEN
cnt := cnt + 1;
END IF;
If opr = 'INSERT' Then
FORALL i IN 1 .. vtsch.COUNT SAVE EXCEPTIONS
INSERT INTO dlul.ibs_pda_bills
VALUES vtsch (i);
Else
FORALL i IN 1 .. vtsch.COUNT SAVE EXCEPTIONS
Delete from vw_ibs_pda_bills_x where bill_month = vtsch(i).bill_month;
End if;
EXIT WHEN c2%NOTFOUND;
END LOOP;
etime := DBMS_UTILITY.get_time ();
DURATION := ((etime - stime) / 100) / 60;
rcount :=
(cnt * 1000) + vtsch.COUNT - NVL (SQL%BULK_EXCEPTIONS.COUNT, 0);
If opr = 'INSERT' Then
INSERT INTO process_stage_log
VALUES (SYSDATE, 'IBS_PDA_BILLS', DURATION, rcount);
Else
INSERT INTO process_stage_log
VALUES (SYSDATE, 'IBS_PDA_BILLS-D', DURATION, rcount);
End if;
CLOSE c2;
COMMIT;
EXCEPTION
WHEN OTHERS
THEN
errorsd := SQL%BULK_EXCEPTIONS.COUNT;
IF errorsd > 0
THEN
FOR j IN 1 .. errorsd
LOOP
ecode := SQL%BULK_EXCEPTIONS (j).ERROR_CODE;
val1 :=
vtsch (SQL%BULK_EXCEPTIONS (j).ERROR_INDEX).sch_code;
val2 :=
vtsch (SQL%BULK_EXCEPTIONS (j).ERROR_INDEX).bpref_no;
val3 :=
vtsch (SQL%BULK_EXCEPTIONS (j).ERROR_INDEX).bill_month;
val4 :=
vtsch (SQL%BULK_EXCEPTIONS (j).ERROR_INDEX).service_code;
If opr = 'INSERT' Then
INSERT INTO process_error_log
VALUES (SYSDATE, ecode, 'IBS_PDA_BILLS', 'sch_code', val1,
'bpref_no', val2, 'bill_month', val3, 'service_code', val4,'INSERT');
Else
INSERT INTO process_error_log
VALUES (SYSDATE, ecode, 'IBS_PDA_BILLS', 'sch_code', val1,
'bpref_no', val2, 'bill_month', val3, 'service_code', val4,'DELETE');
End if;
END LOOP;
END IF;
END;
END pda_insert;the program want to do the delet option for all delete is not working. The program executed successful but the operation delete is not happening
how to solve this issue.
please help me
kanishNo error encountered in my log table
the new workaround you said, that is instead of for all , already i tried for i in 1.. to like
instead of forall delete i tried the following way
Declare
CURSOR c2 IS
SELECT *
FROM ibs_pda_bills_x@testarch1
WHERE bill_month <= '31-dec-2008'; -- AND bpref_no = :cons;
opr varchar2(10) := 'DELETE';
TYPE tsch IS TABLE OF c2%ROWTYPE;
vtsch tsch;
cnt NUMBER := 0;
stime NUMBER;
etime NUMBER;
DURATION NUMBER;
rcount NUMBER;
errorsd PLS_INTEGER;
ecode NUMBER;
val1 VARCHAR2 (100);
val2 VARCHAR2 (100);
val3 VARCHAR2 (100);
val4 VARCHAR2 (100);
BEGIN
BEGIN
stime := DBMS_UTILITY.get_time ();
OPEN c2;
LOOP
FETCH c2
BULK COLLECT INTO vtsch LIMIT 1000;
IF vtsch.COUNT = 1000
THEN
cnt := cnt + 1;
END IF;
If opr = 'INSERT' Then
FORALL i IN 1 .. vtsch.COUNT SAVE EXCEPTIONS
INSERT INTO dlul.ibs_pda_bills
VALUES vtsch (i);
Else
/* fORALL i IN 1 .. vtsch.COUNT SAVE EXCEPTIONS
Delete from vw_ibs_pda_bills_x where to_char(bill_month,'dd-mm-rrrr') = to_char(vtsch (i).bill_month,'dd-mm-rrrr');*/
for i in 1..vtsch.count loop
delete ibs_pda_bills_x@testarch1 where to_char(bill_month,'dd-mm-rrrr') = to_char(vtsch (i).bill_month,'dd-mm-rrrr');
end loop;
End if;
EXIT WHEN c2%NOTFOUND;
END LOOP;
etime := DBMS_UTILITY.get_time ();
DURATION := ((etime - stime) / 100) / 60;
rcount :=
(cnt * 1000) + vtsch.COUNT - NVL (SQL%BULK_EXCEPTIONS.COUNT, 0);
If opr = 'INSERT' Then
INSERT INTO process_stage_log
VALUES (SYSDATE, 'IBS_PDA_BILLS', DURATION, rcount);
Else
INSERT INTO process_stage_log
VALUES (SYSDATE, 'IBS_PDA_BILLS-D', DURATION, rcount);
End if;
CLOSE c2;
COMMIT;
EXCEPTION
WHEN OTHERS
THEN
errorsd := SQL%BULK_EXCEPTIONS.COUNT;
IF errorsd > 0
THEN
FOR j IN 1 .. errorsd
LOOP
ecode := SQL%BULK_EXCEPTIONS (j).ERROR_CODE;
val1 :=
vtsch (SQL%BULK_EXCEPTIONS (j).ERROR_INDEX).sch_code;
val2 :=
vtsch (SQL%BULK_EXCEPTIONS (j).ERROR_INDEX).bpref_no;
val3 :=
vtsch (SQL%BULK_EXCEPTIONS (j).ERROR_INDEX).bill_month;
val4 :=
vtsch (SQL%BULK_EXCEPTIONS (j).ERROR_INDEX).service_code;
If opr = 'INSERT' Then
INSERT INTO process_error_log
VALUES (SYSDATE, ecode, 'IBS_PDA_BILLS', 'sch_code', val1,
'bpref_no', val2, 'bill_month', val3, 'service_code', val4,'INSERT');
Else
INSERT INTO process_error_log
VALUES (SYSDATE, ecode, 'IBS_PDA_BILLS', 'sch_code', val1,
'bpref_no', val2, 'bill_month', val3, 'service_code', val4,'DELETE');
End if;
END LOOP;
END IF;
END;
END pda_insert;i am receiving the following error
ORA-02055: distributed update operation failed; rollback required
ORA-06531: Reference to uninitialized collection
ORA-06512: at line 77
ORA-06531: Reference to uninitialized collection
kanish -
Problem Summary
Cancel Query not working on 11.5.10
Problem Description
While finding orders, window pops up the cancel query but when user tries to click the cancel button, query does not cancel.jemar98 wrote:
Problem Summary
Cancel Query not working on 11.5.10
Problem Description
While finding orders, window pops up the cancel query but when user tries to click the cancel button, query does not cancel.Please post the details of the application release, database version and OS.
Was this working before? If yes, any changes been done recently?
Please review (Canceling Long Running Queries in Oracle Applications 11i [ID 138159.1]) and make sure you complete all the steps.
Thanks,
Hussein -
Multiple delete is not working.
Hi,
Multiple delete is not working. Please find my backend bean code. Please let me know the issue in my code.
Table:
<af:table value="#{bindings.CmProcessParamValueView13.collectionModel}"
var="row"
rows="#{bindings.CmProcessParamValueView13.rangeSize}"
emptyText="#{bindings.CmProcessParamValueView13.viewable ? 'No data to display.' : 'Access Denied.'}"
fetchSize="#{bindings.CmProcessParamValueView13.rangeSize}"
rowBandingInterval="1"
selectedRowKeys="#{bindings.CmProcessParamValueView13.collectionModel.selectedRow}"
selectionListener="#{bindings.CmProcessParamValueView13.collectionModel.makeCurrent}"
rowSelection="multiple"
binding="#{backingBeanScope.backing_app_RunCalcPage.t1}"
id="t1" width="720px" inlineStyle="height:140px;" partialTriggers="cb6 cb3"
filterVisible="true" filterModel="#{bindings.CmProcessParamValueView13.queryDescriptor}" >
<af:column sortProperty="ParamValue7"
sortable="true" width="690"
headerText="Comm Type"
rowHeader="unstyled"
id="c2" align="left" filterable="true">
<af:outputText value="#{row.ParamValue7}"
id="ot4"/>
</af:column>
</af:table>
Backing Bean Delete Code:
RowKeySet rowKeySet = (RowKeySet)this.t1.getSelectedRowKeys();
CollectionModel cm = (CollectionModel)this.t1.getValue();
System.out.println("RowKeySet is: "+ rowKeySet.getSize());
for (Object facesTreeRowKey : rowKeySet) {
cm.setRowKey(facesTreeRowKey);
JUCtrlHierNodeBinding rowData =
(JUCtrlHierNodeBinding)cm.getRowData();
System.out.println("RowData is : "+rowData.getAttribute("ParamValue7"));
rowData.getRow().remove();
Thanks.Issue is resolved...
Solution is,
Remove selectionListener and selectedKey attributes from the table.
Delete code is:
DCBindingContainer dcBindings =
(DCBindingContainer)getBindings();
DCIteratorBinding dcIterator =
dcBindings.findIteratorBinding("Iterator...");
RowSetIterator rs = dcIterator.getRowSetIterator();
RowKeySet rks = this.t1.getSelectedRowKeys();
Iterator rksIter = rks.iterator();
while (rksIter.hasNext()) {
List l = (List) rksIter.next();
Key key = (Key)l.get(0);
Row row = rs.getRow(key);
if(row != null)
row.remove();
} -
space.anddelte
space.and.delete.keys.not.working.on.wireless.keyboard.help!Before replacing the keyboard do 2-3 SMC resets using the instructions in iMac SMC and PRAM reset
-
Is it possible to check automati all bookmarks, and delete the not working bookmarks
Is it possible to check automatic all bookmarks, and delete the not working bookmarks
Try this extension:
*CheckPlaces: https://addons.mozilla.org/firefox/addon/checkplaces/ -
At the top of my Mozilla home page, it lists the current URL site, such as http://www.safeco.com, I am on plus the others in the drop down box. How do I delete them. Highlighting and hitting delete does not work.
I am using windows Vista 007 and Mozila 3.6.1.3Do those entries have a yellow star at the far right?
If they have then they are bookmarks. You can remove them if you open that link and click the star to open the Edit This Bookmark dialog and click the Remove button in that dialog.
* [[Clearing Location bar history]]
* [[Cannot clear Location bar history]] -
I have a MacBook Air using Maverick. I have files in the trash I want to recover to their original files. I do not have "Back Up" and "Command + Delete" does not work.
Drag them out of the Trash and put them in their original location. Put Back may work on one file at a time.
-
Sap query not working after Upgradtion
Hi Experts,
We have recently done up gradation from 4.6 to Ecc 6.0. Since then my Sap query are not working.
Please help how to fix the issue.
Thanks in Advance for your support and time.Hi,
Do you have any custom indexes for tables in the affected queries that were deleted as part of the upgrade? (ones that didn't exist in the customer namespace? - something working looking into)
Regards,
Ryan Crosby -
Inline transform for Sql Query not working in SAP MII 12.1 Version 12.1.8 B
Hi All,
I applied an xslt for an sql query which returns an xml file.
I used inline transform icon in sql query to load an xsl file which has to return me a string
Any idea why is not working for me..?
My Sample XML file:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="/XMII/CM/BatchDisposition/BatchQueueManagement/StyleSheets/ProductXsl.xsl"?>
<Rowsets DateCreated="2011-05-05T07:27:45" EndDate="2011-05-05T07:27:45" StartDate="2011-05-05T06:27:45" Version="12.1.8 Build(20)">
<Rowset>
<Columns>
<Column Description="ProductName" MaxRange="1" MinRange="0" Name="ProductName" SQLDataType="12" SourceColumn="ProductName"/>
</Columns>
<Row>
<ProductName>Asprin 100mg Tablets 12 x10 strip</ProductName>
</Row>
<Row>
<ProductName>Asprin 300mg Tablets 12 x10 strip</ProductName>
</Row>
<Row><ProductName>Ibprooven 200mg Tablets 12 x 10 strip</ProductName></Row>
<Row><ProductName>RipTide 50mg Tablets 40 x10 strip</ProductName></Row>
<Row><ProductName>Seroquel 200mg Tablets 6 x10 strip</ProductName></Row>
<Row><ProductName>Seroquel 400mg Tablets 12 x10 strip</ProductName></Row>
</Rowset>
</Rowsets>
My Sample XSl File:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:text>["</xsl:text>
<xsl:for-each select="Rowsets/Rowset/Row">
<xsl:value-of select="ProductName"/>
<xsl:if test="position() < last()">
<xsl:text>","</xsl:text>
</xsl:if>
<xsl:if test="position()=last()">
<xsl:text>"]</xsl:text>
</xsl:if>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
Any Suggestions are Welcome:
ThanksSomething like this should work...
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<Rowsets DateCreated="{Rowsets/@DateCreated}" Version="{Rowsets/@Version}" StartDate="{Rowsets/@StartDate}" EndDate="{Rowsets/@EndDate}">
<xsl:copy-of select="/Rowsets/FatalError"/>
<xsl:copy-of select="/Rowsets/Messages"/>
<Rowset>
<Columns>
<Column Description="Mycol1" MaxRange="1" MinRange="0" Name="Mycol1" SQLDataType="12" SourceColumn="Mycol1" />
</Columns>
<Row>
<Mycol1>
<xsl:text>["</xsl:text>
<xsl:for-each select="/Rowsets/Rowset/Row">
<xsl:value-of select="." />
<xsl:choose>
<xsl:when test="position() < last()"><xsl:text>","</xsl:text></xsl:when>
<xsl:otherwise><xsl:text>"]</xsl:text></xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</Mycol1>
</Row>
</Rowset>
</Rowsets>
</xsl:template>
</xsl:stylesheet> -
BW query not working in portal
Hello Experts,
We have this issue when we have a BW query which is running well in RSRT but the query is not working in Portal.
The error message we have is
User when running the report is getting the error message “Error in File SMT-0454 - Contribution Analysis (Cx) : Error in formula Running Total Condition Formula: 'HierarchyLevel (GroupingLevel ({YPAXXM01_YPAXXM01_QC001.[YGLSUBBRD GSK1CXBRNDCATH]-NodeId})) = 1' This field name is not known..”
Explored the possibilties , Could this be issue with BW query.
We have this query getting fed to BO's. Please advise.
Thanks,
SanthoshHi Santhosh,
Error... This field name is not known, check your formulas in query, there might be some changes happenened with the characteristics used in formula.
Check the formula by going up to base level, you might removed some field ex: YGLSUBBRD from your query. Repair it appropriately.
Hope helps - Kumar -
Delete is not working properly
I modified the Delete server behavior to delete associated
records from the child tables and then delete the parent table as
follows:
if ((isset($_POST['peereduid'])) &&
($_POST['peereduid'] != "")) {
$deleteTPRSQL = sprintf("DELETE FROM TEENPEERRELATIONSHIP
WHERE PEEREDU_OWNS_ID=%s AND TEEN_ID=%s AND PEEREDU_TALKS_ID=%s AND
CONTACT_DATE=str_to_date(%s, '%%Y-%%c-%%e')",
GetSQLValueString($_POST['peereduid'], "int"),
GetSQLValueString($_POST['teenid'], "int"),
GetSQLValueString($_POST['peeredutalksid'], "int"),
GetSQLValueString($_POST['contactdate'], "date"));
mysql_select_db($database_cnPeer_Outreach,
$cnPeer_Outreach);
$Result1 = mysql_query($deleteTPRSQL, $cnPeer_Outreach) or
die(mysql_error());
$deleteCRBSQL = sprintf("DELETE FROM CONTACTREFERREDBY WHERE
PEEREDU_OWNS_ID=%s AND TEEN_ID=%s AND PEEREDU_TALKS_ID=%s AND
CONTACT_DATE=str_to_date(%s, '%%Y-%%c-%%e')",
GetSQLValueString($_POST['peereduid'], "int"),
GetSQLValueString($_POST['teenid'], "int"),
GetSQLValueString($_POST['peeredutalksid'], "int"),
GetSQLValueString($_POST['contactdate'], "date"));
mysql_select_db($database_cnPeer_Outreach,
$cnPeer_Outreach);
$Result1 = mysql_query($deleteCRBSQL, $cnPeer_Outreach) or
die(mysql_error());
$deleteCTSQL = sprintf("DELETE FROM CONTACTTOPIC WHERE
PEEREDU_OWNS_ID=%s
AND TEEN_ID=%s AND PEEREDU_TALKS_ID=%s AND
CONTACT_DATE=str_to_date(%s, '%%Y-%%c-%%e')",
GetSQLValueString($_POST['peereduid'], "int"),
GetSQLValueString($_POST['teenid'], "int"),
GetSQLValueString($_POST['peeredutalksid'], "int"),
GetSQLValueString($_POST['contactdate'], "date"));
mysql_select_db($database_cnPeer_Outreach,
$cnPeer_Outreach);
$Result1 = mysql_query($deleteCTSQL, $cnPeer_Outreach) or
die(mysql_error());
$deleteCMSQL = sprintf("DELETE FROM CONTACTMATERIAL WHERE
PEEREDU_OWNS_ID=%s AND TEEN_ID=%s AND PEEREDU_TALKS_ID=%s AND
CONTACT_DATE=str_to_date(%s, '%%Y-%%c-%%e')",
GetSQLValueString($_POST['peereduid'], "int"),
GetSQLValueString($_POST['teenid'], "int"),
GetSQLValueString($_POST['peeredutalksid'], "int"),
GetSQLValueString($_POST['contactdate'], "date"));
mysql_select_db($database_cnPeer_Outreach,
$cnPeer_Outreach);
$Result1 = mysql_query($deleteCMSQL, $cnPeer_Outreach) or
die(mysql_error());
$deleteCSSQL = sprintf("DELETE FROM CONTACTSERVICE WHERE
PEEREDU_OWNS_ID=%s
AND TEEN_ID=%s AND PEEREDU_TALKS_ID=%s AND
CONTACT_DATE=str_to_date(%s, '%%Y-%%c-%%e')",
GetSQLValueString($_POST['peereduid'], "int"),
GetSQLValueString($_POST['teenid'], "int"),
GetSQLValueString($_POST['peeredutalksid'], "int"),
GetSQLValueString($_POST['contactdate'], "date"));
mysql_select_db($database_cnPeer_Outreach,
$cnPeer_Outreach);
$Result1 = mysql_query($deleteCSSQL, $cnPeer_Outreach) or
die(mysql_error());
$deletePRTSQL = sprintf("DELETE FROM PEERRECOMMENDSTALK
WHERE PEEREDU_OWNS_ID=%s AND TEEN_ID=%s AND PEEREDU_TALKS_ID=%s AND
CONTACT_DATE=str_to_date(%s, '%%Y-%%c-%%e')",
GetSQLValueString($_POST['peereduid'], "int"),
GetSQLValueString($_POST['teenid'], "int"),
GetSQLValueString($_POST['peeredutalksid'], "int"),
GetSQLValueString($_POST['contactdate'], "date"));
mysql_select_db($database_cnPeer_Outreach,
$cnPeer_Outreach);
$Result1 = mysql_query($deletePRTSQL, $cnPeer_Outreach) or
die(mysql_error());
$deleteTPASQL = sprintf("DELETE FROM TEENPROMISESACTION
WHERE PEEREDU_OWNS_ID=%s AND TEEN_ID=%s AND PEEREDU_TALKS_ID=%s AND
CONTACT_DATE=str_to_date(%s, '%%Y-%%c-%%e')",
GetSQLValueString($_POST['peereduid'], "int"),
GetSQLValueString($_POST['teenid'], "int"),
GetSQLValueString($_POST['peeredutalksid'], "int"),
GetSQLValueString($_POST['contactdate'], "date"));
mysql_select_db($database_cnPeer_Outreach,
$cnPeer_Outreach);
$Result1 = mysql_query($deleteTPASQL, $cnPeer_Outreach) or
die(mysql_error());
$deleteTPTSQL = sprintf("DELETE FROM TEENPROMISESTALK WHERE
PEEREDU_OWNS_ID=%s AND TEEN_ID=%s AND PEEREDU_TALKS_ID=%s AND
CONTACT_DATE=str_to_date(%s, '%%Y-%%c-%%e')",
GetSQLValueString($_POST['peereduid'], "int"),
GetSQLValueString($_POST['teenid'], "int"),
GetSQLValueString($_POST['peeredutalksid'], "int"),
GetSQLValueString($_POST['contactdate'], "date"));
mysql_select_db($database_cnPeer_Outreach,
$cnPeer_Outreach);
$Result1 = mysql_query($deleteTPTSQL, $cnPeer_Outreach) or
die(mysql_error());
$deleteTPMVSQL = sprintf("DELETE FROM
TEENPROMISESMEDICALVISIT WHERE PEEREDU_OWNS_ID=%s AND TEEN_ID=%s
AND PEEREDU_TALKS_ID=%s AND CONTACT_DATE=str_to_date(%s,
'%%Y-%%c-%%e')",
GetSQLValueString($_POST['peereduid'], "int"),
GetSQLValueString($_POST['teenid'], "int"),
GetSQLValueString($_POST['peeredutalksid'], "int"),
GetSQLValueString($_POST['contactdate'], "date"));
mysql_select_db($database_cnPeer_Outreach,
$cnPeer_Outreach);
$Result1 = mysql_query($deleteTPMVSQL, $cnPeer_Outreach) or
die(mysql_error());
$deleteSQL = sprintf("DELETE FROM CONTACT WHERE
PEEREDU_OWNS_ID=%s
AND TEEN_ID=%s AND PEEREDU_TALKS_ID=%s AND
CONTACT_DATE=str_to_date(%s, '%%Y-%%c-%%e')",
GetSQLValueString($_POST['peereduid'], "int"),
GetSQLValueString($_POST['teenid'], "int"),
GetSQLValueString($_POST['peeredutalksid'], "int"),
GetSQLValueString($_POST['contactdate'], "date"));
mysql_select_db($database_cnPeer_Outreach,
$cnPeer_Outreach);
$Result1 = mysql_query($deleteSQL, $cnPeer_Outreach) or
die(mysql_error());
$deleteGoTo = "peerselect.php";
if (isset($_SERVER['QUERY_STRING'])) {
$deleteGoTo .= (strpos($deleteGoTo, '?')) ? "&" : "?";
$deleteGoTo .= $_SERVER['QUERY_STRING'];
header(sprintf("Location: %s", $deleteGoTo));
The problem is that the deleteGoTo is not working. After the
delete, I am shown the original page again. Can anyone tell me what
I need to do to get it working?Hi paramu
I think you didn't get my question
The new row is not saved into DB, user add a new record simply he change his mind half way and need
to delete new record in form (As I understand this row only created in related iterator)
So he expect after delete form goes back to previous state
Thanks
Mohsen -
Switch from MySQL to MS SQL Server, Query not working
I'm sure there is a simple setting somewhere for this, but cannot seem to find it and really would appreciate some assistance. Have an application which uses JDBC to connect to a MySQL DB to run the following query without an issue:
SELECT * FROM users
This returns the desired results. Changed to connect to MS SQL Server 2000 using the JDBC-ODBC bridge and the same query returns no results. The problem, SQL Server wants this query instead:
SELECT * FROM [users]
I don't want to have to change queries depending on the DB, as that is supposed to be one of the advantages of JDBC. Is there a setting in MySQL (or the JDBC driver) to have it work correctly if I pass table names in []? Or is there a setting in MS SQL Server (or in the JDBC, or ODBC) to have it accept queries without the []?
Or is there a different approach that I'm missing which would avoid this whole problem?
Thanks,
MattI suspect your database definitions are different. It has nothing to do with your java code.
The bracket syntax is used to indicate the more standard quoted identifiers in standard SQL.
Thus you could do this in oracle and in MS SQL Server...
SELECT * FROM "users"
I suspect that the above will work for your MS SQL Server database and will not work for your Oracle database. However if you created the table in oracle and specifically used "users" (with the double quotes around the name) when creating the table then it would work.
Of course if the database definitions are different it means you must use different SQL for each. Just as if the name of the table was 'other' rather than 'users'.
Maybe you are looking for
-
I am installing patch 3 on version 1.1. and just noticed that the admin password had reverted back to the prevoius version. In case any one has any issues logging in try that. I am going to open a TAC case once the patch finishes installing on the ot
-
Multiple Columns in a JTextArea
so ive got a very horizontal JTextArea inside a JScrollPane. What would be the best way to dice up its content such that it will wrap "vertically" ... can I do that using ony one JTextArea?
-
I'm getting an error message every time I try to update Premiere Pro CC 2014 and actually all CC softwares: "Unable to extract download the files." Please help.
-
Hardware inventory reports by scom
Is there a way to get managed servers hardware inventory list by scom?
-
Help