Hi Folks,
Actually from source i am getting price_date as varchar.First i need to ftp'ed the file and then should load into database.But while loading database i need to convert the price_date of string format to date.
i had defined price_date as
If IsNull(Lnk_Sp_ims_investec.PRICE_DATE) Then '' Else (Oconv(Iconv(Lnk_Sp_ims_investec.PRICE_DATE,"D/ MDY"),"DMDY"))
But i am getting a warning like cannot insert null into Price_date.
Could any body suggest me to solve this.
Thnaks i advance.
Sateesh.M
cannot insert NULL into PRICE_DATE
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 48
- Joined: Sat Oct 22, 2005 9:56 am
-
- Participant
- Posts: 437
- Joined: Fri Oct 15, 2004 6:13 am
- Location: Pune, India
What is the exact error message? Check for nullability in the target table as well as the Load stage. By the way, why do you need to check for Null if you need to load Null based on the availablility of null in input?
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
Hi ,
First thing it is clear that the target column is non-nullable .
Check the source whether any null values are coming ,if there is some null values coming change that to a hardcoded value.when you are reading from the flatfile isnull routine does not read as null so make that as if input.col1 =" " then "some value".
Hope this will work out
First thing it is clear that the target column is non-nullable .
Check the source whether any null values are coming ,if there is some null values coming change that to a hardcoded value.when you are reading from the flatfile isnull routine does not read as null so make that as if input.col1 =" " then "some value".
Hope this will work out
-
- Participant
- Posts: 48
- Joined: Sat Oct 22, 2005 9:56 am