Viewing 15 posts - 3,601 through 3,615 (of 5,504 total)
Most definitely, there is no c.u.r.s.o.r. required.
The solutions depend on your data structure, which is unknown to us (so far). So please help us help you.
If you would provide...
May 4, 2010 at 10:53 am
Did you actually read the CrossTab article I pointed you at? It will answer most of your questions ,except for the variable number of columns.
Once you understood the CroosTab concept...
May 4, 2010 at 10:24 am
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
Viewing 15 posts - 3,601 through 3,615 (of 5,504 total)