Forum Replies Created

Viewing 15 posts - 271 through 285 (of 670 total)

  • RE: How to get records batch wise?

    for clarification. The OP mentioned that UserId was unique (although somewhat hidden)

    Here is the query:

    SELECT [USERLOGIN]

    ,[USERFIRSTNAME]

    ,[USERLASTNAME]

    ,[ACTIVETODATE]

    ,[ACTIVATED]

    ,[DEACTIVATED]

    ,[USERID] - Unique ID

    FROM

  • RE: CURSORS Versus SETS

    Typo on the year in the last record. It has a year of 2106 instead of 2016

  • RE: How do I edit a package created with Import/Export Wizard?

    You need to connect to Integration Services and look under MSDB. Also the wizard is fine, but everything is hardcoded in the packages (connection settings, userid, password (if applicable),...

  • RE: referencing same column in same table but coulum has different values

    Your joins are not going to work. You have type_id 98 in one table and type_id 120 in another. What is Code_ID? How do these tables relate...

  • RE: How to get records batch wise?

    select UserID, [USERLOGIN]

    ,[USERFIRSTNAME]

    ,[USERLASTNAME]

    ,[ACTIVETODATE]

    ,[ACTIVATED]

    ,[DEACTIVATED]

    ,[USERID]

    from (

    SELECT [USERLOGIN]

    ,[USERFIRSTNAME]

    ,[USERLASTNAME]

    ,[ACTIVETODATE]

    ,[ACTIVATED]

    ,[DEACTIVATED]

    ,[USERID] ,

    Row_number() over (order by UserID) Row

    FROM ) v

    where Row between 1 and 100 -- increment here

    --where Row between 101 and 200 -- etc...

    -- DDL

    --create...

  • RE: How to get records batch wise?

    why doesn't your table have a primary key? What order do you want them returned in? I would look into using Row_Number and paging methods

  • RE: Update Statement

    It's very difficult to figure out what you are asking and what you are expecting as a result. Can you post some sample data and what you are expecting...

  • RE: Get tables size info from all databases from sql server

    Borrowing Eirikur's query, you can always use sp_MsForEachDB

    USE master;

    GO

    SET NOCOUNT ON;

    IF OBJECT_ID(N'tempdb.dbo.temp_result') IS NOT NULL DROP TABLE tempdb.dbo.temp_result;

    CREATE TABLE tempdb.[dbo].[temp_result]

    (

    [DATABASE_NAME] [nvarchar](128) NOT NULL

    ,[TableName]...

  • RE: Bulk Insert not working

    I just ran into this myself. I found 2 different approaches: The first was to use a format file. That seemed to work most of the time,...

  • RE: Delete duplicate records from Archived Table the exist in the unarchived table.

    Welsh Corgi (12/28/2015)


    Welsh Corgi (12/28/2015)


    I just need to convert the following into a Delete Statement for the records in Database PrismDsta.

    Thank you.

    Your code is very cleaver and the other post...

  • RE: Cursor-Killing: Accessing Data in the Next Row

    jfogel (12/18/2015)


    Interesting that this comes up just days after I had to perform this very type of operation. I was determined to not use a loop especially given that I...

  • RE: SSISDB question

    That's what my concern was too. The problem in your solution is that Archive Folder is in a parameter already. I put the parms and values in a...

  • RE: SSISDB question

    I have about 15 variables for one package. I created a stored proc that takes all these variables. Then I call 3 procs in the SSISDB database:

    ...

  • RE: SSISDB question

    That's the procedure I am calling. I explicitly created a nvarchar variable and passed it into this proc. When this line runs, it returns Varchar instead of Nvarchar

    SET @variable_type...

  • RE: Verifying syntax before running the query

    It's not just a date field, they are allowed to add other criteria. It's just that the date was an easy example to show how they syntax would be validated....

Viewing 15 posts - 271 through 285 (of 670 total)