Viewing 15 posts - 18,046 through 18,060 (of 18,926 total)
Can someone explain why the first query I posted didn't work in this context?? I can't reproduce this behavior on my server.
April 25, 2005 at 1:57 pm
Can't you run this??
Select dtValidDates.txtDate from
(SELECT txtDate
FROM Table
WHERE ISDATE(txtDate) = 1) dtValidDates
WHERE CONVERT(DATETIME,dtValidDates.txtDate) BETWEEN '01/01/2003 00:00:00' AND
'04/30/2005 23:59:59'
April 25, 2005 at 1:39 pm
SELECT
SUM(CASE WHEN QUESTION1_SCORE = 0 THEN 1 ELSE 0 END) AS Q1
, SUM(CASE WHEN QUESTION2_SCORE = 0 THEN 1 ELSE 0 END) AS Q2
, SUM(CASE WHEN QUESTION3_SCORE =...
April 25, 2005 at 1:33 pm
It's because the query optimizer is evaluating the between operand first. Try this :
Select dtValidDates.txtDate from
(SELECT txtDate
FROM Table
WHERE ISDATE( txtDate ) = 1) dtValidDates
AND dtValidDates.txtDates between '01/01/2003...
April 25, 2005 at 12:50 pm
I know.. multiple whitespaces are ignored by the browser..
this query can solve part of your problem :
SELECT
TEST_DATE
, SUM(CASE WHEN QUESTION1_SCORE = 0 THEN 1 ELSE 0 END)...
April 25, 2005 at 12:43 pm
We well need to see the DDL of the tables to answer this one...
I would normally have a questions table with an answers table. So a simple inner join...
April 25, 2005 at 12:13 pm
30 triggers on the same table????? what the hell kind of business rules did you have in there??
April 25, 2005 at 10:03 am
Please keep using the sp, dynamic sql shouldn't be used in prodution especially with strings. Read this for more info :
April 24, 2005 at 7:48 pm
Update dbo.YourTable SET YourColumn = Replace(YourColumn, '@thewebaddress.org', '@webaddress.org')
April 22, 2005 at 2:13 pm
It's impossible to do it in 1 query.
April 22, 2005 at 2:07 pm
Dim oConn 'can't use as in vbs
Dim oRS
Dim strSQL
set OConn = CreateObject("ADODB.Connection")
set oRS = CreateObject ("ADODB.Recordset")
oConn.CommandTimeout = 0
oConn.CursorLocation = 3 'adUseClient
oConn.Open "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=MyDatabase;Data Source=MyDataServer"
oRS.Open "Select count(*) as...
April 22, 2005 at 12:18 pm
Viewing 15 posts - 18,046 through 18,060 (of 18,926 total)