answersLogoWhite

0

CREATE TABLE #T ( ID INT, [NAME] VARCHAR(50) ) INSERT #T SELECT 1, 'Row1' UNION SELECT 2, 'Row2' UNION SELECT 3, 'Row3' UNION SELECT 4, 'Row4' UNION SELECT 5, 'Row5' UNION SELECT 6, 'Row6' UNION SELECT 7, 'Row7' UNION SELECT 8, 'Row8' UNION SELECT 9, 'Row9' UNION SELECT 10, 'Row10' SELECT * FROM #T DECLARE @Values AS VARCHAR(8000) SELECT @Values = '' SELECT @Values = @Values + ISNULL([Name] + ', ', '') FROM #T IF LEN(@Values) > 0 SELECT @Values = LEFT(@VALUES, LEN(RTRIM(@VALUES)) - 1) --Remove trailing comma SELECT @Values AS CommaDelimitedResultSet DROP TABLE #T

User Avatar

Wiki User

17y ago

What else can I help you with?

Related Questions

What function should be used to add a column of numbers and return a single value?

The "SUM" function.


Which key enters data and makes te next cell in the column active?

Pressing the Return or Enter key, will move the cursor to the cell below the current one. You can actually change that in the settings to stay in the same cell or move up, left or right. Go to the Tools menu and then to Options and then to Edit and you will the option to change it there. The Tab key will move the cursor to the cell in the next column.


When was The Return of the Durutti Column created?

The Return of the Durutti Column was created in 1979.


How do you delete a hard return code in a Word Perfect document?

Go to, "View all characters," position the cursor before the Hard Return character, and press delete. Or, position the cursor after the hard return character and backspace.


How can I return a column header in Microsoft Excel from a range by finding the row searching down on the leftmost column and the column searching right on that column?

Not sure what you are asking, but you can get to a particular column by using the GOTO function (press F5 key). If this does not answer your question, please ask another question that is more specific to your needs.


Where is my home tab on my computer?

If you're in a word document, it is a key, that when pressed, will take you back to the beginning of the line that your cursor is on. If you're on a webpage, it will take you to the top of the webpage.


What do you push to get a hard return?

On your computer, you will push the Enter key to get a hard return. This will put the cursor on a new line.


You have 2 columns in excel column A has a list of 10000 user ids column B has 1000 random user ids from column A how do you match the user id in column a with the user id in column b?

The simplest way to do this is to use the VLOOKUP function. VLOOKUP($A1, $B$1:$B$1000, 1, 0) This will look up the value of cell A1 in the range B1:B1000. If it is found, it will return the value of the first column in the range (in this case there is only one column in the range). If the value is not found, it will return #N/A. You would need to use this function on every cell in the range A1:A10000 to see which ones match. I would insert a column before A:A and use the function there (just be sure to adjust your formula appropriately). Sorting will bring the matches to the top.


How do you EXCEL Trying To Link One Word In Column B To Input A Different Word In Column G For Example Column B Is A Product Name. Column G Is The Chemical Composition. When Ever The Word product Is I?

It looks as if you want to do a lookup - look up data in a table, in one column, and return the value next to it, in another column. The vlookup() function does just that.


What key moves the cursor to the next line in c program?

The return key.


How do you find the complement of numbers in java script?

function complement(num, base){ var result = 0, column = 0; if(base < 2) return null; while(num > 0){ digit = num % base;comp = base - 1 - digit;result += comp * Math.pow(base, column);column++;num -= digit;num /= base;} return result; }


How do you print a row and column headings on excel window?

to get column number, we can use =COLUMN(Reference) to get Row number, we can use =ROW(Reference) For example =COLUMN(A1) will return 1 and =ROW(A3) will return 3