| Author |
Topic |
|
Pinto
Aged Yak Warrior
590 Posts |
Posted - 2006-04-21 : 06:25:16
|
| I am trying to test sp in Query Analyser as below but get the errorServer: Msg 8114, Level 16, State 4, Procedure spRMU_GetChaseFiles, Line 0Error converting data type varchar to datetime.How do I put the date as a parameter ? I think it may be to do with the fact that MaxDateOut is an expression in my view that the sp is based on. It is taking this as char when it should be datetime. So, how do I make this expression type date ?EXEC spRMU_GetChaseFiles @strStartDate ='01/01/05',@strEndDate = '21/04/06',@strDepartment = 'Central Units',@strDivision = 'Personnel',@strSection = '' |
|
|
Kristen
Test
22859 Posts |
Posted - 2006-04-21 : 06:39:22
|
| The only prudent way to put dates in "text strings" is:'yyyymmdd'or 'yyyymmdd hh:mm:ss.mmm'Anything else is open to interpretation and ambiguity of the Locale the machine is set to etc.Kristen |
 |
|
|
PSamsig
Constraint Violating Yak Guru
384 Posts |
Posted - 2006-04-21 : 13:50:08
|
| Way to go frequent-forum-poster-Kristen-of-whom-I-have-no-personal-knowledge-of-but-whoms-wit-I-acknowledge |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-04-21 : 20:14:16
|
quote: Originally posted by PSamsig Thats my girl :)
 KH |
 |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2006-04-21 : 21:16:36
|
now the question remains is he reffereing to Kristen or Pinto??and which would be weirder??oh man... i just thought of Kristen in a skirt.... nooooo... go away obnoxious image....arghhh!!!!!   Go with the flow & have fun! Else fight the flow Blog thingie: [URL="http://weblogs.sqlteam.com/mladenp"] |
 |
|
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2006-04-22 : 00:24:20
|
uhmm... have you two met? quote: Originally posted by PSamsig Thats my girl :)
--------------------keeping it simple... |
 |
|
|
PSamsig
Constraint Violating Yak Guru
384 Posts |
Posted - 2006-04-22 : 07:06:39
|
| Sigh you guys, I was just refereing to an other post of mine, where I refered to the danger of using literal dates in none portable formats, they are disasters waiting to happen, which this thread is all about, and Kirsten just happen to know that. But I guess I next time will write 'Way to go frequent-forum-poster-Kirsten-of-whom-I-have-no-personal-knowledge-of-but-whoms-wit-I-acknowledgement' |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2006-04-22 : 09:02:12
|
|
 |
|
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2006-04-23 : 21:11:55
|
just a smile eh Kristen?How many times now?  quote: Originally posted by Kristen

--------------------keeping it simple... |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-04-23 : 23:08:43
|
Can't blame those who mistaken. See here KH |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-04-24 : 01:40:42
|
quote: Originally posted by jenHow many times now? --------------------keeping it simple...
As many times as possible MadhivananFailing to plan is Planning to fail |
 |
|
|
Kristen
Test
22859 Posts |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-04-24 : 05:07:22
|
| select Soundex('Kristen') as Kristen ,Soundex('Kristin') as KristinMadhivananFailing to plan is Planning to fail |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2006-04-24 : 05:09:42
|
select WhatSex('Kristen') as Kristen, WhatSex('Kristin') as Kristin |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-04-24 : 05:13:01
|
quote: Originally posted by Kristen select WhatSex('Kristen') as Kristen, WhatSex('Kristin') as Kristin
Server: Msg 195, Level 15, State 10, Line 1'WhatSex' is not a recognized function name. MadhivananFailing to plan is Planning to fail |
 |
|
|
PSamsig
Constraint Violating Yak Guru
384 Posts |
Posted - 2006-04-24 : 05:35:26
|
I guess it isn't much conciliation that I apparently is slightly dyslexic, I had read Kristen as Kirsten ... ... but anyway, I have edited my original post. |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2006-04-24 : 15:20:13
|
| "Server: Msg 195, Level 15, State 10, Line 1'WhatSex' is not a recognized function name."Madhi, you need the SQL Adult Version!"I apparently is slightly dyslexic"So how come you can spell "dyslexic" then, eh?Don't sweat it ...Kristen |
 |
|
|
PSamsig
Constraint Violating Yak Guru
384 Posts |
Posted - 2006-04-24 : 15:30:59
|
| LOL, I looked it up in a dictionary :) |
 |
|
|
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
7020 Posts |
|
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2006-04-24 : 20:58:50
|
that's just... --------------------keeping it simple... |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-04-25 : 03:01:13
|
"Madhi, you need the SQL Adult Version!"Is this 2000 or 2005 ?Damn! I am still using 2000 and yet to move on to 2005 and now there is another version ! KH |
 |
|
|
Next Page
|