Viewing 15 posts - 49,951 through 49,965 (of 59,099 total)
catriona_brown (6/12/2008)
I figured it out. An no still not an exam question.
C'mon... don't be shy... everyone else posted their solution... it's your turn... 🙂
--Jeff Moden
Change is inevitable... Change for the better is not.
June 17, 2008 at 8:46 pm
Get something that's capable of opening the file in the "binary" mode... I'm betting that the end of line character is neither a carriage return (0d in hex) nor a...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 17, 2008 at 8:39 pm
So... are you required to use the ZipCode/State view? If not, call the tables directly, instead. Also, Views of Views generally suck the life out of code... avoid...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 17, 2008 at 8:20 pm
jcrawf02 (6/17/2008)
--Jeff Moden
Change is inevitable... Change for the better is not.
June 17, 2008 at 8:14 pm
OpenRowSet does this very nicely... and with a little help from our friend "Dirtree", you can make it "auto-magic". Lemme see if I can find my sample script for...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 17, 2008 at 8:07 pm
Matt Miller (6/17/2008)
If the two tables weren't created in exactly the same way, you could easily end up with column mismatches.
Good point... but look again...
insert into t
select *...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 17, 2008 at 8:03 pm
Matt Miller (6/17/2008)
Take a look at this article - will help describe the technique....
Man... you're right... you have been recommending this and the Tally table articles a lot! I'm...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 17, 2008 at 7:55 pm
Dupe post... please continue at the following so all the answers stay in the same place...
http://www.sqlservercentral.com/Forums/Topic518657-149-1.aspx
--Jeff Moden
Change is inevitable... Change for the better is not.
June 17, 2008 at 7:52 pm
real_cals (6/17/2008)
Paraphrasing Neal Stephenson - "A well built machine-gun will not help you change a flat tyre".
No... but I'll bet you can coax someone into doing for you with it....
--Jeff Moden
Change is inevitable... Change for the better is not.
June 17, 2008 at 7:47 pm
bitbucket (6/15/2008)
Knowing Jeff Moden's skill I strongly recommend you follow his suggestion on the use of a Tally Table.
Sorry... I almost missed this entirely... thanks for the great compliment! 🙂
--Jeff Moden
Change is inevitable... Change for the better is not.
June 17, 2008 at 7:43 pm
ahmeterispaha (6/17/2008)
I guess I'm looking for feedback on how people manage this kind of customization in a tightly controlled ERP environment.Thanks again.
Ahmet
As some others have already pointed out, including yourself,...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 17, 2008 at 7:40 pm
ahmeterispaha (6/17/2008)
Can someone post a code sample that shows a query working with two databases simultaneously?
Sure...
SELECT t1.*, t2.*
FROM DatabaseOne.dbo.SomeTable1 t1
INNER JOIN DatabaseTwo.dbo.SomeTable2 t2
...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 17, 2008 at 7:30 pm
Just in case anyone is having a doubt...
SELECT d.Amount, ROUND(d.Amount/5, 2)*5 AS Rounded
FROM (SELECT N/100.0 AS Amount FROM TALLY)d
Nicely done, Sergiy. Ya just gotta love...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 17, 2008 at 7:22 pm
Heh... c'mon folks... if you know one of the images is correct, who cares about the other one? It takes longer to see if they're the same or not...
--Jeff Moden
Change is inevitable... Change for the better is not.
June 17, 2008 at 7:08 pm
david (6/17/2008)
Anyone have an easy solution?
Yes I do... please see the following... tells you not only how to do it, but how to do it right... 😀
http://www.sqlservercentral.com/articles/Test+Data/61572/
--Jeff Moden
Change is inevitable... Change for the better is not.
June 17, 2008 at 7:01 pm
Viewing 15 posts - 49,951 through 49,965 (of 59,099 total)