Viewing 15 posts - 136 through 150 (of 926 total)
My question would be, why you want this behavior especially on the primary key which is having an Identity? Why you want to avoid gaps in a identity???
June 29, 2016 at 3:12 am
How about this :
/* ACTUAL TABLE */
DECLARE @Actual TABLE (ReportDate date , DatabaseName varchar(10), ReportID int , TotalSum bigint )
INSERT INTO @Actual
SELECT '2016-06-26', 'Test1' , 1, 150
UNION ALL
SELECT '2016-06-27',...
June 29, 2016 at 2:16 am
Its always better to share the query in text instead of a image it make things a lot easier for the folks.
Following will achieve the result:
SELECT
Zone, ItemCode, [Products], GrossWt
FROM
(
SELECT...
June 29, 2016 at 12:42 am
Well there can be many scenarios for example one possible case can be that you are running your package on the Db machine, and there is not enough memory for...
June 29, 2016 at 12:16 am
It would be wise to wait for your answer on your original thread. Instead of opening a new thread. Where u haven't mentioned any details.
Please refer to the following link...
June 29, 2016 at 12:04 am
Declare @Actual Table
(
ItemState varchar(10)
, Car varchar(10)
, Truck int
, Boats int
, Planes int
)
insert into @Actual
select 'old', 'volvo', 89, 65, 67 union all
select 'new', 'pinto', 102, 55, 12...
June 28, 2016 at 5:14 am
Well, the Clue is in you Sample data generation query. if you build your query according to that logic you will be able to get your desired output.
something like this:
WITH...
June 28, 2016 at 4:45 am
please read all the comments above your reply and also read this Jeff Moden -Forum Etiquette: How to post data/code on a forum to get the best help[/url]
and then reply....
June 28, 2016 at 4:22 am
BWFC (6/28/2016)
To do this:
CASE WHEN Quantity = 'TotalQ'
You need to take the quotes off 'TotalQ', like this:
CASE WHEN Quantity = TotalQ
This will not work as in when UNION is...
June 28, 2016 at 4:10 am
I have updated your query to avoid into error you are getting. following is the code
DECLARE @TBLNAME varchar(8000) = 'Employee'
DECLARE@SchemaName varchar(200) = 'dbo'
DECLARE @InsertColumnList nvarchar(max)
DECLARE @SelColumnList nvarchar(max)
DECLARE @INSERTSQLSTRING nvarchar(max)
DECLARE...
June 28, 2016 at 3:21 am
Well, you have already restricted SQL SERVER on 10 gb. which means u have 6 gb for OS and other thing.
Upon checking, I found that Maximum server memory set in...
June 28, 2016 at 2:20 am
Handy thing only if you remember it at that time 😛
Nice question Ben and thanks for sharing.
June 28, 2016 at 2:06 am
Viewing 15 posts - 136 through 150 (of 926 total)