Getting Extra Rows in DB Defaultly

  • Hi All,

    While updating the data from Excel sheet to DB, i am getting extra Rows at the last of the DB table by default.

    Can anyone help on this

    Thanks

  • It's how SSMS works. You can manully enter data in there (not that it's a best practice).

    That is not a row from the table.

  • Hi,

    I dont want that to be present in my DB... Is there any way to avoid that Default Row in DB ??

    Thanks

  • I have seen this issue but I am not very sure on the reason. It looks like SQL Server (or Excel) considers all Excel rows valid if they are touched. It considers those rows with NULL data & populate with the same.

    I didn’t troubleshoot on Excel’s behaviour. Time was crunching so I just cleaned SQL Server data & moved forward for Development tasks.

  • Hi Dev,

    Actually My loop will run until some data is present in the column and if no data is available it breaks the loop...

    So in that case, there is no need of extra rows at the last.

    There is no harm to the number of record inserted, but i feel without that extra Rows DB looks much better..

    Thanks

  • ns22boss (12/13/2011)


    Hi,

    I dont want that to be present in my DB... Is there any way to avoid that Default Row in DB ??

    Thanks

    Delete where <your id field> IS NULL

    If you see 0 rows affected then you either messed up the query or you didn't have that row in the table.

  • Ninja's_RGR'us (12/13/2011)


    ns22boss (12/13/2011)


    Hi,

    I dont want that to be present in my DB... Is there any way to avoid that Default Row in DB ??

    Thanks

    Delete where <your id field> IS NULL

    If you see 0 rows affected then you either messed up the query or you didn't have that row in the table.

    That's exactly what I did... 😀

  • Or debug your excel code and see what it enters 1 null for everything row.

    Not a bug with SS in any way.

  • Thanks Ninja's_RGR'us and Dev for your prompt Response.

Viewing 9 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic. Login to reply