sql - Convert DateTIme to Date / "int is not allowed" error -
I searched and searched - have found variations on the theme, but there is no real answer to my problem.
I need to convert Here is my code: It needs to go into this table: [buddyid] at null, [brand_id] ent null < P> Data type to fulfillment Built-in conversion is not allowed for numbers. Use the CONVERT function to run this query. Whatever I can think of, I have tried. My code resulted in the You are getting an error because you have found the column order incorrect; The columns given in the accompany statement do not match the order in the selection statement: You want it to: [e-mail add Reset] [DBO] as email [opt-eTemail] ([e-mail address], [first address], [FirstApotAutDate], [LastAutOutDate], [BOID], [Brand_ID]) SELECT [DBO]., Convert (DataTime, Max ([Email address dot]] [firstopotautdate]) AS FirstOptoutDate, Convert (Datetime, Max ([E-MailAdWordsSamuri]. [LastOutOutDate]) AS LastOptoutDate, [DBO]. [Email AddressSamuri]. [BOID], [Dbo]. [Emailaddresses_summary]. [Brand_id] With that, you have a total The Olm might want to change the Because the intent is better, and the maximum consolidated function at the same time Applies to changed date time column before (can varchar?) MAX from
datetime to
date , and put it in a new table I created .
INSERT INTO [dbo]. [OPTITE EMails] ([email address], [first optode], [LastAutOutDate], [BOID], [brand_ID]) SELECT [[email_add]. [email_add], [dbo]. [email_add], [dbo]. [Email_add]. [Brand_ID], convert (date-time, max [[first optot date]) [FirstOptAutadet, Convert (Datetime, Max ([E-MailAddance_Samuri]] [LastOutOutDate]) from AS LastOutOut Date [DBO]. [Distinct Email address] [dbo]. [Email address = samurai] on [dbo]. [Distant email id]. [Email adrecise] = [dbo]. [Email address_samuri]. [Email adressed] WHEEE [DBO]. [E-mail Address_samuri]. [Lasta Tetradit] is not [dbo] by the null group. [Specific EM .. AilIds] [emailaddressid], [dbo] [emailaddresses_summary] [bu_id], [dbo] [emailaddresses_summary] [brand_id] ... GO < / Pre>
[emailaddressid] int no null primary key, [first optod date] daytime tap, [finalopactdate] daytime False, error message that I get: message 257, level 16, state3, line 56
CONVERT statement string that I thought would solve it. Anything is not working please help?
INSERT INTO [dbo]. [Email address] [email address] [email address] [[email address]] [email id] [email address] [e-mail address] [dbo]. [Email address_samuri] [BOID]. [Db.o.]. [Email address_samuri]. [Brand_id], convert (dateaddime, max [[first optot date]), as the first optooddate, convert (datetime, max ([emailaddresses_summary]. [Lastopupoutdate] ) AS LastOptOutDate
, MAX (convert (datetime, [emailaddresses_summary]]. AS FirstOptOutDate, MAX (convert (datetime, [emailaddresses_summary]. [LastOutOutDate]) AS LastOptOutDate
Comments
Post a Comment