|
phildelau
Starting Member
3 Posts |
Posted - 02/13/2013 : 09:11:43
|
Hello, In my table , i've a field "ad_datededepartoccasionnel". The content is a date in text format (I can't change it's format) dd-mm-yyyy. I must edit ads by descending order, but it's sort by day. So I want to permute dd with yyyy
I Tried this code but an error occurs at UPDATE string. I 'm not a programmer, therefore I ask some help. this is the code below
SELECT @annee := SUBSTR(ad_datededepartoccasionnel,7,4),@jour := SUBSTR(ad_datededepartoccasionnel,1,2)FROM cov_adsmanager_ads UPDATE cov_adsmanager_ads SET ad_datededepartoccasionnel= REPLACE(ad_datededepartoccasionnel,@annee,@jour) UPDATE cov_adsmanager_ads SET ad_datededepartoccasionnel= REPLACE(ad_datededepartoccasionnel,@jour,@annee)
Sorry for my english
Thanks |
|