Viewing 15 posts - 2,371 through 2,385 (of 3,480 total)
Googlefu turned up this:
select
Catalog.name,
cat1.Name datasource
from
Catalog
join DataSource
on Catalog.ItemID = DataSource.ItemID
join Catalog cat1
on DataSource.Link...
August 5, 2015 at 5:41 am
So how do you identify the records you want to save?
TOP 50 (with a cross apply).
then delete the rest... so either NOT IN ... or outer join...
August 4, 2015 at 8:56 am
Can't help without understanding the question. What does this mean?
"Need to put this into single SQL statement without update command."
What is the query supposed to do? Is it supposed...
August 4, 2015 at 7:27 am
If you open the report as an XML file, you'll see the <DataSets> section with <Query> delimiter. So you'd just use XQuery to grab the contents of that part.
August 4, 2015 at 7:03 am
Now that I've finally gotten this to work, this is how I did it. (I'm using 2012 but compatibility is 2008).
In all honesty, since I completely forgot how to...
August 3, 2015 at 12:01 pm
make the boolean parameters calculated? (based on whatever is in the other dataset(s))
July 31, 2015 at 7:12 pm
You can use something like this:
Note: DummyMVParam is a multi-value parameter in my report.
so this is what my test is doing:
If there are less than 4 values selected from the...
July 31, 2015 at 5:54 pm
without sample data, it's hard to tell, but my guess is that you're missing a WHERE clause...
SELECT PartNumber, SerialNumber, MAX(InspectionDate) AS LastInspection
FROM MyTable
WHERE PartNumber IS NOT NULL
GROUP BY PartNumber, SerialNumber
ORDER...
July 30, 2015 at 6:32 pm
like falling down...
SELECT PartNumber, SerialNumber, MAX(InspectionDate) AS LastInspection
FROM MyTable
GROUP BY PartNumber, SerialNumber
ORDER BY PartNumber, SerialNumber;
July 30, 2015 at 5:55 pm
Okay, so humor everybody...
post the entire stored procedure... pin the tail on the donkey isn't our favorite game.
July 30, 2015 at 12:19 pm
something like this:
SELECT test.Manager, test.Device, split.ItemNumber, Item = RTRIM(split.Item)
FROM #tbl_data test
CROSS APPLY dbo.DelimitedSplit8k(test.Manager,',') split;
July 30, 2015 at 11:06 am
CTEs are no different than any other query in that respect. You can pass parameters to them exactly the way you would in any other stored procedure.
SELECT ...
FROM ...
WHERE field...
July 29, 2015 at 6:31 pm
I left the balance part out because it's (sort of) a derived column. You could use a windowing function to do a running total to get it. Just...
July 26, 2015 at 6:45 pm
I did the CREATE TABLE and INSERT part...
CREATE TABLE accounts(
AcctID INT,
TranSeq INT,
TranDate DATE,
Amount MONEY
CONSTRAINT pkAccounts PRIMARY KEY (AcctID,TranSeq));
GO
INSERT INTO accounts(AcctID, TranSeq,tranDate,Amount)
VALUES (1, 1,'04/03/2014',223.00),
(1,2,'04/03/2014',129.00),
(1,3,'07/08/2014',-90.00),
(1,4,'07/08/2014',-73.00),
(1,5,'07/08/2014',-129.00),
(1,6,'08/07/2014',-58.80),
(1,7,'08/07/2014',-69.09),
(1,8,'11/26/2014',67.89),
(1,9,'12/30/2014',-67.89),
(1,10,'12/31/2014',-67.89),
(1,11,'05/29/2015',-67.89);
Was about to...
July 26, 2015 at 6:06 pm
Sorry but "doesn't seem to work" doesn't explain much. Please read this article this article[/url] and post the table definition, some sample data (not real data, just representative is...
July 23, 2015 at 5:33 pm
Viewing 15 posts - 2,371 through 2,385 (of 3,480 total)