="INSERT INTO [dbo].[Audit] ([Submission_date], [Audit_date], [BuildingID] ,[Building],[Room_barcode],[Room_number],[AssetUserID],[Responsible_person],[Asset_barcode],[AssetDescription],[Condition]) VALUES ('"&TEXT(B2)&"','"&C2&"', '"&D2&"', '"&E2&"', '"&F2&"', '"&G2&"', '"&I2&"', '"&J2&"', '"&K2&"', '"&R2&"', '"&M2&"')". I keep on getting an error about the conversion from string value into datetime failing for the column
Submission_Datebut even when it is in datetime format I'm getting the same error. Any ideas? sino wants it in this format somewhat and insists that his
=TEXT(B2, "YYYY-MM-DD")is right.
I have a one table Called MeetingInfo. In that table there is a info regarding Meeting Start Date and End Date And Metting Room.
I want to make a query by which i want to see all the Meeting start Date and EndDate but From today to 365Days Ago. Below Way i am trying
DECLARE @TodayDATE = GETUTCDATE()
Select * from MeetingInfo
WHERE StartDate between DATEADD(DAY,-365,GETDATE()) and@Today
AND tbia.EndDate between DATEADD(DAY,-365,GETDATE()) and @Today
What do u think this is the correct way to see the results
@alealpha2000 You could use CONCAT(column1, column2) -
select COUNT(CONCAT(column1, column2)) from table1 group by CONCAT(column1, column2)
Depending on what you're counting, as you seem to need distinct values, you may need to use window functions to deduplicate first. Google deduplication and "over(partition by" for help with that. If you go that route, you may need to wrap this in a CTE;
;with A as (select concat(column1, column2) as 'NewName' from table1) select count(NewName) from A
gympuma > <@gitter_nj-db:matrix.org> Hi, can anyone please point in the direction of some information to do with using a SQL FileTable in a document versioning system? Thanks
Could you explain a little more? You want to log versioning in SQL? Generate documents from t-sql into a file system?
gympuma > <@gitter_marcelosf:matrix.org> Message Iteration=2|SQLState=IM006|Native Error=|Message=[Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed[Message Iteration=3|SQLState=08001|Native Error=|Message=[Microsoft][SQL Server Native Client 10.0]Client unable to establish connection]'.
What connection string are you using? (blank out sensitive info before sendind)