Viewing 15 posts - 8,356 through 8,370 (of 8,731 total)
Are you sure that works?
For me it has errors. There's no such thing as "DELETE field FROM Table" as it will delete the entire row. And AFAIK you can't use...
September 26, 2012 at 7:23 am
I like the possibilities that rCTEs give us, but I also believe that sometimes the simplest way is the best way to go.
I'm glad I could help.
September 26, 2012 at 7:16 am
If you want something dynamic, you will need dynamic sql code.
Another way to do it would be concatenating the fields (up to 19 with your current length)
select item
from TestTable
cross apply...
September 25, 2012 at 2:16 pm
This is a repeated thread.
Original thread is in here http://www.sqlservercentral.com/Forums/Topic1363791-391-1.aspx
September 25, 2012 at 1:59 pm
I think I figured it out.
If you analyze the data it's easier to watch what you're trying to do. Thanks for DDL and sample data.
SELECT articletype, SUM( freight) FROM(
SELECT...
September 25, 2012 at 1:42 pm
I know it could be a bad solution, and maybe you had tought about it.
But since the rCTE is not scaling well (and it sure won't) why don't you use...
September 25, 2012 at 11:26 am
yuvipoy (9/25/2012)
As i have stated early [Quote]Inserting the data externally not from the database itself. [/Quote] my aim is not inserting from the database i need to...
September 25, 2012 at 9:10 am
yuvipoy (9/25/2012)
INSERT INTO test(col1, col2) VALUES
( @param1, @param2),
( @param1, @param2),
( @param1, @param2),
( @param1,...
September 25, 2012 at 8:36 am
Mark-101232 (9/25/2012)
Luis Cazares (9/25/2012)
SELECT SUBSTRING(@s,t2.number,t1.number)
FROM master.dbo.spt_values t1
INNER JOIN master.dbo.spt_values t2 ON t2.type='P' AND t2.number BETWEEN 1...
September 25, 2012 at 8:17 am
I made a different adjustment and seems easier to read (at least for me :-D)
SELECT SUBSTRING(@s,t2.number,t1.number)
FROM master.dbo.spt_values t1
INNER JOIN master.dbo.spt_values t2 ON t2.type='P' AND t2.number BETWEEN 1 AND LEN(@s)
WHERE...
September 25, 2012 at 8:07 am
What I was really hoping to see is how the final statement looks when you execute it.
It's different if it looks like this
INSERT INTO test(col1, col2) VALUES( @param1, @param2)
INSERT INTO...
September 25, 2012 at 7:50 am
Are you just trying to measure performance in SQL Server?
Most of the people here won't take the approach you're using. I'm not sure what is completely your goal.
If you're...
September 25, 2012 at 7:23 am
I don't have anything to test with, but I believe this could be better.
However, the problem is that it's still using a cartesian product to obtain the result.
SELECT TAB1.SalesOrderId AS...
September 24, 2012 at 12:37 pm
You'll have better performance if you change the following statement
WHERE SD.Code IS NOT NULL AND RTRIM(LTRIM(SD.Code ))<>''
with
WHERE SD.Code <> ''
The results are the same and you can test them if...
September 24, 2012 at 8:26 am
I can see that you're new in here. I really would like to help you but there's nothing I can't do unless you give me something to work with. I...
September 21, 2012 at 2:52 pm
Viewing 15 posts - 8,356 through 8,370 (of 8,731 total)