Windows 10: Microsoft SQL Server Management Studio query window INSERT statement results issue

Discus and support Microsoft SQL Server Management Studio query window INSERT statement results issue in Windows 10 Customization to solve the problem; Apologies. This is likely not the right Category. Tips to fix this appreciated. Environment: Workstation: 16GB RAM. 500MB SSD Windows 10 Pro 64-bit... Discussion in 'Windows 10 Customization' started by WindowsRich, Jul 31, 2020.

  1. Microsoft SQL Server Management Studio query window INSERT statement results issue


    Apologies. This is likely not the right Category. Tips to fix this appreciated.


    Environment:

    Workstation: 16GB RAM. 500MB SSD

    Windows 10 Pro 64-bit

    SQLServer 2019 Express Edition Just installed 2 weeks ago.


    Not available on workstation though some supporting libraries may be present, e.g. .NET framework 3.5 && 4.8 for Windows 10:

    Visual Studio

    C# compiler

    etc.


    Task: Select entered VARCHAR data.


    Error/roadblock steps to reproduce:

    Within Microsoft SQL Server Management Studio,

    I have a simple database "test2020" with 1 table "eligibleperson" with 6 columns 2 int, 4 nvarchar, and 1 primary/identify key personid.


    I hand-type copied from an Excel spreadsheet an INSERT statement:

    USE [test2020]

    GO

    SET ANSI_NULLS ON

    GO

    SET QUOTED_IDENTIFIER ON

    GO

    INSERT INTO dbo.eligibleperson

    Values

    820682 , N' Michael ',N'K ',N' Alley ',N' Active', 10003 ,

    820686 , N' David ',N'J ',N' Anderson ',N' Active', 10008 ,

    820687 , N' Lynn ',N'C ',N' Anderson ',N' Active', 10009 ,

    820688 , N' Bob ',N'A ',N' Anderson ',N' Active', 10010 ,

    820689 , N' Will ',N'H ',N' Banker ',N' Active', 10011 ,

    820690 , N' Ranesse ',N'T ',N' Barsanti ',N' Active', 10012 ,

    820696 , N' Carol ',N'Reid ',N' Belew ',N' Active', 10013 ,

    820698 , N' Cathy ',N'L ',N' Bertucci ',N' Active', 10015 ,

    820699 , N' Dennis ',N'K ',N' Bertucci ',N' Active', 10020 ,

    820701 , N' Bruce ',N'W ',N' Bilgers ',N' Active', 10030 ,

    820709 , N' Irene ',N'M ',N' Boden ',N' Active', 10036 ,

    820717 , N' Carl ',N'E ',N' Brooke ',N' Active', 10040 ,

    820718 , N' Tom ',N'Scott ',N' Streamer ',N' Active ', 10050

    GO


    The records were successfully inserted:

    USE [test2020]

    GO

    select * from eligibleperson

    GO


    results:

    personid firstname middlename lastname countrystatus countryid

    820682 Michael K Alley Active 10003

    820686 David J Anderson Active 10008

    820687 Lynn C Anderson Active 10009

    820688 Bob A Anderson Active 10010

    820689 Will H Banker Active 10011

    820690 Ranesse T Barsanti Active 10012

    820696 Carol Reid Belew Active 10013

    820698 Cathy L Bertucci Active 10015

    820699 Dennis K Bertucci Active 10020

    820701 Bruce W Bilgers Active 10030

    820709 Irene M Boden Active 10036

    820717 Carl E Brooke Active 10040

    820718 Tom Scott Streamer Active 10050


    Next I query:

    SELECT TOP 10 [personid]

    ,[firstname]

    ,[countrystatus]

    FROM [test2020].[dbo].[eligibleperson] where countrystatus='Active'

    GO


    No results are returned: 0 rows affected


    Why is this? Hopefully just a simple mistake on my part!


    I did notice this query

    SELECT TOP 10 [personid]

    ,[firstname]

    ,[countrystatus]

    ,LENpersonid personidlength

    ,LENfirstname firstnamelength

    ,LENcountrystatus countrystatuslength

    FROM [test2020].[dbo].[eligibleperson]

    GO


    Returns unexpected results:

    personid firstname countrystatus personidlengthfirstnamelength countrystatuslength

    820682 Michael Active 6 9 8

    820686 David Active 6 7 8

    820687 Lynn Active 6 6 8

    820688 Bob Active 6 5 8

    820689 Will Active 6 6 8

    820690 Ranesse Active 6 9 8

    820696 Carol Active 6 7 8

    820698 Cathy Active 6 7 8

    820699 Dennis Active 6 8 8

    820701 Bruce Active 6 7 8


    Notice

    personidlength is what I expect, 6

    firstnamelength is always longer than I would expect by 2

    countrystatuslength is always longer than I would expect by 2


    Is that a clue?


    TIA

    :)
     
    WindowsRich, Jul 31, 2020
    #1
  2. Brink Win User

    Announcing SQL Server Management Studio – 16.5.1 Release


    Source: Announcing SQL Server Management Studio 16.5.1 Release | SQL Server Release Services
     
    Brink, Jul 31, 2020
    #2
  3. Announcing SQL Server Management Studio – March 2016 Refresh


    Announcing SQL Server Management Studio – March 2016 Refresh

    Source: https://blogs.msdn.microsoft.com/sql...-shell-update/
     
    Cluster Head, Jul 31, 2020
    #3
  4. Ramit_09 Win User

    Microsoft SQL Server Management Studio query window INSERT statement results issue

    SQL Server Management Studio 18.1

    Microsoft has recently released an update of 'SQL Server Management Studio' software,version 18.1.

    But,none of the software versions worked in my PC,except the first release because I know I use Win 8.1 Pro 32-bit.So just ignore it!

    The thing is,I want to connet to a SQL Server.

    The first release installed well,and now asking for a SQL Server Name. How to get that ?!!? This is my query.

    Ofcourse I tried downloading SQL Server 2017 and 2016,from microsoft but...I'm aware of whats the maximum thing youtube can give me too! So theres that. And yes,I tried the documentation part as well.

    I also asked few MS Agents,we had a nice chat.Something about restarting the PC was going on but then this-and-that happened to I gave up.

    Wanna help ??
     
    Ramit_09, Jul 31, 2020
    #4
