Viewing 15 posts - 61 through 75 (of 79 total)
There's an example in this discussion:
http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=23&messageid=131765
October 21, 2004 at 7:54 pm
I use a UDF to do that concatenating, also. Very useful when a bunch of different queries want to concatenate the same table column. Easy for end users and novices...
October 21, 2004 at 7:50 pm
They're not variables. It looks like the procedure returns two resultsets. The first resultset is one row and three columns with the CurrentPage, TotalPages, TotalRows. You need that info to...
October 20, 2004 at 7:59 pm
You need the table to have a unique key column, such as the identity column below.
create table a (i varchar(1), d varchar(10), k int identity)
insert a (i, d) values ('x',...
October 20, 2004 at 1:49 pm
You're using receiptid to generate receiptid. Looks fishy.
A trigger on insert is a way to generate the receiptid. However, the only true way to get the trigger-generated receiptid for the...
October 20, 2004 at 12:50 pm
I've also noticed that an ORDER BY list with many columns also causes aggregate concatenation to be unordered. When I reduced the number of columns in the ORDER BY, aggregate...
October 20, 2004 at 9:56 am
Best to do that type of work using a computer language that's good for parsing text. TSQL is not one of those languages.
Vyas talks about many methods to parse comma...
October 14, 2004 at 1:06 pm
The only thing you can do with a parameter of datatype text is to put it in a table.
I recommend putting the data to a table temporarily. Create...
October 14, 2004 at 12:05 pm
Use derived table and "not exists(...)".
SELECT Dept, OPID, [Count]
FROM (
SELECT p.dept as Dept, f.value as OPID, count(*) as [Count]
FROM policy as p
INNER JOIN FLDS as f
ON f.[value] = p.csr and...
October 14, 2004 at 10:14 am
It does seem that the entire remote table is being transfered in order to pick the one row.
What do you mean by setting the "collation option". Did you turn on...
October 13, 2004 at 9:05 am
No.
INSERT into a table with an identity column, or use the identity() function with the INTO clause to create a table with an identity column.
Better still, let...
October 13, 2004 at 8:48 am
Instead of using subquery to get max(ID), try using "SELECT TOP 1 ... ORDER BY ID descending".
Instead of using 3 subqueries to get the avg(x), try using derived table that...
October 13, 2004 at 8:34 am
It seems to me that Paul is not talking about duplicate rows that could be solved with DISTINCT or GROUP BY. Paul is talking about multiple rows with the same...
October 7, 2004 at 9:23 am
Do you need the trailer row to be the last row? If so, you need an ORDER BY clause and column(s) to sort by.
April 25, 2004 at 7:56 pm
"@retItems=" seems misplaced. Don't know what you're trying to do. Either have all result columns put to variables, or none.
April 25, 2004 at 7:52 pm
Viewing 15 posts - 61 through 75 (of 79 total)