Viewing 15 posts - 166 through 180 (of 192 total)
Ah, it's a text column.
I'm sure you know this but I want to double check. Are you running sql 2005 (and converting to VARCHAR(max)? If you are not, you may...
November 1, 2006 at 11:10 am
Just for clarification, the carriage return is in the data that you are exporting to a text file?
If that is the case, you could probably do this:
SELECT REPLACE(REPLACE(Column,CHAR(10),''),CHAR(13),'') as Column
FROM...
November 1, 2006 at 9:05 am
Hi Michael,
A self-join is where a table is joined to itself for recursive or higherarchial operations (such as concatenating values from different rows).
An equi-join is basically where the join operator...
November 1, 2006 at 8:02 am
Thanks Jeff, Matti and John for correcting me and clearing up my knowledge of Temp Tables/table variables. I'm glad Hector got a sound response.
October 27, 2006 at 9:48 am
For what it's worth,
This should also work (and your variable contents will be preserved):
DECLARE @idStart INT DECLARE @hospId VARCHAR(4) --(code to assign @idStart and @hospId values…) DECLARE @stmt VARCHAR(200)
October 27, 2006 at 9:34 am
Here is a good article on table variables and temporary tables. From reading this article, it seems I may be wrong about large table variables being converted into temporary tables....
October 26, 2006 at 10:57 am
For many records (registers), a temporary table is recommended. The reason for this is twofold. First, as you pointed out, you can use indexes*. Second, when your table variable gets...
October 26, 2006 at 8:40 am
Depending on how you declare a cursor, they can cause undesired locking, the can strain your tempdb, I have known cursors to crash, but the biggest reason to avoid cursors...
October 25, 2006 at 5:53 pm
The code I put up is split into two blocks. The first block create a temp table and inserts a few values, and the second block does a 'fill down'...
October 25, 2006 at 3:37 pm
Ouch! I guess next time I should get more information on how a solution might be used before posting a response!
Interesting solutions all around, I thought. Very slick guys!
October 24, 2006 at 11:34 pm
How about something like this:
CREATE TABLE #t1 ( num VARCHAR(30), Location VARCHAR(30) ) INSERT INTO #t1 (num, location) VALUES('32764000021707'
October 23, 2006 at 11:03 am
Am I correct in thinking the other columns would be blank at that point?
October 23, 2006 at 10:14 am
I guess there is an online example here:http://www.simple-talk.com/prettifier/
October 20, 2006 at 12:18 pm
Check out Simple-talk's SQL prettifier on http://www.simple-talk.com/sql/sql-tools/download-sql-prettifier/ It's very cool!
it's basically a SQL proc that generates html. The only downside is the proc you posted is too wide and...
October 20, 2006 at 12:14 pm
It might be worth changing your settings in QA (this will help)
Tools->Options->Editor
Check the Save tabs as spaces box
October 20, 2006 at 11:46 am
Viewing 15 posts - 166 through 180 (of 192 total)