Forum Replies Created

Viewing 15 posts - 3,466 through 3,480 (of 7,187 total)

  • RE: import to multiple excel files

    Here's one approach:

    (1) SELECT DISTINCT unitname FROM production

    (2) Loop through that result set something like this:

    SELECT pointname, pointdescription

    FROM production

    WHERE unitname = ?

    (3) Export the result of (2) to an Excel...

  • RE: How to validate data of a flat file source with the data of different tables of my database?

    Ashok

    How many rows of data do you have? The problem with the SCD, and your stored procedure approach, is that they process one row at a time, which can...

  • RE: Generate script to restore log backups

    Do you have access to the server on which the backups were made? If so, you can generate a script by querying the backupset tables in msdb. Alternatively...

  • RE: Status of maintenence job

    Go to SQL Server Agent and open Jobs. There should be a job called something like <Name-of-your-maintenance-plan>.Subplan_1. You'll be able to see whether that's still running or finished.

    John

  • RE: SQL QUERY HELP

    Yes, that should work, provided it doesn't break any referential integrity. Otherwise, use UPDATE with a JOIN, or MERGE.

    John

  • RE: SQL QUERY HELP

    Or use MERGE. This will handle the case where you have new fruits in the first table that aren't in the second.

    John

  • RE: SQL QUERY HELP

    Bilal

    A CREATE TABLE statement, as requested, would have been better, so that I can see whether the Required column allows NULLs. I take it there's nothing already in the...

  • RE: SQL QUERY HELP

    Bilal

    That's good. It's courteous to post your solution so that those who have helped you can see what you did, and also to help anyone else who has a...

  • RE: SQL QUERY HELP

    Bilal

    As Gail suggested, you need to use GROUP BY. It's well documented in Books Online and elsewhere. Also, what does your Result table look like?

    John

  • RE: SQL QUERY HELP

    bilal 17797 (7/14/2014)


    So far i managed to write a query which count distinct values in a column

    Please will you share that with us. We should be able to point...

  • RE: SQL QUERY HELP

    Bilal

    Is this homework? What have you tried so far?

    John

  • RE: SQL Agent Job- Foreground

    Two things you have to look out for when you run a package from a SQL Server Agent job:

    (1) Interactive components. Things like pop-up messages or user applications will...

  • RE: Maximum Tenancy Ref

    What I want though is just the Maximum row number for each place ref.

    Do it like I showed you. Change the ORDER BY to DESC instead of ASC,...

  • RE: Maximum Tenancy Ref

    Something like this?

    WITH Tenancies AS (

    SELECTLOC.[place-ref] AS 'Place Ref'

    ,PLA.address1 AS 'Address1'

    ,PLA.address2 AS 'Address2'

    ,PLA.address3 AS 'Address3'

    ,PLA.address4 AS 'Address4'

    ,PLA.address5 AS 'Address5'

    ,PLA.[post-code] AS 'Postcode'

    ,LOC.[location-sts] AS 'Location Status'

    ,LOC.[location-type] AS 'Location Type'

    ,LOC.scheme AS 'Scheme'

    ,LOC.[mgt-area] AS...

  • RE: Details to collected from sql servers for upgrading to 2012 version.

    Have you tried using the Upgrade Advisor?

    John

Viewing 15 posts - 3,466 through 3,480 (of 7,187 total)