Activity overview
Latest activity by jmoldover
Additional feature request - script sql jobs
I've been using SQL Doc for about 6 months now (tried the Beta first) for keeping a backup copy of schemas for all of our databases, and appreciate it very much. However, one thing that is missing...
The code I find myself using a lot of the time is one to strip the time from a date-time field:
CONVERT (DATETIME, CONVERT (VARCHAR(10), [FIELDNAME], 101))
or to do the same for the current date
CONVERT (DATETIME, CONVERT (VARCHAR(10), GETDATE(), 101))
I also do a lot of report creation that looks for data in certain time spans (last full week/month, week/month to date) that would be nice to be able to do in SQL Prompt instead of having to cut and paste from a text file.
WTD: BETWEEN DATEADD([day], (DATEPART(dw, GETDATE())-1) * - 1, CONVERT(DATETIME, CONVERT(VARCHAR(10), GETDATE(), 101))) AND CONVERT (DATETIME, CONVERT (VARCHAR(10), GETDATE(), 101))
MTD: BETWEEN CONVERT (DATETIME, CONVERT (VARCHAR(2), MONTH(GETDATE())) + '/1/' + CONVERT (VARCHAR(4), YEAR(GETDATE()))) AND CONVERT (DATETIME, CONVERT (VARCHAR(10), GETDATE(), 101))
LFM: BETWEEN DATEADD([MONTH], - 1, CONVERT (DATETIME, CONVERT (VARCHAR(2), MONTH(GETDATE())) + '/1/' + CONVERT (VARCHAR(4), YEAR(GETDATE())))) AND DATEADD([DAY], - 1, CONVERT (DATETIME, CONVERT (VARCHAR(2), MONTH(GETDATE())) + '/1/' + CONVERT (VARCHAR(4), YEAR(GETDATE()))))
LFW: DATEADD(week, - 1, DATEADD([day], (DATEPART(dw, GETDATE()) - 1) * - 1, CONVERT(DATETIME, CONVERT(VARCHAR(10), GETDATE(), 101)))) AND DATEADD([day], (DATEPART(dw, GETDATE())) * - 1, CONVERT(DATETIME, CONVERT(VARCHAR(10), GETDATE(), 101))) / comments
The code I find myself using a lot of the time is one to strip the time from a date-time field:
CONVERT (DATETIME, CONVERT (VARCHAR(10), [FIELDNAME], 101))
or to do the same for the current date
CO...
I sent a copy to Alan Wallace - as it happens, the hint regarding extended properties pointed me in the right direction - there were several tables with column properties involving GUID that had non-unicode strings. I removed the extended properties (actually had to recreate the tables without them), and everything worked fine.
Thanks for the assistance.
Joshua Moldover
DBA, Infinity Data Corp / comments
I sent a copy to Alan Wallace - as it happens, the hint regarding extended properties pointed me in the right direction - there were several tables with column properties involving GUID that had no...
Any hints to speed up finding the offending code? / comments
Any hints to speed up finding the offending code?
I've been able to narrow down (sort of) the problem somewhat - it doesn't appear to be server related, since it occurs with databases on two different servers, but it doesn't occur with all of the databases on the server. It seems to happen with one particular database on each of two servers. There are relationships between the two databases, but some or all (in various instances) of those relationships are also shared with other databases that aren't causing the problem. I've tried selectively removing items from the diagram one at a time to see if I can isolate the issue to a specific database item, but so far I've had no luck...
Any suggestions as to the next step?
Joshua Moldover
DBA, Infinity Data Corp / comments
I've been able to narrow down (sort of) the problem somewhat - it doesn't appear to be server related, since it occurs with databases on two different servers, but it doesn't occur with all of the ...
Problem whilst saving project
I'm in the process of evaluating Dependency Tracker (and so far am very impressed) but I'm getting an error when I attempt to save diagrams that include one of our servers, as follows:
"An error oc...