Viewing 15 posts - 3,751 through 3,765 (of 5,504 total)
When we started with c.u.r.s.o.r. stuff I didn't notice how similar the handling is. Now, seeing the set based code, it becomes more obvious.
Therefore, I'd recommend the next step:
If you...
April 17, 2010 at 7:04 am
Ok, here's what I came up with:
I'm using a CTE again. The first one ("cte") is used to pivot the failed ConversionDataID's.
The second CTE ("cte_ri") pivot the inserted ConversionDataID's and...
April 17, 2010 at 6:55 am
You only have [FINAL_DATA_ENTRY].[DBO].Journal in your FROM clause. You need to join it to [FINAL_DATA_ENTRY].[DBO].[TRADETABLE].
I don't know the join type but something like
INSERT INTO Tradetable (Journal_No)
SELECT Journal.JournalNo
FROM ...
April 17, 2010 at 5:19 am
Thank you for the update.
It's always nice to have someone posting an update to his question even though the issue is not completely resolved (yet).
April 16, 2010 at 5:52 pm
Change
PARTITION BY name
to PARTITION BY id,name
to get the cities numbered for each id.
Should help a little... 😉
April 16, 2010 at 5:49 pm
gregory.anderson (4/16/2010)
April 16, 2010 at 5:44 pm
All I can think of is to use the undocumented sp_foreachtable (google for details) which really is looping through the tables.
I'm not sure though, if this database design really is...
April 16, 2010 at 3:50 pm
I would look at it the other way around:
I would update the columns that failed based on the validity check of the "previous" permits to a value other than 0...
April 16, 2010 at 3:33 pm
Did you try the steps suggested in BOL (BooksOnline, the SQL Server help system)? Especially the steps/views described in section "troubleshooting [SQL Server], Database Mail"?
April 16, 2010 at 2:52 pm
george.greiner (4/16/2010)
April 16, 2010 at 2:26 pm
Did you notice that there were almost 50 people reading your post and actually moved on?
But as soon as there are ready to use sample data available, you already have...
April 16, 2010 at 2:08 pm
gregory.anderson (4/16/2010)
It might be required to catch the [PWDPermitConversionDataID] values and the column that failed for the rows holding bad values (using the OUTPUT clause applied to the error checking...
April 16, 2010 at 2:00 pm
Something like this? I'm not sure if it will meet your requirement but it should get you started...
Side note: please notice how I did the setup of DDL and sample...
April 16, 2010 at 1:39 pm
Would you mind providing a sample Excel file we can use (including the OPENROWSET statement you're using) and your expected output based on that sample data?
Also, would you mind...
April 16, 2010 at 1:25 pm
gregory.anderson (4/16/2010)
April 16, 2010 at 1:15 pm
Viewing 15 posts - 3,751 through 3,765 (of 5,504 total)