Viewing 15 posts - 14,176 through 14,190 (of 18,923 total)
CREATE TABLE dbo.Test (
jStart datetime NOT NULL CONSTRAINT DF_Test_jStart DEFAULT (getdate()),
j AS (convert(int,jStart,112)) ,
iSeq smallint NOT NULL , --no need for a default here as it's gonna change at every...
August 19, 2005 at 11:43 am
it is not adding any lines of code... you're jut wrapping the inititalisation of variable with trim(request...)
August 19, 2005 at 11:13 am
It's the application's job.
August 19, 2005 at 11:05 am
Function SetVars(SRvalue)
if SRvalue = "" Then
SetVars = null
else
SetVars = SRvalue
end if
End Function
August 19, 2005 at 9:48 am
decimal(4, 2) * decimal(4, 2) = decimal(8,4)
99.99 * 99.99 = 9998.0001
No you can't set the default scale on the server.
August 19, 2005 at 9:47 am
And what permission do your users have on the system??
August 19, 2005 at 9:40 am
This is something I didn't implement in my code generator but you might skip it for now :
if strSpecComments = "" Then
MyParam.Value = null
else
MyParam.Value = strSpecComments
end if
August 19, 2005 at 9:39 am
You could also wrap that into a function and call it... that'd save you a lot of code to write.
August 19, 2005 at 9:39 am
use this as the default instead and remove the cast in the constraint
dateadd(d, 0, datediff(d, 0, getdate()))
Also you can convert jstart to smalldatetime
August 19, 2005 at 9:37 am
if the value is "", then a null should be entered in the db, trim will do just fine.
August 19, 2005 at 9:33 am
the only missing thing is that you don't account for nulls, and that you don't trim the values from the request.querystring (small bug that can bit you).
August 19, 2005 at 9:26 am
Looks like he's waiting for me to hit the 5K mark to start posting again
.
August 19, 2005 at 9:22 am
Viewing 15 posts - 14,176 through 14,190 (of 18,923 total)