245 Answered Questions for the topic SQL

03/18/19

It it possible to grab SQL tables from a QuickBooks QBM file. Perhaps there is an SQLite Database in there?

It would simplify data import for our software if I could export the tables to SQL or CSV or other workable format. We often export from QuickBooks and import into our software and it would be... more
Sql

03/18/19

How to use count and group by at the same select statement?

I have an sql select query that has a group by. I want to count all the records after the group by statement. Is there a way for this directly from sql? For example, having a table with users I... more

Trying to convert geometry to geography keep failing in MSSQL 2012?

In MSSQL I have LineString in Geometry type. When I try to convert it to geography using : ... more

03/18/19

Needing to find parent zip code of a bunch of missing zip codes in the US?

We're using MapPoint to export zip code / territory combinations. Unfortunately, the export doesn't include PO Box zip codes which mean that we're missing a lot of zip codes The PO Box zip codes... more
Sql

03/18/19

Favourite performance tuning tricks?

When you have a query or stored procedure that needs performance tuning, what are some of the first things you try?
Sql

03/16/19

How do I list all the columns in a table?

For the various popular database systems, how do you list all the columns in a table?
Sql

03/16/19

How can I copy data from one column to another in the same table?

Is it possible to copy data from column A to column B for all records in a table in SQL?
Sql

03/15/19

What is the fastest way to count the exact number of rows in a very large table?

I have come across articles that state that `SELECT COUNT(*) FROM TABLE_NAME` will be slow when the table has lots of rows and lots of columns. I have a table that might contain even billions of... more
Sql

03/14/19

How to request a random row in SQL?

How can I request a random row (or as close to truly random as is possible) in pure SQL?
Sql

03/14/19

SQL multiple column ordering?

I am trying to sort by multiple columns in SQL, and in different directions. `column1` would be sorted descending, and `column2` ascending. How can I do this?
Sql

03/14/19

I want to use CASE statement to update some records in sql server?

UPDATE dbo.TestStudents SET LASTNAME = ( CASE WHEN (LASTNAME = 'AAA') THEN 'BBB' WHEN (LASTNAME = 'CCC') THEN 'DDD' WHEN (LASTNAME = 'EEE') THEN 'FFF' ELSE (LASTNAME) END... more

Area between two longitudes?

I am trying to compute the area between two longitudes (using the angle between them) but am having a hard time. I can do that more easily between latitudes but longitude reveals to be... more
Sql

03/13/19

SQL JOIN and different types of JOINs?

What is a SQL `JOIN` and what are different types?
Sql

02/18/19

sql error, can you please tell me what I am doing wrong

can you explain what I did wrong I Am trying to make an sql table in Microsoft Access but I am getting a syntax error for create table with the following code:CREATE TABLE SALES_REP (REP_NUM CHAR(... more
Sql Php Mysql

01/10/19

How do I get the size of a particular table in MySQL database?

04/14/18

i need help with PL/SQL (Oracle)

Write a complete PL/SQL program that enables a user to interact with a database of your choice (for example you may choose employee database, or student, or a library database, … etc). The database... more
Sql

09/02/15

Sql doubt regarding datatype

In sql there is a datatype int for integer values and varchar is for either integer or words, so if i want to input like A28 which datatype should i use?

03/24/15

visual basic: get php Query from text box

How can I get url Query from text box and put it line by line in richtextbox. exemple:I want to get query from textbox1.text :http://www.mywebsite.com/test.php?id=4&url=3&bakgroundid=951and... more

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.