Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Community,
Can any body solve this Error when i connect to data base Table showing error like
I Change Given format below
,Convert(Varchar,[Date_Field],103) as Date_Field is it right?
Thanks in Advance
Regards,
Khasim.
If SQL try below
Calls:
SELECT [Complaint_ID]
,Convert(Varchar,[complaint_date],103) as complaint_date
,[complaint_no]
,[count]
,Convert(datetime,[Reminder_Date],103) as Reminder_Date
,[NewAppointment]
,
Hi,
Ashfaq suggested you right solution in the very first post.
Table:
LOAD
[Complaint_ID]
,date(floor([complaint_date])) as complaint_date
,[complaint_no]
,[count]
,date(floor([Reminder_Date])) as Reminder_Date
,[NewAppointment]
,[Comment]
;
SQL SELECT
[Complaint_ID]
,[complaint_date]
,[complaint_no]
,[count]
,[Reminder_Date]
,[NewAppointment]
,
Hi Ashfaq,
i am fetching from DataBase but why we are using Select Command?
In QVD fetching data shows Load Command right? previously with given conversion format its working fine and fetched data exact.
Regards,
Khasim.
OK, It's solved now? If not, can you provide some sample date to see what conversion is needed?
If it helps, MSSQL convert statement is:
Syntax for CONVERT:
CONVERT ( data_type [ ( length ) ] , expression [ , style ] )
Is any valid expression.
Is the target data type. This includes xml, bigint, and sql_variant. Alias data types cannot be used.
Is an optional integer that specifies the length of the target data type. The default value is 30.
Is an integer expression that specifies how the CONVERT function is to translate expression. If style is NULL, NULL is returned. The range is determined by data_type. For more information, see the Remarks section.
(103 is dd/mm/yyyy format)
Khasimvali Shaik wrote:
Hi Ashfaq,
My Script is
Calls:
SELECT [Complaint_ID]
,Convert(Varchar,[complaint_date],103) as complaint_date
,[complaint_no]
,[count]
,Convert(datetime,[Reminder_Date],103) as Reminder_Date
,[NewAppointment]
,[Comment]
From Calls;
Regards
Khasim.
Hi,
Check SQL part is missing here, you didn't provide complete script
try this and let me know
Calls:
SELECT [Complaint_ID]
,Convert(Varchar,[complaint_date],103) as complaint_date
,[complaint_no]
,[count]
,Convert(datetime,[Reminder_Date],103) as Reminder_Date
,[NewAppointment]
,
Hi,
If it working previously
Try below SQL part was missing.
Calls:
SQL SELECT [Complaint_ID]
,Convert(Varchar,[complaint_date],103) as complaint_date
,[complaint_no]
,[count]
,Convert(datetime,[Reminder_Date],103) as Reminder_Date
,[NewAppointment]
,
after some (a lot of) test
for me this works on a sql server database
when I remove the bold part I get an error
table:
sql select Convert(Varchar(10), dat_data, 103) as field1 from d003_date;
Hi Ashfaq,
without conversion format also working and also SQL SELECT Statement also working.
but why when using conversion(varchar,[dateField],103) as dateField not working.
showing same error.
Try this now
Calls:
SELECT [Complaint_ID]
,date(floor([complaint_date])) as complaint_date
,[complaint_no]
,[count]
date(floor([Reminder_Date])) as Reminder_Date
,[NewAppointment]
,
Like this
Calls:
load [Complaint_ID]
,date(floor([complaint_date])) as complaint_date
,[complaint_no]
,[count]
,date(floor([Reminder_Date])) as Reminder_Date
,[NewAppointment]
,