![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| ||||
| ||||
|
|
Hi I'm new at this progress stuff so I'm hoping someone can help me. In MS SQL server we have a functions called IsNumeric and IsDate. These allow you to evaluate data before processing it. We have a DB where everything is stored as VarChar fields (I'm told this is for good reason) |
|
What I'm trying to do is convert these VarChars to their correct data types when I select them. In SQL Server I'd do this: Select Case When IsNumeric(myVarCharField)= 1 then Cast(myVarCharField as Decimal(11,3) ) else Cast(Null as Decimal(11,3) ) end As MyDcecimalField From MyTable. |
|
We're using Progress 9, can anyone tell me how to convert my MS SQL so that it works with this version please. |
|
Thanks Andy |
#3
| |||
| |||
|
|
In article <1139231409.515693.310900 (AT) z14g2000cwz (DOT) googlegroups.com>, "AndyW" <AndrewMWalker (AT) totalise (DOT) co.uk> wrote: Hi I'm new at this progress stuff so I'm hoping someone can help me. In MS SQL server we have a functions called IsNumeric and IsDate. These allow you to evaluate data before processing it. We have a DB where everything is stored as VarChar fields (I'm told this is for good reason) They lied. You're stuck working with screwy data so prepare to deal with screwy ways to work with it. What I'm trying to do is convert these VarChars to their correct data types when I select them. In SQL Server I'd do this: Select Case When IsNumeric(myVarCharField)= 1 then Cast(myVarCharField as Decimal(11,3) ) else Cast(Null as Decimal(11,3) ) end As MyDcecimalField From MyTable. You got to table scan it and then decide if you want it or not. FOR EACH MyTable NO-LOCK: IF YourFunction(MyTable.A) THEN DO: ... END. /* FOR EACH MyTable */ We're using Progress 9, can anyone tell me how to convert my MS SQL so that it works with this version please. I don't think so dude. There are resources to change it into MySQL and PostgreSQL databases though. Thanks Andy You should put down what version of Progress you are using also as well as operating system. -- |
#4
| |||
| |||
|
|
I'm assured that the data will "always" be Null as Zero Lenght String or a number in this column. We have a DB where everything is stored as VarChar fields (I'm told this is for good reason) |
#5
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |