Hi,
This question I asked in this page earlier,
https://www.experts-exchange.com/OS/Unix/Q_28425882.html
I have Sybase iq Table Name dates_col in that I have column name DATE_BD whose
data stucture:
column_name: DATE_BD4
domain_name:date
width:4
scale:0
nulls:N
update temp_table
set DATE_BD4= getdate()
WHERE PROCESS_MONTH = 'MAR'
AND PROCESS_YEAR = 2014;
This works and updates DATE_BD4 with current date.
But I am only able to set to current date today's date to that column, is there is any way I can update any other value like tomorrow's date for that
column like below.
update temp_table
set dateformat(DATE_BD4,'MM/DD
/YYYY') = '05/05/2014'
WHERE PROCESS_MONTH = 'MAR'
AND PROCESS_YEAR = 2014;
commit;
But I am getting the following error
> Script lines: 1-5 --------------------------
SQL Anywhere Error -131: Syntax error near '=' on line 2
Msg: 102, Level: 15, State: 0
Line: 0
How can I update other dates by giving the value to the column directly.
https://www.experts-exchange.com/OS/Unix/Q_28425882.html
I want to assign any date to it, what I mean is here
update temp_table
DATE_BD4 = '05/05/2014'
WHERE PROCESS_MONTH = 'MAR'
AND PROCESS_YEAR = 2014;
commit;
DATE_BD4 can be,
DATE_BD4 = '05/05/2014'
DATE_BD4 = '10/07/2001'
DATE_BD4 = '03/05/1999'
DATE_BD4 = '09/07/2017'
DATE_BD4 = '08/25/2014'
etc you are functions might not happen in this case, I want the correct syntax where I can execute the update statement to set date column for any date value.
I am doing testing for this table, I will re-assign values as and when my testing is complete.
Thanks,
Sailaja
update temp_table
set dateformat(DATE_BD4,'MM/DD
WHERE PROCESS_MONTH = 'MAR'
AND PROCESS_YEAR = 2014;
You can create a variable and pass it to the UPDATE statement, like below.
Open in new window
Is that what you are looking for?