Forum Replies Created

Viewing 15 posts - 1 through 15 (of 23 total)

  • Reply To: SQL COUNT issue

    Many thanks ktflash - worked like charm.

  • Reply To: SSRS parameter

    OK, so I found the issue with my second error.  I needed a second dataset to populate the parameters in the first dataset.

    SELECT [arr].Users,[arr].Groups

    FROM [dbo].[UserGroups]

    The issue I am having now...

  • Reply To: SSRS parameter

    I found my mistake.

    But when I run the report I get "An error occurred during local procesing. The report parameter 'GroupSearchTerm' has a defaultvalue or a validvalue that depends that...

  • Reply To: SSRS parameter

    I get an error trying to create the stored procedure

    Incorrect syntax near '@GroupSearchTerm'.

     

  • Reply To: #Temporary table in query not working

    Thanks, it works now

  • Reply To: Stored Procedures

    Yes I tried Openrowset, but unfortunately they have the SQL Server 2017 in compatibility mode 2012 and openrowset won't work. 🙁

  • Reply To: Stored Procedures

    CREATE PROCEDURE [dbo].[Excluded_List]

    AS

    CREATE TABLE #TempTable (Software NVARCHAR(MAX));

    BULK INSERT #TempTable

    FROM 'c:\temp\EXCLUDE_LIST.txt'

    WITH

    (

    DATAFILETYPE= 'char',

    FIELDTERMINATOR=',',

    ROWTERMINATOR='\r' -- Carriage Return

    );

    SELECT * FROM #TempTable;

    -- Remove our temporary table.

    DROP TABLE #TempTable

  • Reply To: Stored Procedures

    Have you created or are you creating the stored proc? Yes

    Why are you not allowed to use a temp table? Politics

    what do you want to do with the results of...

  • Reply To: Stored Procedures

    Ok how do I use a Table Variable

     

    Additional Info:

    The temporary Table in my Stored Procedures reads a text file to populate the temporary Table.  I then use a Select *...

  • Reply To: NOT IN with OpenRowSet

    Hi Jeff, It works great!  I did some initial testing and two thumbs up.

    I will test further and if any issues pop up, I will post it.

    Thanks again

     

  • Reply To: NOT IN with OpenRowSet

    Yes each model is on a separate line in the file followed by a comma.  Commas could be removed

  • Reply To: NOT IN with OpenRowSet

    The text file just contains a list of Models:

    GRX,

    TRX,

    VRX,

    WRX,

    NRX,

    PRX

     

  • Reply To: NOT IN with OpenRowSet

    I have no choice.  I can't - not allowed to store in a table.

    I have to use a text file 🙁

    I have been trying LTRIM and no luck.  I am...

  • Reply To: NOT IN with OpenRowSet

    Yes I thought of LTRIM - just wasn't sure how to do it with this query:

    DECLARE @Job_numbers VARCHAR(max)

    SELECT @Job_numbers=BulkColumn

    FROM OPENROWSET(BULK 'c:\temp\SampleUnicode.txt', SINGLE_nCLOB) x;

     

    SELECT ModelName0

    FROM v_Manufac

    WHERE ModelName0 NOT IN

    (

    SELECT value FROM...

  • Reply To: NOT IN with OpenRowSet

    The OPENROWSET is doing this:

    (GRX, TRX, VRX, WXR)  and I want this:

    (GRX,TRX,VRX,WXR)   - No spaces

Viewing 15 posts - 1 through 15 (of 23 total)