|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper “Build Web 2.0 Applications Without Hand-Coding” Download now! |
|
#1
|
|||
|
|||
|
ms sql syntax
hi all,
I need help translating some ms sql syntax can anyone tell me what the folloing line means? I've never worked with ms sql before, currently I have to translate a given ms sql db schema into mysql. Can anyone help? Thank ---------------------------- "SELECT DB,ACCNT_CODE, ACCNT_NAME, ANL_A1, ANL_A2, ANL_A7, DB_FLAG, CONVERT(VARCHAR,DATE_FOR_ACTION,103) AS DATE_FOR_ACTION FROM SSR WHERE ACCNT_CODE='" & strID & "'" |
|
#2
|
||||
|
||||
|
I expect you're trying to figure out what CONVERT(VARCHAR,DATE_FOR_ACTION,103) means. The CONVERT function is used to convert one data type to another. In this case, it is converting the DATE_FOR_ACTION column to a VARCHAR data type. When converting a date type to a char or varchar type, you can optionally specify a third parameter, which defines the format of the conversion. In this case 103 means, convert to UK date format of dd/mm/yyyy. See http://msdn.microsoft.com/library/d...lce_convert.asp for more info.
__________________
Up the Irons What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home. "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest Down with Sharon Osbourne Puzzle of the Month solved by sizeablegrin, etienne141 and L7Sqr, superior C/C++ programmers of the month |
|
#3
|
|||
|
|||
|
thanks Scorp..
![]() I got it.. and to do it in mysql I'm using DATE_FORMAT(). thanks again. |
![]() |
| Viewing: Dev Shed Forums > Databases > MS SQL Development > ms sql syntax |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|