Viewing 15 posts - 8,176 through 8,190 (of 8,731 total)
Your requirement is not clear. How do you determine which value should you enter?
You should post DDL and sample data in a consumable format so we don't waste time on...
January 29, 2013 at 8:01 am
Jason-299789 (1/29/2013)
This URL may explain it better http://sqlinthewild.co.za/index.php/2009/08/17/exists-vs-in/
I believe that this article explains better this situation
http://sqlinthewild.co.za/index.php/2010/02/18/not-exists-vs-not-in/
The article is really interesting and worth reading but the conclusion is this:
"Most importantly, NOT...
January 29, 2013 at 7:34 am
How about thinking you need the first 11 but you need to discard the first 9. How do you discard rows? EXCEPT, NOT IN, NOT EXISTS, OUTER JOIN?
January 28, 2013 at 1:36 pm
SQL_Enthusiast (1/28/2013)
You know what, never mind. I'll go somewhere else for my answer. Thanks
Really bad attitude.
January 28, 2013 at 12:58 pm
Something like this?
CREATE TABLE CHG_ITEM(
CHARGE_BATCH_ID int,
CHARGE_ITEM_IDint,
REVENUE_SITE_IDint)
INSERT INTO CHG_ITEM(CHARGE_BATCH_ID, CHARGE_ITEM_ID, REVENUE_SITE_ID)
VALUES
(1, 15929, 1000),
(1, 16930, 1000),
(10, 17186, 2000),
(10, 18187, 5000),
(10, 22188,2000),
(22,...
January 28, 2013 at 12:57 pm
Assuming you have a Tally table you can try this:
DECLARE @Start_year int, @End_Year int;
SET @Start_Year = 2011 ;
SET @End_Year = 2013;
SELECT STUFF((
SELECT '/' + RIGHT( CAST( N AS varchar(4)),...
January 25, 2013 at 12:19 pm
Using your examples:
( 'Ab','BC',CD') are non-Unicode strings (char/varchar)
(N'Ab',N'BC',N'CD') are Unicode strings (nchar/nvarchar)
The datatypes are differents and the clearest example of it is that a char(1) uses 1byte and nchar(1) uses...
January 18, 2013 at 1:38 pm
2 word: Implicit conversion
SQL Server needs to do implicit conversions that may affect the query performance.
January 18, 2013 at 1:21 pm
Daniel Bowlin (1/11/2013)
Although if your lead developer is handcuffing you so strictly, I have to wonder why you are using any MS products like SSRS.
That's the same question I ask...
January 11, 2013 at 10:58 am
Would it be a problem with leading spaces (instead of trailing spaces)? Maybe hard spaces or tabs.
January 2, 2013 at 8:51 am
:O) (12/31/2012)
December 31, 2012 at 10:07 am
Bhuvnesh (12/31/2012)
December 31, 2012 at 7:22 am
As others have said, neither CURSORS or WHILE LOOPS are effective. Here's a better solution that might help with this problem. I'm just publishing this to avoid that others would...
December 28, 2012 at 11:51 am
Now, that makes sense. 😉
December 6, 2012 at 6:04 pm
Viewing 15 posts - 8,176 through 8,190 (of 8,731 total)