|
Hi,
I have to query an update for date and time. I know how to update the date alone, but I am having trouble with adding the time to the function. Right now, as it stands, it reads 4/20/2011 1:32:07 PM. I need the dock_date field to read 4/21/2011 7:00:00 AM. When I add 07:00:00 AM to the query I receive a DB error of: ORA-01830: date format picture ends before converting entire input string. Can someone please help me?
Thank you,
Justin
I am joining two tables: cxadmin.ro_hist and cxadmin.ord_dtl and use the in function b/c I have to update multiple rows.
My query so far is:
UPDATE cxadmin.ro_hist
SET DOCK_DATE = '20-APR-2011 7:00:00 AM'
where repair_ord in (
select recv_repair_ord from cxadmin.ord_dtl
where ord_nbr = '602945RR' AND DOCK_DATE > '20-APR-2011' )
|
|
|
|
|
Have you tried to convert on date type?
e.g TO_DATE('20-APR-2011 7:00:00 AM', 'dd-MM-yyyy HH:MI:SS AM')
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
www.cacttus.com
|
|
|
|
|
|
No problem
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
www.cacttus.com
|
|
|
|
|
For SQL Server you might try:
SET DOC_DATE = CAST('20-APR-2011 7:00:00 AM' AS DATETIME)
or possibly:
SET DOC_DATE = '20-APR-2011 7:00:00' -- NO AM
|
|
|
|
|
I was reading this (( http://technet.microsoft.com/en-us/library/ms181055.aspx[^] )) today, and was shocked (shocked I tell you) by the following statement:
The algorithms to match new SQL statements to existing, unused execution plans in the cache require that all object references be fully qualified. For example, the first of these SELECT statements is not matched with an existing plan, and the second is matched:
SELECT * FROM Person;
SELECT * FROM Person.Person;
|
|
|
|
|
Nothing another shower couldn't fix, I hope.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
:: PIEBALD closes his blinds ::
Actually, I've already switched to tequila.
|
|
|
|
|
Hi, I use MS Access 2003 database and I want to Update all records in 1 column. How to make this in once? I use VB.NET
|
|
|
|
|
I would try a regular update statement without a WHERE clause, as in:
UPDATE table_name SET column_name=value
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
In this column have numeric data from 1 to 12 and I want to increase them with 1 e.g. 1->2 etc
|
|
|
|
|
Have you tried
UPDATE table_name SET column_name=column_name+1
?
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
Thanks this is work for me!
|
|
|
|
|
I made an database application using LINQTOSQL IN c#(using visual studio)
I just wanted to know how many different connections at a same time can be made from different computers? (let say to a same table of database?)
|
|
|
|
|
This depends on your design but basically the answer is unlimited. Think about the big web sites, do you think they can accept limitations on the connections to their databases, no they design their systems to meet the projected requirements.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
wjbjnr wrote: I just wanted to know how many different connections at a same time can be made
from different computers?
64k. Or some number pretty close to that.
There are gotchas for that.
1. They must exist at the same time.
2. The number can be smaller, quite a bit, if the clients are rapidly opening and closing connections.
3. The number can be smaller, specifically 5000, if you have not explicitly updated the MS Windows registry of the server box. This is the maximum and is impacted by 2 above as well.
None of that has to do with the database and certainly not tables. It has to do with the IP address. So if you have a computer with more than one real IP Address then each is subject to the same restrictions.
See the following
http://msdn.microsoft.com/en-us/library/aa560610.aspx[^]
Be very careful if you start messing with those values.
|
|
|
|
|
Thanks for looking at this.
Had a question about some of the process then discovered that 3/4 of the form was not properly data bound.
Fixing that began to help in solving all other little nitpicks.
Michael
|
|
|
|
|
Hello.
I have opened a lot of cn.open() and cn.close() in my web application. for example when a page is loading, almost 10 connections are opened and closed. Whether it creates performance problems?
Regards.
Mehdi Ghiasi
|
|
|
|
|
Mehdi Ghiasi wrote: Whether it creates performance problems?
No, it doesn't. Opening a connection to a server that you have already connected to is fast. You could write a small application to test and verify my statement
I are Troll
|
|
|
|
|
My server and sql server are different. (server of microsoft sql server is not localhost. it is sql.something.com)
So, isn't there any performance problem?
Regards.
Mehdi Ghiasi
|
|
|
|
|
Mehdi Ghiasi wrote: So, isn't there any performance problem?
That depends on the network-card, the cabling and the amount of sunspots.
Opening and closing a connection goes fast enough to simulate a file-system and open and close the connection on each operation that explorer requests. Simon's article on the ThreadPool explains how and why.
I are Troll
|
|
|
|
|
You would be much better off by using one connection and either returning multiple result sets from a stored procedure or using the MARS feature over a single connection.
onwards and upwards...
|
|
|
|
|
Where can I learn about this?!
Regards.
Mehdi Ghiasi
|
|
|
|
|
I heard about this website called google.com. Apparently it has been around for a while and is very easy to use, but you should check for yourself. That's www.google.com
Craigslist Troll: litaly@comcast.net
"I have a theory that the truth is never told during the nine-to-five hours. "
— Hunter S. Thompson
|
|
|
|
|
I'd have a read of this MSDN Article: Connection Pooling[^]
Also Connection pooling is turned on by default when using ADO.NET
Nagy Vilmos wrote: And eat bacon. Bacon's real important for 'puters.
modified on Thursday, May 5, 2011 5:01 PM
|
|
|
|