Viewing 15 posts - 1,111 through 1,125 (of 3,489 total)
Like this?
https://stackoverflow.com/questions/420741/getting-list-of-tables-and-fields-in-each-in-a-database
I suppose you could easily find non-matching tables by grouping on column name and getting COUNT = 1?
SQLCompare by RedGate does that, I...
January 9, 2019 at 2:26 pm
January 9, 2019 at 12:13 pm
Figured out a small piece of this that was still wrong. I needed to change so that I get the MAX level for each course. Then it makes sense. (Because...
January 9, 2019 at 10:31 am
Here's an example I shamelessly copied out of Itzik Ben-Gan's T-SQL Querying book:SELECT custID, orderID, orderDate, val,
SUM(val) OVER (PARTITION BY custid, YEAR(orderDate)
ORDER BY orderDate
RANGE...
January 7, 2019 at 12:25 pm
(sorry for interrupting)
It's possible to do a running total (if you're using 2012 or later...)
See this: https://docs.microsoft.com/en-us/sql/t-sql/functions/sum-transact-sql?view=sql-server-2017
Look for the Cumulative Total.
PARTITION OVER is analogous to...
January 7, 2019 at 9:01 am
What if you do something like copy the column names from the first sheet, then loop through the rest of the sheets, and insert a new row above the existing...
January 5, 2019 at 6:39 pm
I think I get it... Here's a tiny subset of the columns in the Catalog table:SELECT ItemID
, c.[Name] as ReportName
FROM dbo.Catalog c
WHERE c.Type =...
January 4, 2019 at 5:28 pm
What if you insert the data in batches? That would make the transactions smaller, and maybe faster.
January 3, 2019 at 1:50 pm
the same row?
INSERT INTO MyTable(col1, col2, col3, col4) VALUES (@param1, @param2, @param3, @param4);
January 1, 2019 at 11:44 pm
What's the big deal? Use DATEDIFF() to figure out how old a bill (or whatever) is, and then use CASE to group into bins.
If you do this in SSRS,...
December 31, 2018 at 12:11 am
You realize that you have to rebuild your indexes when you do that, right? Only use SHRINKDB if you need to get back space you're not going to use for...
December 28, 2018 at 11:30 am
Got consumable data? (CREATE TABLE/INSERT scripts)??? Surely you've figured out how to do that by now. Unless you want just guesses instead of tested code.
December 28, 2018 at 10:22 am
Can you post your CREATE TABLE and INSERT scripts so we have a little bit of sample data? Invoices and . InvoiceLineItem structures are pretty standard. If you post the...
December 26, 2018 at 3:48 pm
Viewing 15 posts - 1,111 through 1,125 (of 3,489 total)