… WHERE [datefield] >= CONVERT(date, GETDATE()) gets you all entries from today starting at 00:00:00
Tag: sql
Programming
Sql Usefull Queries & Settings
by Mike • • 0 Comments
MSSQL Queries for running proccesses and connections: MYSQL Connection Details:
Programming
MySql import CSV/SQL Files on CommandLine
by Mike • • 0 Comments
mysql -p -u username database_name < file.sql
Programming
MySql adding leading sign’s to coloumns
by Mike • • 0 Comments
SELECT LPAD(‘1101’, 8, ‘0’); and to remove them: SUBSTRING(str_col, PATINDEX(‘%[^0]%’, str_col+’.’), LEN(str_col))
Programming
mssql format date fields
by Mike • • 0 Comments
– Microsoft SQL Server T-SQL date and datetime formats – Date time formats – mssql datetime – MSSQL getdate returns current system date and time in standard internal format SELECT convert(varchar, getdate(), 100) – mon dd yyyy hh:mmAM (or PM) – Oct 2 2008 11:01AM SELECT convert(varchar, getdate(), 101) – mm/dd/yyyy – 10/02/2008 SELECT convert(varchar,…