Hi guys I keep getting this error and I can’t figure it out. It works when I run the query in the database tool but not when it’s in my Microsoft web dev. The error i get is: An expression of non-boolean type specified in a context where a condition is expected, near ‘GROUP’. Code: Tha…
Tag: sql
Select all from one table where some columns match another select
I have two differents tables. The have some columns in common, for this example lets say ‘name’ and ‘id’. By making ( SELECT name,id FROM table1 EXCEPT SELECT name,id FROM table2) UNION …
SQL rounding does not appear to work as expected
I have the following SQL query. DECLARE @StartDate DATE =’20160101′ , @EndDate DATE = ‘20160331’, @Box1 DECIMAL, @Box2 DECIMAL, @Box3 DECIMAL, @Box4 DECIMAL, @Box5 …
how to select multiple rows using where (two conditions) in sql?
When the condition is based on one column, I can use either IN, AND, or OR, but if the condition is based on two columns, how to write the query? For example, I need to set up the value of column 1 to NULL in the following rows: column 2 = ‘red’ AND column 3 =’ Monday’, column 2 =
add bool column within existing table
I am trying to dd a column, to a database with the program Microsoft SQL Server Management Studio. I already have a database, with a table, in that table i need to add another column.. but it keeps saying it cannot find type bool or boolean. my code : Any ideas ? side question, any idea how to alter an
MS-Access SQL DISTINCT GROUP BY
I am currently trying to SELECT the DISTINCT FirstNames in a GROUP, using Microsoft Access 2010. The simplified relevant columns of my table looks like this: My actual table contains two columns to which I want to apply this process (separately), but I should be able to simply repeat the process for the other…
PhpStorm SQL code autocomplete
I have used PhpStorm 10, but recently they released a new version. In PhpStorm 10 it was very comfortable to autocomplete SQL code. I could start typing the column name and autocompletion continued my code. At the new version (PhpStorm 2016.2.1) you have to start typing with the table prefix before column nam…
Can I fetch multiple different SQL statements in one times loop? in PHP
I have to query SQL-SERVER’s Query and MYSQL’s Query (That have the same result format but it’s difference database) , But I want to call them in one while loop in PHP, Can I do that? Ex. EDITED : I just have an solved answer. It’s work for me Idea from @Drew while(bContinue) this my c…
How can I prevent Quickbooks from changing the “DatabaseName” parameter inside the database .DSN file?
This “.DSN” file is re-created by Quickbooks every time no user is connected. I’m trying to configure an ODBC connection using “SQL Anywhere” driver, one of the mandatory parameters needed for the …
Can I add named computed columns in access sql query?
I need to make a stored procedure from SQL Server work in Access, and I am having a serious issue. When I try to run this query in Access, it asks me for a parameter named LNA, even when the value for …