Forum Replies Created

Viewing 15 posts - 511 through 525 (of 3,544 total)

  • RE: Formatted output

    You need to make a Cartesian of the 2 tables and then left join them, like this

    WITH a AS (

    SELECT DISTINCT allowance.empid,allowances.allid

    FROM allowance

    CROSS JOIN allowances

    )

    SELECT a.empid,a.allid,ISNULL(allowances.amount,0) AS [amount]

    FROM a

    LEFT...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: replace help

    Use Jeff Moden's splitter (see Alan's signature) to split the column, LEFT join your correction table and USE FOR XML to concatenate the result (using either the replacement text or...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Bulk insert from Excel

    Providing SQL Server has the correct permissions and access to the file you could install and use AccessDatabaseEngine to get data from the spreadsheet like this

    OPENROWSET (

    'Microsoft.ACE.OLEDB.12.0' ,

    'Excel...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: The Scientific Method: a call to action

    Jeff Moden (5/28/2015)


    Shifting gears, glad to see you still hang around here, ol' friend.

    Back at ya ol' friend 😀

    Yeah still around :w00t: mostly lurking, occasional post

    Lot of OP on heavy...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: The Scientific Method: a call to action

    Jeff Moden (5/24/2015)


    It's funny how people think that. If you get the product out the door and it's broken, you're going to need a whole lot more money to...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Are the posted questions getting worse?

    Sean Lange (5/21/2015)


    cunningham (5/21/2015)


    soooo this is where you lot go to blow off steam!

    Yes indeed!!! Welcome to the "water cooler" commonly referred to as "the thread". 😀

    Meh! The water is...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Joining on 3 tables isse

    ScottPletcher (5/19/2015)


    Select FROM the job table and user LEFT OUTER JOINs on the other two tables.

    Providing they are 1:1 relationships otherwise you would get a cartesian result

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: How to insert multiple rows with condition

    Use a Tally table (there is an article on this site by Jeff Moden)

    SELECT ROW_NUMBER() OVER (ORDER BY a.id,t.N),

    a.from_country,a.to_country,a.noofdays,DATEADD(day,t.N-1,a.datetravel)

    FROM #table a

    JOIN dbo.Tally t ON t.N BETWEEN 1 AND a.noofdays

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: How to correct this?

    That's an Access query and you need to answer Phil's question or even better supply complete table definition

    If the column is varchar then

    "SELECT tblSchoolYear.SchoolYearTitle" & _

    " FROM tblSchoolYear" & _

    "...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Image align on table

    Use two rows, one with two images the other with one image and use row visibility

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Hide tablix and space issue

    Use one tablix with two rows

    row 1 two columns legend+map

    row 2 one column (merge cells) map

    and use row visibility

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Add column data into report in Reporting Services

    In that case you use the following expression in a textbox

    =Switch(

    Fields!Errorcode.Value = 1, "Error 1",

    Fields!Errorcode.Value = 512, "Error 512",

    Fields!Errorcode.Value = 1024, "Error 1024",

    True,"Unknown Error")

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Add column data into report in Reporting Services

    Create another dataset in the report that uses SELECT and UNION ALL to generate a list of Errorcode and ErrorDesc

    In the relevant textbox of the report set the expression to...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: IIF statement argument not specified error

    The first line in fig 2 should be

    =IIf(Fields!Customer_Name.Value Is Nothing, "", Fields!Customer_Name.Value) + chr(13) + chr(10)) +

    Why are you removing First for CustomerName but using for Address?

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Running WinSCP in SSIS Task / .bat file

    Try directing the pipeline to the Out-File cmdlet

    Not actually tried it but something like this

    Write-Output ("Upload of {0} succeeded" -f $transfer.FileName) | Out-File c:\output\test.txt

    *Edited*

    You will need to include -append

    Far away is close at hand in the images of elsewhere.
    Anon.

Viewing 15 posts - 511 through 525 (of 3,544 total)