spudmcc
asked on
delete using time field
Hi Experts!
I need some basic help that I am just not able to solve myself. I am so new to SQL that I am sure that I am my own worst enemy.
We have a large data set that has a number of fields including data time. This is not a calculated field but rather a "time" field that is populated through an upload of data. It is not part of date/time but just the time field.
I want to delete records where the data time is equal to: 19:45:33 and the WHOLEID is equal to 83-SW. Seems easy enough but I continue to get a boolean error near "time". I don't know what I am doing wrong but would appreciate the help.
A
I need some basic help that I am just not able to solve myself. I am so new to SQL that I am sure that I am my own worst enemy.
We have a large data set that has a number of fields including data time. This is not a calculated field but rather a "time" field that is populated through an upload of data. It is not part of date/time but just the time field.
I want to delete records where the data time is equal to: 19:45:33 and the WHOLEID is equal to 83-SW. Seems easy enough but I continue to get a boolean error near "time". I don't know what I am doing wrong but would appreciate the help.
A
Show your SQL please.
ASKER
SELECT "SalesBUP820A"."PriPub", "SalesBUP820A"."PubDG", "SalesBUP820A"."Draw", "SalesBUP820A"."Returns", "SalesBUP820A"."Sales", "SalesBUP820A"."Sout", "SalesBUP820A"."DayCnt", "SalesBUP820A"."DateID", "SalesBUP820A"."PrimaryID" , "SalesBUP820A"."DWBNDS", "SalesBUP820A"."md_Retaile r", "SalesBUP820A"."WholesaleI D", "SalesBUP820A"."Data Date", "SalesBUP820A"."Data Time"
FROM "NYP-RetailDataSQL"."dbo". "SalesBUP8 20A" "SalesBUP820A"
FROM "NYP-RetailDataSQL"."dbo".
Is that the SQL that fails with the error?
ASKER
Sorry, I told you I am new to SQL so I really need the kindergarden version.
delete from SalesBUP820A
where Data Date='12:11:54' and
WholesaleID='83-SW';
This error message:
Msg 4145, Level 15, State 1, Line 2
An expression of non-boolean type specified in a context where a condition is expected, near 'Date'.
delete from SalesBUP820A
where Data Date='12:11:54' and
WholesaleID='83-SW';
This error message:
Msg 4145, Level 15, State 1, Line 2
An expression of non-boolean type specified in a context where a condition is expected, near 'Date'.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
That was the solution. Thank you so much for your patience, time and sharing your knowledge. I appreciate your help so very much.
A
A