Forum Replies Created

Viewing 15 posts - 3,616 through 3,630 (of 8,731 total)

  • RE: Does anyone know what this verbage means ?

    It basically adds a value to the Description property of the column. It changes only the metadata of the column for documentation purposes. You could also do it using the...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Does anyone know what this verbage means ?

    Maybe they're talking about something like this:

    EXEC sp_addextendedproperty

    @name = N'Description', @value = 'ICD 10 code type',

    @level0type = N'Schema', @level0name = 'dbo',

    @level1type = N'Table', @level1name = 'CODE_MAP_IN',

    @level2type = N'Column',...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Help with a query, plz

    This should help:

    https://msdn.microsoft.com/en-us/library/ms189773.aspx

    Unless what you're looking for is the UNION ALL or UNPIVOT.

    For better help, read the article linked in my signature.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Suggestions/Help With SQL Data Manipulation

    If you're sure that there won't be any missing/duplicate entries (two consecutive enroll dates without disenroll dates or viceversa), this can do the trick.

    WITH cte AS(

    SELECT...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Multi select with cte

    I was going to provide an alternative using LAG, but I didn't want to spend much time testing and guessing the exact requirements. Especially with those offsets.

    WITH

    te_basis AS

    (

    ...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Bulk Insert not working

    Is your csv separated by tabs? If not, you should correct the format file accordingly.

    Are the files (csv and format file) located in the server? You're using local paths which...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Is BCP queryout limited?

    Can you post what you're doing?

    This doesn't give an error.

    DECLARE @cmd_bcp varchar(8000)

    SET @cmd_bcp = 'bcp "SELECT BusinessEntityID, PersonType, NameStyle, Title, FirstName, MiddleName, LastName, Suffix, EmailPromotion, AdditionalContactInfo, Demographics, rowguid, ModifiedDate FROM...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Is BCP queryout limited?

    What do you mean by "using @cmd_bcp to generate my BCP command"? Are you storing the command in a variable? Are you using the correct data type for the variable?...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: T-sql 2012 with uniqueidentifier issue

    What's the error/problem that you're having?

    Are you assigning the correct data types in the wizard?

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: SQL Server on Linux

    Lee Nadelman (12/28/2015)


    An April Fools joke on Christmas certainly goes against the spirit of the season.

    Today is the equivalent of April fools in Spain, Hispanic America and the Philippines. https://en.wikipedia.org/wiki/April_Fools%27_Day#Comparable_prank_days

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Dynamic Query issue

    It seems like your code can be rewritten like this

    SELECT *

    FROM TblMain m

    Where EXISTS ( SELECT 1

    ...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: The Most Common Query Blunders...

    Eric M Russell (12/28/2015)


    TheSQLGuru (12/28/2015)


    Ooh, another thing I will chime in with. Some of the WORST things I see done on SQL Server have nothing to do with the databases/applications...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Get two sales item code exclusively from invoice

    A small correction from Eirikur's code and two additional options.

    SELECT

    SI.invno

    FROM dbo.TBL_SALES_ITEMS SI

    WHERE SI.SIC IN ('111','222')

    GROUP BY SI.invno

    HAVING COUNT( DISTINCT SI.SIC) = 2;...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Having a programmer pass a CSV text string variable to a parameter in an SSRS Report using 2012

    Either use the "Allow multiple values" option in SSRS. Link

    Or use the DelimitedSplit8k in your query. Link[/url]

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Need to negate a where clause

    Shouldn't it be like this?

    SELECT COUNT(*)

    FROM dbo.G_MASTER_CODING_RESULTS AS mcrWITH (NOLOCK)

    WHERE mcr.REVIEW_TYPE = 'A'

    AND MCRNUS.Col_A <> 96

    AND MCRNUS.Col_B <> 100

    AND MCRNUS.Col_C <> 100

    AND MCRNUS.Col_D <> 100

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2

Viewing 15 posts - 3,616 through 3,630 (of 8,731 total)