Viewing 15 posts - 13,711 through 13,725 (of 14,953 total)
Something like this should do it:
CREATE TABLE #Tracks(
[DateTime] [datetime] NULL,
[Track_1] [bit] NULL,
...
May 13, 2008 at 1:15 pm
Per Books Online, the Null thing in result sets is intentional. Probably to make it easier to visually differentiate Null from a zero-length string.
I think your best option is...
May 13, 2008 at 12:53 pm
I don't think you can build the string in the OpenRowset command. Try building it as a string variable before, then use that.
May 13, 2008 at 12:45 pm
nKognito (5/13/2008)
May 13, 2008 at 12:41 pm
Yes, you can use Union All, or anything else that's normally valid in a view.
May 13, 2008 at 12:32 pm
P.S.: If you really want to use that function, you'll need to put it in your From clause, using CROSS APPLY, instead of in your Select clause. Inline functions...
May 13, 2008 at 12:29 pm
Don't use that particular function. Used correctly, it will get the job done, but there are better ways to do this.
Here's a sample that works much better:
select top 100001...
May 13, 2008 at 12:28 pm
The classic, direct way to do this is use four-part names in your From clause for the remote database tables.
Example: Three servers, 1 with the view and the table dbo.Table1,...
May 13, 2008 at 12:15 pm
There was recently an article on this site about how to do this kind of thing very efficiently.
May 13, 2008 at 11:57 am
(Your test data doesn't work as written, since you tried to insert the value 1 into your ID field twice, after defining it as the primary key.)
Yes, your tests are...
May 13, 2008 at 11:52 am
serge.laot (5/13/2008)
Yes, but this is not the problem.
Per your original post:
I have to remove leading and trailing spaces from
a nvarchar field (used as a UNIQUE INDEX) in a database.
I suggested...
May 13, 2008 at 11:45 am
Your right! (Of course.) I'm too used to functions in Where clauses giving index scans. Guess this is another of the exceptions.
May 13, 2008 at 11:31 am
Tom Garth (5/12/2008)
But I still don't understand what you mean about turning my statement around. Can you clarify that?
- GSquared
I actually was trying to say 'turn my poorly...
May 13, 2008 at 9:35 am
I haven't designed a query graphically in so many years that I'm afraid I really can't help you on this one. Sorry.
May 13, 2008 at 9:27 am
Viewing 15 posts - 13,711 through 13,725 (of 14,953 total)