Inconsistent DB Record Returns - Migrated AccessDB To SQL
I have a table in my DB that has 2 bit fields, one called Active and one called Public..For all records Active and Public are both set to 1/true
When my query is
Select Top 1000 * from [NewsStory] WHERE Active = 1
I get all my records
When I change Active to Public it returns nothing...even though I can see all the Public fields displaying true the exact same as the Actives beside them.
Select Top 1000 * from [NewsStory] WHERE Public = 1
Is there something wrong with my DB conversion import? I don't understand at all why Active = 1 works but Public = 1 fails..
Thanks for any help
Public is a SQL Server reserved word. When you use a column name that is a reserved word you must embed it in brackets. For example, you should be using
[Public] in your
- → I can't do a foreign key, constraint error
- → How to implement DbDongle::convertTimestamps as workaround of invalid timestamps with MySql strict
- → MySQL error "Foreign key constraint is incorrectly formed"
- → Eloquent Multitable query
- → "Laravel 5.1" add user and project with userId
- → Database backup with custom code in laravel 5 and get the data upto 10 rows from per table in database
- → Laravel 5.1 QueryException when trying to delete a project
- → Using Array in '->where()' for Laravel Query Building
- → Chaining "Count of Columns" of a Method to Single Query Builder
- → Laravel Eloquent Joining Strange query
- → convert time using mysql laravel 5
- → How to update a column after an expiration date in MySQL?
- → Foreign key constraint fails on existing key