Viewing 15 posts - 406 through 420 (of 621 total)
I don't have 2005, so I could not try UNPIVOT, but it sure looks a lot better than my solution. Anyhow, I made a temp table with the column...
October 8, 2008 at 8:19 am
karthikeyan (10/7/2008)
Please find the correct one.
Karthik. Dude. Listen, its still not right. Your table has 30 columns, and your sample data only has 25 values. I...
October 7, 2008 at 12:18 pm
Karthik, both your table structure and sample data have errors, at least when I copy and paste. You are trying to create a composite key on a nullable column,...
October 7, 2008 at 6:23 am
Karthik, I am talking about sample table structure and sample data with create and insert statements, so anyone trying to help does not have to guess, or spend time making...
October 6, 2008 at 8:27 am
Karthik, this looks like a prime candidate for a crosstab, but without sample data...
October 6, 2008 at 7:08 am
Garadin, your solution is exactly what I need to do. Thank you so much for your quick effort.
October 3, 2008 at 8:03 am
Greetings all. I posted this a couple of weeks ago, and did not get any bites, and subsequently it went away anyway, but now the request has come again,...
October 3, 2008 at 6:36 am
JJ, can you post your table structure with some sample data?
September 17, 2008 at 12:50 pm
Yep, I finally got it. I was thinking that it would only work if the last digit were off by one, but I see now it will work regardless...
September 17, 2008 at 11:55 am
sweetdeal42, you are explicitly naming five columns in your insert statement,
insert into ##CreditCard (CCID, CardType, DiscRate, MidQual, NonQual)
but you are only selecting two. You need to either restrict...
September 17, 2008 at 10:49 am
What is someone fat fingers the first digit instead of the last, will it still work?
September 17, 2008 at 10:28 am
Arthur.Lorenzini (9/17/2008)
I think that will work except for a small issue with a conversion.
Arthur, I think there is another issue. If you have a customer id, say 600, showing...
September 17, 2008 at 9:49 am
Barry, what is the significance of the numbers in the IN group? If the ids are random, then couldn't the possibilies be endless? In light of the fact...
September 17, 2008 at 9:44 am
Arthur, try this
CREATE TABLE #test
(
CustID int,
id int
)
INSERT INTO #test
SELECT 500,1234 UNION ALL
SELECT 500,1234 UNION ALL
SELECT 600,1233 UNION ALL
SELECT 600,1232 UNION ALL
SELECT 700,1000 UNION ALL
SELECT 700,1000 UNION ALL
SELECT 800,2001 UNION ALL
SELECT...
September 17, 2008 at 7:53 am
One thing to note. You need to make sure there is a space between the end of each line and the double quote before the & _. Else...
September 16, 2008 at 11:17 am
Viewing 15 posts - 406 through 420 (of 621 total)