Viewing 15 posts - 3,601 through 3,615 (of 5,502 total)
I assume you're familiar with shredding those data into a relational (temp) table using XQuery. If not, please post back and we'll show you an example how to do it.
Once...
May 3, 2010 at 4:40 pm
Lynn Pettis (5/3/2010)
Precisely where I was going with this, but all three queries must have the same number of columns and data types (or nulls).
... and that's exactly the case...
May 3, 2010 at 1:18 pm
The following code would solve the example you provided, but as Lynn already suggested, posting your code would probably help us help you with the "real issue"...;-)
SELECT 'Header Record'
UNION ALL...
May 3, 2010 at 1:01 pm
It seems like you add the extra CR-LF within your trailer record statement. Hard to tell without actually seeing the code...
Probably something like
-- some code
+'
< trailer record > '
...
May 3, 2010 at 11:58 am
black.clouds.999 (5/3/2010)
Here is what I got from BOL :
CONTAINSTABLE ranking uses the following algorithm:
StatisticalWeight = Log2( ( 2 + IndexedRowCount ) / KeyRowCount )
Rank = min( MaxQueryRank, HitCount...
May 3, 2010 at 7:10 am
It's called CroosTab or Pivot.
For a CrossTab solution please see the related link in my signature. It will shortly describe the PIVOT syntax as well.
May 3, 2010 at 5:31 am
You actually search for an exact match of either the word "mountain" or "mounting". Therefore, you'll get two different result sets. You might want to search for "mount*".
For details, please...
May 3, 2010 at 5:28 am
kobyziv (5/2/2010)
Yeh - I see what you meanQuite true, quite true...
Tnx for the good eye.
You're very welcome! 😀
May 2, 2010 at 3:45 pm
Assume the following scenario:
You have a new room that's available since the hotel decided to refurniture the clothing store.
This room will never be available since it doesn't show up in...
May 2, 2010 at 3:37 pm
Change the SELECT clause to
SELECT COUNT(DISTINCT t.room_id)
FROM @tbl t
LEFT OUTER JOIN cte_blocked b ON t.room_id=b.room_id
WHERE b.room_id IS NULL
May 2, 2010 at 3:26 pm
First I would try to find the blocked rooms and second display the remaining:
Side note: please notice how I posted the sample data o make it easier to work on......
May 2, 2010 at 2:42 pm
I would use the "quirky update" (or 3-part-update):
DECLARE @tbl TABLE
(
Region CHAR(10),Col1 CHAR(1), Col2 CHAR(1),Col3 CHAR(1)
)
INSERT INTO @tbl
SELECT 'SOUTH','N','N','Y' UNION ALL
SELECT 'SOUTH','Y','N','N'
DECLARE @n CHAR(1)
SET @n='0'
UPDATE @tbl
SET
@n=col3=CASE WHEN @n='0' AND col3='N'...
April 30, 2010 at 2:29 pm
CirquedeSQLeil (4/30/2010)
Has anybody here ever tried setting their sa account password to contain emoticons? Or any sql logon password for that matter.
sa password =...
April 30, 2010 at 9:53 am
Viewing 15 posts - 3,601 through 3,615 (of 5,502 total)