Viewing 15 posts - 18,031 through 18,045 (of 18,923 total)
Dynamic Search Conditions in T-SQL
You could do something like this :
Select * from dbo.Orders O where O.Type = 0
And (@FromSalesOrderID IS NULL OR O.OrderID Bewteen @FromSalesOrderID AND...
April 26, 2005 at 8:53 am
Still doesn't require dynamic sql. I'm not mad at you but at everybody who suggest these solution. Still 30 columns is not that long to write since you...
April 26, 2005 at 7:57 am
delete from tblorderline where OrderID in ( select OrderID from tblOrders where Offercode = 'NWZ')
April 26, 2005 at 6:56 am
Why do you guys keep posting dynamic sql solution when he clearly doesn't need one????????????
If he's too lazy to write a 3 column update, and by the way the same...
April 26, 2005 at 6:45 am
You'll have to create a table that'll keep all the possible label values by language then set the captions at run time everytime you load the forms.
April 26, 2005 at 6:42 am
Don't be too hard on him... you'll get there long before us
.
April 26, 2005 at 6:30 am
He needs to know which line of the code in the sp is currently executing.. hence we suggested debugging.
April 25, 2005 at 2:58 pm
Sorry Noeld... didn't reread the initial post after Corey said it didn't work. Looks like he should reread his own posts too
.
Now...
April 25, 2005 at 2:50 pm
Noeld's fix :
change the return line to this :
return @result
April 25, 2005 at 2:23 pm
Ya... so much control and I didn't even realize it :-).
April 25, 2005 at 2:20 pm
Check this out... it runs 19 times faster than the function solution (and could be even faster with less casts) :
dbcc dropcleanbuffers
go
Select OrderId, ProductId, UnitPrice, SUM(CAST(SUBSTRING(CAST(UnitPrice AS VARCHAR(40)), PkNumber,...
April 25, 2005 at 2:19 pm
Ya mybad.. just remove that part of the query :
GROUP BY TEST_DATE
April 25, 2005 at 1:58 pm
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
Viewing 15 posts - 18,031 through 18,045 (of 18,923 total)