I have some troubles with passing through query to SQL Server. OS is RedHat 6. In SAS Enterprise Guide I try to execute this code: but I faced with error: ERROR: CLI execute error: [SAS][ODBC SQL Server Wire Protocol driver][Microsoft SQL Server]INSERT failed because the following SET options have incorrect s…
Tag: sql
How to check if field value is same as combobox value?
So I am making a SQL query in which value of combobox (cboVU) shoud be same as field in table called Vrsta uredaja in table O klima uredaju. I am making this query in Access 2016. I am getting this: Tables and relations: Answer To continue on @Nathan_Sav’s comment:
How do I access a field of nested user defined types?
How do I access the fields of user defined types when they are nested ? When I tried it using dot notation it failed: For example, how do I “compile” this code ? Trying to run it: Answer Looks like a PL/PgSQL deficiency. In normal SQL you can do so with but pl/pgsql doesn’t accept the same f…
Display contact database by all categories it is marked, then alphabetical order
I’m trying to build a Vendor Contact Database with categories. Various vendors are marked under more than one category. I have structured my table as the following: My Current Code This is just a basic idea. My contact database has more fields including phone number, email, etc. Seeing how our category …
Single result not showing when joining table
I have modified a SQL query in WordPress through a filter for the geomywp plugin so that I can search users by taxonomy and distance. The end query looks like this The term_taxonomy_id changes depending on what category they are searching for. The really weird thing about this is that it only works if there i…
Including null values in an Apache Spark Join
I would like to include null values in an Apache Spark join. Spark doesn’t include rows with null by default. Here is the default Spark behavior. val numbersDf = Seq( (“123”), (“456”), (null),…
SQL Server Select query with IN() and order by the same
I need a SELECT query with an IN clause, as well as Order by: select * from table where column_id IN (5,64,2,8,7,1) This code returns 1, 2, 5, 7, 8, 64. Now I need to return the same select in …
REGEXP_LIKE between number range
Can someone please finalize the code on the below. I only want to look for a 6 digit number range anywhere in the RMK field, between 100000 and 999999 The current code works but is bringing back anything with a number so I’m trying to narrow it down to 6 digits together. I’ve tried a few but no lu…
MySQL Error: : ‘Access denied for user ‘root’@’localhost’
$ ./mysqladmin -u root -p ‘redacted’ Enter password: mysqladmin: connect to server at ‘localhost’ failed error: ‘Access denied for user ‘root’@’localhost’ (using password: YES)’ How can I fix …
Update statement SQL with CTE
I have a common table expression that I am using trying to use as an update statement. The only reason for the CTE is so I can use a where clause to filter by CredCount. I would like to use that where clause to update only records that match in this case CredCount of 2. However, I am having trouble