Viewing 15 posts - 10,186 through 10,200 (of 13,461 total)
manojkanoi (12/27/2009)
December 27, 2009 at 3:11 pm
ahh, SQL and oracle TIMESTAMPS are not the same thing.
in Oracle, the TIMESTAMP data type is a very granular datetime field.
SQL> SELECT CAST(date1 AS TIMESTAMP) "Date" FROM t;
Date
-----------------------------------------------------
20-JUN-03 04.55.14.000000 PM
26-JUN-03...
December 27, 2009 at 12:40 pm
stating the obvious, do a backup, test this on a development server, ask questions, confirm it is close to what you are after.
--update the whole table
UPDATE transactions
SET matchingid =...
December 27, 2009 at 12:08 pm
mano you are not taking advantage of the power of SQL's set based operations;
you could do your update, to all millions of records, in a single statement....even better, it would...
December 27, 2009 at 11:58 am
as long as you know how the data will be ordered, row_number() function is probably the best solution:
SELECT * FROM
(
SELECT row_number() over (ORDER BY YourColumn) As RW,
* from YourTable
)...
December 26, 2009 at 8:06 am
here you go Roger; a project like this has to use the metadata to determine which columns to query, so using a cursor in this case is fine;
the logic is...
December 26, 2009 at 7:37 am
could it be you do not have a regular backup schedule in place in that location, and that is causing your unnecessary growth?
the ldf is the log file. if your...
December 25, 2009 at 7:51 am
if there is a trigger on your destination table, @@identity could return the identity from that other table instead of the one you inserted; that's why you need to use...
December 23, 2009 at 11:51 am
it's a tricky problem; if you give me a username and password, I can use any application i can get my grubby fingers on to connect with.
the easiest solution is...
December 23, 2009 at 11:06 am
I think the key is the expected output; if you can accept a single column with a string which contains the values, or do you still have to have up...
December 23, 2009 at 8:44 am
a key question is are their foreign keys tied to the current identitiy?
if there are, it makes it a lot harder, since you'd have to update those child foreign keys...
December 23, 2009 at 8:13 am
i'm thinking some overnight import/update process is failing; there's no "Activity record" or "Account Owner" as far as SQL is concerned; it really jumps out to me that some unattended...
December 23, 2009 at 7:43 am
looks like a business rule error in your application, not anything from SQL itself; I'd guess you have an app that is writing to the error log, instead of sya,...
December 23, 2009 at 7:23 am
i've seen this requirement before:
check out the Check Constraint example i made here, aptly named "ThereCanBeOnlyOne"
http://www.sqlservercentral.com/Forums/Topic789104-145-1.aspx
it uses a check constraint to make sure zero or one of the columns has...
December 23, 2009 at 6:46 am
a default sets the value of the column, so common sense would make you think of columns that cannot have the same value more than once.
i'd test it to be...
December 21, 2009 at 7:30 pm
Viewing 15 posts - 10,186 through 10,200 (of 13,461 total)