Viewing 15 posts - 6,571 through 6,585 (of 8,731 total)
Two solutions come to my mind. The first one assumes you don't have duplicate values for Resourcekey.
INSERT #Resource (Resourcekey)
SELECT Resourcekey
FROM #Base_Resource
INSERT #Resource_Trans (StringId, value)
SELECT r.StringId, b.value
FROM #Base_Resource b
JOIN #Resource r...
April 9, 2014 at 12:15 pm
yuvipoy (4/9/2014)
Lynn Pettis (4/9/2014)
Simple, don't use NOLOCK.
What is the cause of the problem ?
I have been using this statement for nearly 6 years in prodution i did not get any...
April 9, 2014 at 8:55 am
I'll try to explain the query. I already updated my previous post to add comments and remove an unnecesary column.
The first part is a recursive query that will add a...
April 8, 2014 at 4:57 pm
There are some improvements that can be done but you need to help us first. To get better answers, you should follow the advices on this article: http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
You should avoid...
April 8, 2014 at 1:40 pm
There's a Books section[/url] in this site. You should take a look at it, maybe you can find something interesting.
April 8, 2014 at 1:01 pm
Eirikur Eiriksson (4/8/2014)
You should look into linked server, check this out😎
It could help in other cases, but I'm not sure that it's the best option if you're trying to copy...
April 8, 2014 at 12:12 pm
Would something like this help you?
SELECT ssn
,repeatedvalues = STUFF(( SELECT DISTINCT '; ' + name + '-' + CAST( number AS varchar(20))
FROM @tmp x
WHERE x.ssn = t.ssn
FOR XML PATH('')), 1,...
April 8, 2014 at 12:10 pm
Maybe you didn't play enough with the ceiling function. 😉
DECLARE @num numeric(10, 8) = 83.00381433 ;
SELECT CEILING( @num * 100000) / 100000;
April 8, 2014 at 11:59 am
Since you're correcting this code, why don't we make it simpler and faster?
WITH UnloadDates AS(
SELECT ShipmentID,
MIN(starttime) StartTime,
MAX(Endtime) EndTime
FROM tblInvoice O
WHERE O.startTime IS NOT NULL
AND O.EndTime IS NOT NULL
AND...
April 8, 2014 at 11:51 am
Bulk insert is used to import data from a flat file (txt, csv or anything with that structure).
If you generate the file, you could use it.
You could as well use...
April 8, 2014 at 9:57 am
I was working on a cross tabs solution but Sean beat me to do it.
I just wanted to point out that it should out perform the previous solutions because it...
April 8, 2014 at 8:40 am
sqlbuddy123 (4/7/2014)
hboswell (4/7/2014)
sqlbuddy123 (4/7/2014)
hboswell (3/21/2014)
April 7, 2014 at 3:33 pm
This might become confusing, but I believe that it could help you solve your problem.
Try to understand it and post any questions that you have.
WITH Limits AS(
SELECT tktnum,
MAX( seqnum) Maxseq,
CAST(...
April 7, 2014 at 2:18 pm
You might want to take a look at these articles:
http://www.sqlservercentral.com/articles/T-SQL/63681/
http://www.sqlservercentral.com/articles/Crosstab/65048/
The first one covers the basics and the second one covers a dynamic approach that you might need.
April 7, 2014 at 1:58 pm
How would you know that it's MIA-ATL-MIA instead of ATL-MIA-ATL? Remember that there's no default order on sql server.
April 7, 2014 at 12:39 pm
Viewing 15 posts - 6,571 through 6,585 (of 8,731 total)