SQL Data Types Conversions

5 pts.
Tags:
ERP
iSeries
iSeries Data Transfer
SQL
SQL Data Types
I'm new to SQL. Anyone have a good example or link of converting from one data type to another. We are converting from an iSeries (AS400) to SQL-based ERP solution and we are having some difficulty with how to get data from numeric fields to date or "numeric" data types. Our iSeries ERP solution had two basic data types, Alpha or numeric (with or without decimals). Now we are confronted with a number of different data type options for numeric or date data in SQL. Any help would be appreciated. Thanks Mike

Answer Wiki

Thanks. We'll let you know when a new response is added.

Don’t know what your numeric date field looks like 6, 7, 8 digits
20090321 perhaps??? You didn’t say Oracle or SQL/Server or something else.

convert(datetime,’20040508′,112)

the SQL convert datetime function changes a character string into a date time. The last parameter
is the format of the incoming string — 112 is CCYYMMDD.

Hope this helps
Phil

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following