Viewing 15 posts - 991 through 1,005 (of 2,171 total)
Or do it all in SQL Server?
April 21, 2008 at 1:53 am
SELECTid_message
FROMTable1
WHEREkeyword in ('tomato', 'cooking')
GROUP BYid_message
HAVINGCOUNT(DISTINCT keyword) = 2
SELECTid_message
FROMTable1
GROUP BYid_message
HAVINGMAX(CASE WHEN keyword = 'tomato' THEN 1 ELSE 0 END) = 1
AND MAX(CASE WHEN keyword = 'cooking' THEN 1 ELSE 0 END)...
April 19, 2008 at 3:59 pm
I mean, what client language is that?
And where is it executed?
April 18, 2008 at 4:21 pm
Great.
You start the topic over here
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=101129&SearchTerms=DISTINCT,vNumber
and then you continue here at SQLServerCentral?
April 18, 2008 at 4:13 pm
Where is the Microsoft SQL Server 2005 related problem?
April 18, 2008 at 4:10 pm
I have answered hundreds of these type of questions over at SQLTeam.com
For one example see
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=72097
You can easily edit the fnCommonFriendsStep function to include member names along the way.
Then you can...
April 18, 2008 at 1:09 am
SELECTDATEADD(YEAR, 543, GETDATE())
April 17, 2008 at 5:31 am
SELECTSalesOrderId,
Type,
ISNULL(CONVERT(VARCHAR, Date, 103), 'No Date Specified') AS ExpiryDate
FROMdbo.Values
INNER JOINSalesOrders ON SalesOrders.SalesOrder = dbo.Values.RecordNumber
INNER JOINdbo.DataNameFields ON dbo.DataNameFields.DataField = dbo.Values.DataField
WHEREdbo.Values.DataField = '43'
AND dbo.SalesOrders.Type =...
April 17, 2008 at 2:53 am
Ad a comma after Type and remove the AS clause in the CASE part.
SELECTSalesOrderId,
Type,
CASE
WHEN...
April 17, 2008 at 2:52 am
UPDATETable1
SETrecordtime = case when DATEDIFF(second, recordtime, @rtime) > 0 then @rtime else recordtime end,
foo = case when @foo <> foo then @foo else foo end,
bar = case when @bar <>...
April 17, 2008 at 2:47 am
Either of these. It really comes down to how many records there are in the two tables.
DELETEt
FROMFirstt AS t
WHEREEXISTS (SELECT * FROM Secondt AS y WHERE y.ID = t.ID)
DELETEt
FROMFirstt AS...
April 17, 2008 at 1:32 am
As for your original question:
It depends on which line of CASE statement get evaluated first.
Since the two lines returns different datatypes (line 1 varchar, line 2 int) the first line...
April 16, 2008 at 2:01 pm
SELECT CONVERT(CHAR(2), GETDATE(), 103)
April 16, 2008 at 1:59 pm
As said before, in the database; All values equal to zero is false. All other numeric values is converted to 1 which equals to 1 meaning true.
NULL is unknown.
VB6 treated...
April 16, 2008 at 7:38 am
Is those timings for Peso for both UPDATE and SELECT?
What are the times for just SELECT, if the UPDATEs are already done with trigger?
You can hint a query with MAXDOP.
April 16, 2008 at 5:13 am
Viewing 15 posts - 991 through 1,005 (of 2,171 total)