Viewing 15 posts - 1,666 through 1,680 (of 2,038 total)
Your solution is just the thing I was tauten for. Maybe my solution was faster written but your is faster executed :-). I know I can learn from you so...
March 30, 2009 at 3:13 pm
Thanks Flo - that's what I get for typing this stuff out blindly. Good catch...
You're welcome! 🙂
Greets
King of typos...
March 30, 2009 at 2:48 pm
For SQL Server 2000 this should work (replaces step 2):
DECLARE @Num int;
SET @Num = @TopNum;
SET ROWCOUNT @Num
SELECT * FROM dbo.YourTable;
SET ROWCOUNT 0
Not as proper as TOP(x) but works.
Greets
Flo
March 30, 2009 at 2:46 pm
Completely confirm Bob. It took about fife minutes to investigate your table structure and transform your posted data to a usable format...
Here my solution:
DECLARE @mytab TABLE
(
acc_no VARCHAR(100),...
March 30, 2009 at 2:41 pm
Jeffrey Williams (3/30/2009)
1) Create a parameter for your report - let's call it TopNum
2) In your Dataset, do the following:
DECLARE @Num int;
SET @Num =...
March 30, 2009 at 2:21 pm
Hi
First you have to join the id in table t3 with the id in t2. Now you have to join the name of t2 with the name of t1 and...
March 30, 2009 at 1:56 pm
Hi Bruce
I have had a similar business case. I used the @@SPID for a lookup into the system view dm_exec_sessions.
You can use the session_id and the login_time as a unique...
March 30, 2009 at 1:44 pm
Sure you can write a huge CASE WHEN block in a view or procedure/function which translates the days to your format but guideline says do any formatting in your client...
March 30, 2009 at 1:22 pm
Hi
You can select either the item_id or count it. If you need the item_id. If you don't need the item_id you can GROUP BY the other columns and add a...
March 30, 2009 at 1:14 pm
Have a look to the queries of your application:
* Does it select objects from same type one by one?
* Does it use server side cursors?
* Does it select too much...
March 30, 2009 at 1:09 pm
Hi
So it's no SQL problem but a problem of your client connection. Set following option before executing:
SET ARITHABORT ON
Found it here:http://social.msdn.microsoft.com/Forums/en-US/transactsql/thread/a874b4b2-05ad-4066-9811-30939188d695/
Greets
Flo
March 30, 2009 at 12:25 pm
Hi
I don't understand completely. You wrote that you have the XML within a NTEXT. So it must be within a table. It's not possible to declare an NTEXT variable.
If your...
March 30, 2009 at 11:07 am
wjmsdn (3/30/2009)
As an old c++ guy, i learned that declarations should be
outside a controlling statement when possible
Otherwise, you are allocating and deallocating those items...
March 30, 2009 at 10:45 am
Robert (3/30/2009)
A small typo in code:
Hi Robert
Thanks for correction!! I will fix it this evening (the article editor does not work here...).
Greets
Flo
March 30, 2009 at 10:42 am
My approach would be alike Ross:
Your product table without any bits. A second table with the product-id and one row for each set bit (setting).
To get products with a specific...
March 30, 2009 at 4:28 am
Viewing 15 posts - 1,666 through 1,680 (of 2,038 total)