Viewing 15 posts - 286 through 300 (of 683 total)
Alex - were you aware of another of Erland's excellent articles which discusses just this problem (in a good deal of detail)?
http://www.sommarskog.se/dyn-search.html
October 9, 2006 at 3:53 am
Here's the other post:
http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=8&messageid=304896
I don't think it's a "falling into infinite loop" issue - I think it may have just been selecting the result for every row into...
August 30, 2006 at 7:01 am
Using info from your 2 separate posts, I'm thinking this might be what you want...
SELECT isnull(
max(case when DEAL_DATE BETWEEN dateadd(day, -5, GETDATE()) AND GETDATE()
then DEAL_DATE...
August 30, 2006 at 6:59 am
Here are a couple of links which may be of use...
http://www.nigelrivett.net/SQLTriggers/AuditTrailTrigger.html
http://www.nigelrivett.net/SQLTriggers/Triggers_2_Creating_Audit_Trails.html
August 24, 2006 at 10:25 am
Try...
select 1 as Tag, 0 as Parent, ID as [Configuration!1!ID], PID as [Configuration!1!PID], Name as [Configuration!1!Name], UOM as [Configuration!1!UOM], Value as [Configuration!1!Value] from tblProfile1 where MessageID...
July 28, 2006 at 9:28 am
With optimisation, you should be able to get the time down to a lot less than that. See these articles if you want to try to do that...
http://www.sqlservercentral.com/columnists/jsack/sevenshowplanredflags.asp
http://www.sql-server-performance.com/query_execution_plan_analysis.asp
July 26, 2006 at 10:11 am
You would just need to chop off the comma at the end. e.g.
--objects
create proc #sp1 @p1 varchar(10), @p2 varchar(10), @p3 varchar(10), @p4 varchar(10) as
July 26, 2006 at 8:51 am
> Better yet. Why not a date? A date should always be a date, wouldn't we call it something else if not?
Like datetime?
July 26, 2006 at 7:32 am
Nav - I think you will get more accurate/useful/quick answers if you post an example.
Post an example table structure, some example data for it, some example inputs, and what results...
July 26, 2006 at 5:14 am
Here's an example...
--data
create table SomeTable(ID int, Name varchar(10))
insert SomeTable
select 1, 'Bob'
union all select 123, 'Jim'
--calculation
declare @sql nvarchar(100)
set @sql = N'select @Name...
July 26, 2006 at 5:05 am
Reet - I think you will get more accurate/useful/quick answers if you post an example.
Post an example table structure, some example data for it, some example inputs, and how you...
July 26, 2006 at 4:51 am
Here's an example, Swapnil,
--objects
create proc #sp1 @x int output as
set @x = @x + 1
go
--calculation
declare @x int
set @x = 7
exec #sp1 @x...
July 26, 2006 at 4:45 am
Here are a few articles which may help you...
http://www.aspfaq.com/show.asp?id=2149
http://www.dbazine.com/sql/sql-articles/larsen13
http://support.microsoft.com/kb/308042/EN-US/
July 25, 2006 at 11:40 am
It's usually more efficient to avoid varchar when comparing dates, and to try to stick to the datetime format. The following should behave the same way, but give you better...
July 25, 2006 at 11:32 am
Viewing 15 posts - 286 through 300 (of 683 total)