Viewing 15 posts - 3,376 through 3,390 (of 5,590 total)
The table name can't be a variable in the CREATE TABLE statement, so you'll have to use dynamic sql:
DECLARE @sql varchar(max);
SET @sql = 'CREATE TABLE dbo.' + QuoteName(convert(char(10),'2010-09-02 14:56:09.840',101)) +...
September 2, 2010 at 1:13 pm
Just to ensure there's no confusion, NUMERIC(19,4) and DECIMAL(19,4) are the same... or as BOL states it
numeric is functionally equivalent to decimal.
September 2, 2010 at 1:02 pm
loki1049 (9/2/2010)
September 2, 2010 at 12:55 pm
mfowler12 (9/2/2010)
There are over 6800 records in the database, will this code cause any problems with the other records?
This code will:
1. update any records in the main table that match...
September 2, 2010 at 12:44 pm
The money datatype is essentially numeric(19,4). To add a fifth decimal place, you'll have to change this to numeric(20,5).
For example:
if object_id('tempdb..#temp') IS NOT NULL DROP TABLE #temp;
CREATE TABLE #temp (MoneyField...
September 2, 2010 at 12:36 pm
If you have SSRS available, I'd set up a report that is based off of the login, and have each user schedule to run it.
If you want to do this...
September 2, 2010 at 12:17 pm
SELECT st.name, sip.rows
FROM sys.system_internals_partitions sip
JOIN sys.tables st ON st.object_id = sip.object_id
ORDER BY st.name
September 2, 2010 at 12:11 pm
CirquedeSQLeil (9/2/2010)
Ok. What if you need to do this after it rolls to production?
Just drop the tables, add them, add the data, add the FKs. 😛 😉 :w00t:
September 2, 2010 at 12:02 pm
Steve Jones - Editor (9/2/2010)
Noooooooo, not partial posts. There can be enough nonsense in this thread already.
Steve Jones - Editor (9/2/2010)
Wh t bo t t s as a p...
September 2, 2010 at 11:58 am
Alvin Ramard (9/2/2010)
Make that 25.3/day
DECLARE @PostCount AS INT
SET @PostCount = 18052
SELECT CONVERT(NUMERIC(5,1), (20000.0 - @PostCount)/ DATEDIFF(DAY, GETDATE(), '2010-11-18'))
Looks like we made today's quote, just figuring out how to do that...
September 2, 2010 at 11:56 am
loki1049 (9/2/2010)
September 2, 2010 at 11:46 am
I don't think you're doing anything wrong. However, it sounds like the last table has a 1>Many relationship, and there are multiple records matching for the join condition.
You either need...
September 2, 2010 at 11:41 am
This should handle your insert. Make sure you test it in a transaction first, take appropriate backups, etc.
-- update the existing entries based on the ID column.
UPDATE survey
...
September 2, 2010 at 11:30 am
mfowler12 (9/2/2010)
WayneS (9/2/2010)
mfowler12 (9/2/2010)
So, how do I link the tables so that the data...
September 2, 2010 at 10:49 am
Viewing 15 posts - 3,376 through 3,390 (of 5,590 total)