Viewing 15 posts - 8,041 through 8,055 (of 8,731 total)
You shouldn't have concurrency problems with #Temp tables as they're exclussive by session.
http://msdn.microsoft.com/en-us/library/ms177399%28v=sql.105%29.aspx
June 14, 2013 at 10:03 am
The question is interesting but I do wonder why would someone would disable a clustered index?
June 14, 2013 at 9:08 am
You don't need to add an extra column, you can do it all by code
--If you have STARTDATE as varchar
SELECT substring(ANUM,4,10) + '_' + substring(BNUM,2,10) + '_' + REPLACE( SUBSTRING(...
June 14, 2013 at 9:01 am
With the DDL and sample data was easy to get a solution (even if you manage to have 30 hours days :-D).
It's not the only way, but it can do...
June 14, 2013 at 8:47 am
It's not that hard what you're trying to do and you can get help really fast. But to help you, we need more information about your tables and if possible,...
June 14, 2013 at 8:36 am
This is just a guess based on what you posted.
else
BEGIN
SELECT @ID1 = NULL,
@ID2...
June 13, 2013 at 2:00 pm
Some divide and conquer strategy might help, meaning to use temp tables or staging tables instead of massive union alls.
Without more details is hard to give an advise. Maybe you...
June 13, 2013 at 1:32 pm
Could you post DDL for both tables? Some comments on what the columns are could be useful.
Additionaly, you could use the system views to find any Primary keys or Foreign...
June 13, 2013 at 1:27 pm
I'm not sure what you're trying to do, I might need some expected results based on the data you provided. To get better help, you should post DDL and consumable...
June 13, 2013 at 1:15 pm
I just keep laughing with your post, but only because it's completely right and won't fit in here. 😀
We have multiple users using same login (at least is not sa...
June 13, 2013 at 12:34 pm
How about using a CASE statement to filter the years needed?
DECLARE @Something table
(
Years int,
SomeValue int
)
insert @Something(Years, SomeValue)
Values
(2000, 2)
,(2001, 4)
,(2002, 5)
,(2003, 3)
,(2004, 2)
SELECT SUM( SomeValue) SumOfAll, SUM( CASE WHEN...
June 13, 2013 at 12:25 pm
tshad (6/13/2013)
That was it.Not sure why I didn't realize this.
Thanks,
Tom
I'm glad I could help. 😉
June 13, 2013 at 11:37 am
Thanks Matthew,
We're currently working with bcp with xp_cmdshell, but might try bulk_insert yo avoid possible DBAs complaints when applying code into production. There are several things to learn, but fortunately...
June 13, 2013 at 11:01 am
It's easy, but you need to define which value of db.myTable.FieldValue do you want when multiple values are available.
June 13, 2013 at 9:16 am
Any ideas here? At least some votes. 😛
June 13, 2013 at 9:08 am
Viewing 15 posts - 8,041 through 8,055 (of 8,731 total)