Are databases single-threaded?

Let's say there is a hospital that runs a simple database. In this database is a table called "patients" with 1,000,000 records--each record being a patient whose status is either "active" or "discharged". Bob runs the following query that will take...
more »

2017-04-21 18:04 (1) Answers

Database import error syntax

I have tried to import my sql database into Phpmyadmin because I'm moving to another hosting. I'm having a similar kind of error when trying to add another database. I don't know where the problem is. Could it be because my old or new server has som...
more »

2017-04-20 11:04 (2) Answers

IF has 'Item Type' (Netsuite)

I need a way to specify whether a certain sales order has ANY inventory items (if yes, this will display certain formatting information on PDF/HTML template) I can't use suitescript or java or any type of coding on the Sales Order-side, so I need a ...
more »

2017-04-20 08:04 (2) Answers

When can I save JSON data in an SQL Table

When using SQL or MySQL (or any relational DB for that matter) - I understand that saving the data in regular columns is better for indexing sake and other purposes... The thing is loading and saving JSON data is sometimes a lot more simple. and mak...
more »

2017-04-19 13:04 (5) Answers

� IN SQL Server database

in my database I have this char �. I want to locate them with a query Select * from Sometable where somecolumn like '%�%' this gets me no result. I think it is ANSI encoding ...
more »

2017-04-18 16:04 (3) Answers

MSSQL - Masking data based on mapping table

wanted to perform data masking according to mapping as below by using MSSQL 2008R2: Mapping Table A = C B = A C = E 1 = 3 2 = 1 3 = 9 Original ABC123 Masked CAE319 The idea would be using replace however the second replace function will...
more »

2017-04-18 13:04 (2) Answers

Convert raw sql to zend or socialengine based

How can I convert this query to zend or social-engine based? Because zend has lots of complexity and is difficult to get what is wanted. SELECT u.user_id, u.email, u.username, u.likes + a.likes as `total_likes` FROM (SELECT SUM(activitie...
more »

2017-04-18 10:04 (0) Answers

Querying data from two databases in C#

I currently have a query where I am getting data from 2 different databases which is getting appended to one list called "accountbuys". My first table has three data entry(3 accounts which want to buy stocks The next table with 17 data points(17 st...
more »

2017-04-17 21:04 (2) Answers

How to UNION multiple databases as one source

I have 40+ databases (linked servers) in my SSMS connection, each has the same schema, tables, columns but with unique data for each individual location. I'm looking for the best way to UNION them all together into a VIEW or Alias that would allow me...
more »

2017-04-17 17:04 (1) Answers

Issues in creating dynamic SQL query

I was trying to create a dynamic SQL query, But unfortunately it shows an error: Msg 245, Level 16, State 1, Line 14 Conversion failed when converting the varchar value 'select count (s.ID), count (distinct (s.ID)) from SimulationVisit SV inner...
more »

2017-04-17 11:04 (5) Answers