Viewing 15 posts - 1,666 through 1,680 (of 3,544 total)
My first guess was
SELECT SUM(CAST(REPLACE(STUFF(a.A,LEN(a.A)-CHARINDEX(',',REVERSE(a.A))+1,1,'.'),',','') as float))
FROM (SELECT REPLACE(CASE WHEN CHARINDEX('-',A) > 0 THEN '-' ELSE '' END + REPLACE(A,'-',''),'.',',') AS [A] FROM [total]) a
But
what does...
Far away is close at hand in the images of elsewhere.
Anon.
January 17, 2007 at 3:31 am
Agree with Vladan ![]()
However the answer to your question is
Set @Qry='DECLARE mycurs CURSOR FOR SELECT ' + @col1 + ',' + @col2 +...
Far away is close at hand in the images of elsewhere.
Anon.
January 9, 2007 at 4:04 am
Providing you do not exceed 4000 chars try
DECLARE @sql nvarchar(4000)
SET @strSQL = ''
SELECT @sql = @sql + 'SELECT s.ShowID,sd.ContactName,sd.ContactEmail,' + [dataSource] + ' FROM show s INNER JOIN...
Far away is close at hand in the images of elsewhere.
Anon.
January 8, 2007 at 7:07 am
SELECT MIN([ID]) AS [ID], Value
FROM
GROUP BY Value
ORDER BY Value DESC
Far away is close at hand in the images of elsewhere.
Anon.
January 8, 2007 at 6:30 am
Notwithstanding the above try
SELECT dbo.fnFindPositionSupervisor((SELECT PositionID FROM Employee WHERE ID = 5))
Far away is close at hand in the images of elsewhere.
Anon.
January 3, 2007 at 6:50 am
Sorting is affected by collation, e.g.
Latin1_General_CI_AI is will give the results you posted
whereas SQL_Latin1_General_CP1_CI_AI will give (I assume) the desired results as in
select * from @tabla order by field collate SQL_Latin1_General_CP1_CI_AI
Far away is close at hand in the images of elsewhere.
Anon.
January 2, 2007 at 7:36 am
| ...because LIKE doesn't work with text data types... |
That is not correct, it will ![]()
Far away is close at hand in the images of elsewhere.
Anon.
December 22, 2006 at 5:05 am
| If you care about performance you must fix database design. |
Always ![]()
| It can, you just have to set up the table styles, and set each column style's visible property... |
Far away is close at hand in the images of elsewhere.
Anon.
December 18, 2006 at 8:47 am
You could try adding
AND COALESCE(column,column,column) IS NOT NULL
to the end of your query.
Just list the columns you want to check between the brackets.
Far away is close at hand in the images of elsewhere.
Anon.
December 18, 2006 at 7:24 am
Or
SELECT a., a.field1, COALESCE(b.field1, c.field1)
FROM [table1] a
LEFT JOIN [table2] b ON b. = a.
LEFT JOIN [table2] c ON c. LIKE LEFT(a.,2)+'%' AND c. != a.
Far away is close at hand in the images of elsewhere.
Anon.
December 18, 2006 at 7:18 am
Will not work if there are duplicate tef_bas_tar values
You will need to include a GROUP BY
or you could extract the value to a variable
DECLARE @maxdate datetime
SELECT @maxdate = x.tef_bas_tar...
Far away is close at hand in the images of elsewhere.
Anon.
December 13, 2006 at 6:46 am
You must size the varchar for PolicyNumber
varchar is the same as varchar(1) one character/byte
Far away is close at hand in the images of elsewhere.
Anon.
December 12, 2006 at 10:18 am
Change the datatype of PolicyNumber in the CREATE TABLE
CREATE TABLE #temp (Period char(6),PolicyNumber int)
to the datatype of your data
Far away is close at hand in the images of elsewhere.
Anon.
December 12, 2006 at 10:06 am
| What is the "Numbers" table? |
It is a generic table of numbers like
CREATE TABLE dbo.Numbers (Number int PRIMARY KEY...
Far away is close at hand in the images of elsewhere.
Anon.
December 12, 2006 at 9:04 am
Viewing 15 posts - 1,666 through 1,680 (of 3,544 total)