Viewing 15 posts - 10,186 through 10,200 (of 13,460 total)
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...
Lowell
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 =...
Lowell
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...
Lowell
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
)...
Lowell
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...
Lowell
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...
Lowell
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...
Lowell
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...
Lowell
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...
Lowell
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...
Lowell
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...
Lowell
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,...
Lowell
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...
Lowell
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...
Lowell
December 21, 2009 at 7:30 pm
Joe-420121 (12/21/2009)
The following procedure is OK?1. Create Table [backup12212009] with BIGINT Indentity
2. using SSIS export data from old table to [backup12212009]
3. Delete old table
4. Rename backup12212009
Can do as above?
if there...
Lowell
December 21, 2009 at 1:01 pm
Viewing 15 posts - 10,186 through 10,200 (of 13,460 total)