Viewing 15 posts - 5,806 through 5,820 (of 6,036 total)
Can you pass the part of WHERE clause where you use this parameter?
There is a feeling I know whats a problem.![]()
_____________
Code for TallyGenerator
November 20, 2005 at 9:35 pm
If you're passing the parameter as varchar just convert it to datetime in SP:
where DateCol = convert(datetime, @Param, @FormatParameter)
_____________
Code for TallyGenerator
November 20, 2005 at 8:45 pm
Check the values you pass to your SP.
There must be single quote in one of parameters you pass to SP.
Did anybody tell you to get rid of dymamic SQL? _____________
Code for TallyGenerator
November 20, 2005 at 5:00 pm
There must be something wrong with datatype conversions.
Hardcoded date is harcoded as varchar.
Supplied parameter must be datetime.
What is the datatype of column you scan for matching?
_____________
Code for TallyGenerator
November 20, 2005 at 2:38 pm
You update WHOLE table, not only rows you need.
Correct options:
UPDATE d --pemaster.dbo.tradeDaily
SET
sm_ind = s.StarMine_Indicator_Region_100,
sm_dt = s.as_of_date
FROM pemaster.dbo.tradeDaily AS d
LEFT JOIN pemaster.dbo.starmine_gbl_daily AS s
ON d.cusiph =...
_____________
Code for TallyGenerator
November 20, 2005 at 2:32 pm
select convert(bigint, datediff(dd, '1970-01-01', GETUTCDATE()))*24*3600 + datediff(ss, dateadd(dd, datediff(dd, 0, GETUTCDATE()), 0), GETUTCDATE())
_____________
Code for TallyGenerator
November 17, 2005 at 8:13 pm
It's an annoyance to pass a parameter but not to have a view dedicated just to display GETDATE()?
And when one day you'll need to compare dates in function not to...
_____________
Code for TallyGenerator
November 16, 2005 at 12:21 pm
Theory:
Getdate() is just datetime value. It may be supplied to UDF as a parameter. You set GETDATE() value to this parameter when you call UDF. It makes UDF deterministic and...
_____________
Code for TallyGenerator
November 16, 2005 at 4:05 am
November 16, 2005 at 3:51 am
UPDATE V
SET priori = toer
FROM TOEROK T INNER JOIN ventven V
ON nomat = ship
...
_____________
Code for TallyGenerator
November 16, 2005 at 3:45 am
You are absolutely right about "hidden cursor".
But the best and most reliable way to create hidden cursor is to put table access inside UDF!
Yes, nothing is absolute, and sometimes table...
_____________
Code for TallyGenerator
November 16, 2005 at 3:41 am
You mean in functions? ![]()
_____________
Code for TallyGenerator
November 15, 2005 at 8:30 pm
There is no case when you need GETDATE() within a UDF.
_____________
Code for TallyGenerator
November 15, 2005 at 7:10 pm
Something like this:
Code AgentCode
190000 19XXXX
160000 16XXXX
131222 131222
131222 17XXXX
But you know the rule better, you can do it more close to the real case.
_____________
Code for TallyGenerator
November 15, 2005 at 1:41 pm
You must have the rule you've just described in table, not in code of SP.
After that you may use simple joins in SP, and rules may be added or changed...
_____________
Code for TallyGenerator
November 15, 2005 at 12:49 pm
Viewing 15 posts - 5,806 through 5,820 (of 6,036 total)