Forum Replies Created

Viewing 15 posts - 1,156 through 1,170 (of 1,413 total)

  • Reply To: Query to fetch quarter & year from date

    VSSGeorge wrote:

    Year & Quarter from the UI form.

    @QuarterID                        bigint

    @Year                                   bigint

    Bigint really?  It's like parking...

    • This reply was modified 6 years, 4 months ago by Steve Collins. Reason: add the part with max(...)

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: Convert column values into single row comma separator

    pietlinden wrote:

    SELECT ServerName + ', ' AS 'data()'
    FROM ServerList
    FOR XML PATH('');

    That's nice.  I've only ever seen string aggregation (prior to Sql Server 2016) done with the the...

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: Workaround for executing dynamic sql in function

    select
    concat(emp_lname, ',', emp_fname, '-', emp_key) lf_name,
    city_name,
    city_zip
    from
    emp_info;

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: Dynamic Cleanse Commands and Check Queries - Design Ideas

    "Excel, I love ya, but we need to talk about your personal habits..."  Overall it could be a workable system although it is based (heavily) on dynamic sql.  To expect...

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: JSON Header structure

    The file with the required json format doesn't appear to be working.  It's hard to know without seeing it.  Generally speaking concatenation and trimming shouldn't cause any issues.  Maybe this...

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: How to write query on column with list of delimited categories

    pietlinden wrote:

    That was cheating-level easy... except you need a helper function, Jeff Moden's DelimitedSplit8K function. It's here https://www.sqlservercentral.com/articles/tally-oh-an-improved-sql-8k-“csv-splitter”-function

    The OP is splitting nvarchar(255) and Jeff's other splitter 'DelimitedSplitN4K' targets nvarchar.  Also...

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: How to write query on column with list of delimited categories

    Not sure what TVP has to do with this.  Could you provide a solution?

    So I realize the OP is working with 2008R2 here.  Also in 2016 the string_split() function was...

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: Find and Copy Data from Another Table

    Sorry I didn't look to see this was about Access.  The following should work as a Pass-Through query:

    UPDATE Items INNER JOIN Customers ON Items.ID = Customers.ID SET...

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: Insert Data and read all Foreign Keys/Constraints first

    TRACEY-320982 wrote:

    I will be dealing with 2000 tables and approx 1 million in some tables.

    It is a data migration from one system to another with a mapping in between of...

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: Find and Copy Data from Another Table

    update c
    set
    dob=i.dob
    from
    customers c
    join
    info i on c.id=i.id;

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: math issue

    Does this return the correct answer?

    declare
    @company_name varchar(36)='Cash4WhateverTX',
    @return_code ...

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: math issue

    ;with
    c4w_cte(co_name_count) as (
    SELECT CAST((Count(rr.[company_name]) + 1) AS decimal(10,2))
    FROM [dbo].[return_rows] rr
    WHERE [return_code] = 'R01'
    AND rr.[company_name] =...

    • This reply was modified 6 years, 4 months ago by Steve Collins. Reason: Mis-pasted

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: Insert Data and read all Foreign Keys/Constraints first

    ScottPletcher wrote:

    I think it would be more accurate and far less work to rely on the existing constraints. 

    Yes yes.  Even if checks are performed in advance it's no guarantee the...

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: Excecute dynamic

    Phil Parkin wrote:

    DBCC TIMEWARP at its best.

    Then set the recovery model to "Trust Me We'll Be OK"

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

  • Reply To: SQL Server Agent not running on Linux

    What happens if you restart the service?  According to the docs the service needs to be restarted after 'set sqlagent.enabled true'.  If that doesn't work I'd make a support call.

    Aus dem Paradies, das Cantor uns geschaffen, soll uns niemand vertreiben können

Viewing 15 posts - 1,156 through 1,170 (of 1,413 total)