Viewing 15 posts - 8,551 through 8,565 (of 10,144 total)
What datatype is account number? That's where your problem is - it's either char or varchar and SQL Server tries to convert it to an int to add the 1....
April 7, 2009 at 8:21 am
jbuttery (4/7/2009)
Thanks for the replies guys. I'll try suggestions. I can do a SELECT, but not sure how to manipulate data and then insert.
Post the select, Flo will show you...
April 7, 2009 at 7:52 am
GSquared (4/7/2009)
On the same dataset, without updating to zero, the complex Case statement took 8:57 to run.
I'm missing something and can't figure out what it is! To simplify, here's a...
April 7, 2009 at 7:45 am
pwatson (4/7/2009)
April 7, 2009 at 7:33 am
jbuttery (4/7/2009)
Col0(Identity)Col1 Col2 Col3 ...
April 7, 2009 at 7:14 am
Looks like it needs a little more tweaking - first column is correct sequential order:
12.353.013.494.254.795.365.826.31
20.003.594.320.005.210.000.007.12
30.000.000.005.235.416.336.897.99
40.005.465.315.920.006.877.340.00
90.009.469.319.920.0010.8711.340.00
55.125.666.316.920.007.878.340.00
70.007.598.320.009.210.000.0011.12
80.000.000.009.239.4110.3310.8911.99
130.000.000.0013.2313.4114.3314.8915.99
It's mighty fast though, a little over one minute on this lappy.
April 7, 2009 at 7:10 am
INSERT INTO EmployeeRates (EmployeeId, Rate, RateDate)
SELECT EmployeeId, Rate, RateDate
FROM ...
Does the result set returned by the SELECT consist of all the rows (and no others) that you want to...
April 7, 2009 at 7:01 am
If you can construct a SELECT which returns the rows which you want to insert into the rates table, then you're almost there. Here's a start:
SELECT p.PositionId, e.EmployeeId, [new rate],...
April 7, 2009 at 6:51 am
A Little Help Please (4/7/2009)
Thanks!!!!!!!!!Works! 😀
and d.account not like 'null%' Are you sure this works?
April 7, 2009 at 4:50 am
Here's the obvious way, using a correlated subquery. Performance will drop dramatically with increasing rowcount.
-- make some sample data
DROP TABLE #ODS_GL_TRANSACTION_SUMM
CREATE TABLE #ODS_GL_TRANSACTION_SUMM (GL_ACCT_ID VARCHAR(16), FISCAL_YEAR_MONTH INT, FISCAL_YEAR INT, MDEBITS...
April 7, 2009 at 4:46 am
The query you're posted isn't viable. I reckon Markus has figured it out, but if not, here's some sample data which you could use to show the output you expect...
April 7, 2009 at 3:59 am
sandy (4/7/2009)
yeah i agree that this is sql2k5 forumbut thought can get some clue for sql2k but didnt fine even after puttin parenthises
Hi Sandy
If you are working with SQL2k then...
April 7, 2009 at 3:32 am
Christian Buettner (4/7/2009)
Very fancy stuff that you posted. Wasn't even aware you could do such fancy stuff in an ORDER BY:-).
Actually I did want to tell you that your...
April 7, 2009 at 3:08 am
tnolan (4/7/2009)
For SQL2008 support for parenthesis though...
SQL 2008 BOL for TOP - http://msdn.microsoft.com/en-us/library/ms189463.aspx
Parentheses that delimit expression in TOP is required in INSERT, UPDATE, MERGE, and DELETE statements....
April 7, 2009 at 2:11 am
tnolan (4/7/2009)
April 7, 2009 at 1:51 am
Viewing 15 posts - 8,551 through 8,565 (of 10,144 total)