Forum Replies Created

Viewing 15 posts - 2,371 through 2,385 (of 3,480 total)

  • RE: How to get the source query?

    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...

  • RE: Delele condition

    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...

  • RE: Sql Query

    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...

  • RE: How to get the source query?

    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.

  • RE: Cumulative values along rows

    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...

  • RE: How to update a boolean report parameter based on a dataset's results

    make the boolean parameters calculated? (based on whatever is in the other dataset(s))

  • RE: Report Builder Role

    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...

  • RE: Need to Show Item Only Once in a List

    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...

  • RE: Need to Show Item Only Once in a List

    like falling down...

    SELECT PartNumber, SerialNumber, MAX(InspectionDate) AS LastInspection

    FROM MyTable

    GROUP BY PartNumber, SerialNumber

    ORDER BY PartNumber, SerialNumber;

  • RE: crystal report cannot select into temp table

    Okay, so humor everybody...

    post the entire stored procedure... pin the tail on the donkey isn't our favorite game.

  • RE: Split Row

    Use DelimitedSplit8K[/url]

    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;

  • RE: t-sql 2012 pass paramter value to cte

    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...

  • RE: Finding the first credit balance date

    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...

  • RE: Finding the first credit balance date

    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...

  • RE: Reports select all not working

    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...

Viewing 15 posts - 2,371 through 2,385 (of 3,480 total)