Forum Replies Created

Viewing 15 posts - 586 through 600 (of 3,543 total)

  • RE: Are the posted questions getting worse?

    GilaMonster (12/18/2014)


    Entertainment for next week = 1600 line long module (front end, not SQL) with no comments, erratic indentation and no naming standard.

    Oh! Joy 🙂

    Sounds like one of my old...

  • RE: Combining two databases DB1 & DB2 tables Sql query to one Sql Query

    Change the table reference in DB1 to DB1.dbo.ITEM

    Change the table reference in DB2 to DB2.dbo.ITEM

    and add UNION ALL between the two

  • RE: Designing a "Web" dashboard to monitor SQL Server Jobs

    I would be interested Jeff 😀

  • RE: Designing a "Web" dashboard to monitor SQL Server Jobs

    No problem didn't think it was reports, my interpretation was querying a list of servers for status values and showing good/bad (green/red) traffic light for the status text in question.

    You...

  • RE: Designing a "Web" dashboard to monitor SQL Server Jobs

    Not sure if there is specific articles that would give you a complete solution but my answer for this would be

    A repeater control populated with a datasource containing details for...

  • RE: Full Text Search - Wild card searches

    * is used in prefix only ie gold* not *gold or *gold*

    One possibility, if possible, is to add additional column(s) with the data reversed and add to FTS and then...

  • RE: How to sum columns from subqeri in ms sql 2000

    There are several problems

    Your insert statements have errors

    fs_tran_date matching wrong date for data supplied

    fs_locn_code does not exist

    fs_locn = 'CHN' will ignore two values and will not give you the result...

  • RE: STUFF Function

    WITH vv (VCHVendor,VGLVoucher)

    AS (SELECT DISTINCT VCHVendor,VGLVoucher

    FROM VoucherGLDist vgl

    JOIN Voucher v ON v.VCHVoucherNbr = vgl.VGLVoucher

    WHERE vgl.VGLJEBatch = 21174)

    SELECT vv.VCHVendor, SUM(vgl.VGLAmount) AS [VGLAmount],

    STUFF((SELECT ','+ b.VCHInvoiceNbr

    FROM VoucherGLDist a

    JOIN Voucher b ON b.VCHVoucherNbr =...

  • RE: STUFF Function

    What was expected is

    Create tables

    CREATE TABLE dbo.VoucherGLDist (

    VGLVoucher INT Not Null,

    VGLJEBatch INT Not Null,

    VGLAmount Money Not Null)

    GO

    CREATE TABLE dbo.Voucher (

    VCHVendor INT Not Null,

    VCHVoucherNbr INT Not Null,

    VCHInvoiceNbr Varchar (20) Not...

  • RE: Replace multiple characters based on table values

    Solution for additional maths

    SELECT (SELECT ISNULL(CAST(t.Total as varchar(10)),f.Item)

    FROM master.dbo.DelimitedSplit8K(

    REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(@formula,'+','|+|'),'-','|-|'),'*','|*|'),'/','|/|'),'(','|(|'),')','|)|')

    ,'|') f

    LEFT JOIN Totals t ON t.RowNo = f.Item

    ORDER BY ItemNumber

    FOR XML PATH (''))

  • RE: Replace multiple characters based on table values

    If the formula is addition only then using Jeff Moden's splitter

    SELECT STUFF((SELECT '+' + CAST(t.Total as varchar(10))

    FROM DelimitedSplit8K(@formula,'+') f

    JOIN Totals t ON t.RowNo = f.Item

    ORDER BY ItemNumber

    FOR XML PATH ('')),1,1,'')

  • RE: STUFF Function

    mhildebrand (12/11/2014)


    Lynn that is very close to what I am looking for, but here is what it gave me (when applied to the tables as they already exist (the vendor...

  • RE: remove non-numeric values from a nvarch column

    LEFT(@housenumber,PATINDEX('%[^0-9]%',@housenumber+' ')-1)

  • RE: Cover page before data and instructions after data for each group

    Right click on department group row in the table

    Insert row outside group above

    Insert another row outside group above

    Insert row outside group below

    Move headings to 2nd of top rows

    Delete old heading...

  • RE: Wrap a varchar field based on character count and spaces

    WITH cteStart(N1) AS (

    SELECT t.N+1 FROM dbo.Tally t

    WHERE t.N < LEN(@Parameter)

    AND SUBSTRING(@Parameter,t.N,1) = ' '

    ),

    cteLen(N1,L1) AS (

    SELECT s.N1,

    ISNULL(NULLIF(CHARINDEX(' ',@Parameter,s.N1),0)-s.N1,8000)

    FROM cteStart s

    ),

    words (N1,Word,Grp) AS (

    SELECT l.N1,SUBSTRING(@Parameter, l.N1, l.L1),CEILING(l.N1 / 50.0)

    FROM...

Viewing 15 posts - 586 through 600 (of 3,543 total)