Thema:

Microsoft SQL Server Management Studio query window INSERT statement results issue

Loading...
  1. Microsoft SQL Server Management Studio query window INSERT statement results issue - Similar Threads - Microsoft SQL Server

  2. Microsoft SQL Server Management Studio / Windows 10 s

    in Windows 10 Gaming
    Microsoft SQL Server Management Studio / Windows 10 s: I saw a forum response related to MSSMS, indicating that since this program is not available in the Microsoft Store, it could not be installed on machines running Windows 10 s. I have the same question related to Microsoft SQL Server Express. Is there any way those programs...
  3. Microsoft SQL Server Management Studio / Windows 10 s

    in Windows 10 Software and Apps
    Microsoft SQL Server Management Studio / Windows 10 s: I saw a forum response related to MSSMS, indicating that since this program is not available in the Microsoft Store, it could not be installed on machines running Windows 10 s. I have the same question related to Microsoft SQL Server Express. Is there any way those programs...
  4. Microsoft SQL Server Management Studio / Windows 10 s

    in Microsoft Windows 10 Store
    Microsoft SQL Server Management Studio / Windows 10 s: I saw a forum response related to MSSMS, indicating that since this program is not available in the Microsoft Store, it could not be installed on machines running Windows 10 s. I have the same question related to Microsoft SQL Server Express. Is there any way those programs...
  5. Failed setup of Microsoft SQL Server Management Studio

    in Windows 10 Gaming
    Failed setup of Microsoft SQL Server Management Studio: Hi,I am trying to install SSMS locally in order to connect to an Azure SQL Database. The installation does not work as displayed below, how can I resolve this issue?...
  6. Failed setup of Microsoft SQL Server Management Studio

    in Windows 10 Software and Apps
    Failed setup of Microsoft SQL Server Management Studio: Hi,I am trying to install SSMS locally in order to connect to an Azure SQL Database. The installation does not work as displayed below, how can I resolve this issue?...
  7. Microsoft SQL Server Management Studio: Too Large Result Set Disconnects DB

    in Windows 10 Network and Sharing
    Microsoft SQL Server Management Studio: Too Large Result Set Disconnects DB: Good Evening, This is an issue I have when connecting to a DB on another VPN/Domain using the cisco VPN client. Though the DB in question is on another domain, once connected via the client. Can access servers in both domains for file transfer etc. So typically only one...
  8. File Explorer is Not Responding After Opening Query in SSMS SQL Server Management Studio...

    in Windows 10 Network and Sharing
    File Explorer is Not Responding After Opening Query in SSMS SQL Server Management Studio...: File Explorer Didn't respond for a moment while Alt+Tab Or Windows Switched via Mouse after opening query in SQL Server Management Studio This issue is arriving just now from September 12. Issue came in my Colleague PC too....
  9. SQL Server Management Studio 18.4 closes when trying run a query

    in Windows 10 Software and Apps
    SQL Server Management Studio 18.4 closes when trying run a query: SQL Server Management Studio 18.4 closes when I try run any query. I got this message: Faulting module: Microsoft.NET\Framework\v4.0.30319\clr.dll Something wrong with clr.dll file. Any ideas how to fix it?...
  10. sql server management studio

    in Windows 10 Customization
    sql server management studio: Hi! I have been using an electronic health record system for the past 10 years. I am retiring soon but will still need access to the 'ehr' information for 7 years. The people who run the program that I use tell me that the information is in sql. I have a choice how to access...