Viewing 15 posts - 586 through 600 (of 3,480 total)
This looks like it...
SELECT * FROM #tblTemp
WHERE (ICategory = 'Bar1' AND iValues = '2QT')
OR ICategory = 'Bar2';
October 21, 2020 at 8:59 pm
Use CONVERT() to remove the time part...
DECLARE @MyTimeStamp DATETIME = GETDATE(); -- date and time "now"
PRINT @MyTimeStamp; -- prints the date and time
PRINT CONVERT(date,@MyTimeStamp); -- prints just...
October 15, 2020 at 7:32 am
You have to query the system tables for the list of tables matching your criteria, and then use a cursor to delete them (because you have to do it one...
October 15, 2020 at 7:24 am
???
You left out (1) what is "this"... the code? and (2) what are you trying to accomplish? Show everyone's days they won't be at work? (so unpacking the interval between...
October 9, 2020 at 3:39 pm
This is odd. I can connect to SQL Server from Python if I use a File DSN... this mess works:
import pyodbc
print('running a stored procedure to analyze...
October 6, 2020 at 4:52 am
Where are your tables? Are they both in SQL Server or is one still in Access? If one is still in Access, where are you running this query from?
You may...
September 29, 2020 at 4:44 am
It would likely depend on how the indexes on the tables in the query.
How many records are you talking about?
September 23, 2020 at 5:36 pm
without sample data, there's no way for me to tell. Screenshots show me the results of your query, but it doesn't give me any data to work with.
And what does...
September 19, 2020 at 9:34 pm
Running totals are easy if you use a windowing function. These have been around since 2012.
SELECT CustomerID,
running_total = SUM([InvoiceAmount]) OVER (PARTITION BY CustomerID ORDER BY InvoiceDate ROWS BETWEEN UNBOUNDED PRECEDING...
September 19, 2020 at 5:33 pm
Use a Calendar table?
September 19, 2020 at 1:19 am
What did you try? Something like an update against Plan using the related max from the Plan_review table?
17K points and you ask questions with no data???
September 18, 2020 at 4:40 am
I can get Python to read my database tables / run my stored stored procedures using pyodbc from Python (outside SQL Server)... I guess Python is just super flexible -...
September 17, 2020 at 8:56 pm
I've only just started Python, but trying to use Python inside SQL Server is mindboggling to me. Seems a lot cleaner and clearer if you do it from outside... connect to...
September 17, 2020 at 8:16 pm
That reminds me of a precon I went to by @SqlLocks (Jonathan Stewart). One of his cousins is color blind, so he has been interested in it for a long...
September 17, 2020 at 5:55 pm
When I click on the picture, I can't copy it into SSMS. So it won't run. So I can't help. Sorry!
You really need to read this article:
September 15, 2020 at 3:24 am
Viewing 15 posts - 586 through 600 (of 3,480 total)