Query Syntax

47K

Solutions

12

Articles & Videos

17K

Contributors

SQL (Structured Query Language) is designed to be used in conjunction with relational database products as of a means of working with sets of data. SQL consists of data definition, data manipulation, and procedural elements. Its scope includes data insert, query, update and delete, schema creation and modification, and data access control.

Related Topics

  1. Microsoft Access
  2. Microsoft SQL Server
  3. Microsoft SQL Server 2005
  4. Microsoft SQL Server 2008
  5. Databases
  6. MySQL Server
  7. Oracle Database
  8. PHP
  9. ASP
  10. Visual Basic Classic
Refine results

Its has been years since I wrote a curser and was hoping for some guidence.


Lets say I have a select statement that returns me a unique list of Customers

So here is the select

Select  …

26 views
Resolve Critical IT Incidents Fast
Resolve Critical IT Incidents Fast

If your data, services or processes become compromised, your organization can suffer damage in just minutes and how fast you communicate during a major IT incident is everything. Learn how to immediately identify incidents & best practices to resolve them quickly and effectively.

Trying to filter by current Month in a table.  I know I can use the "m" but not sure what to replace it with.  

1021 views

I have a stored proc..and due to the structure of this proc...the wizard in Reporting Services cannot detect this as a dataset.

Does anyone know how I might rewrite this so SSRS will read it and …

2511 views

Dear Experts,

I have a simple pivot query in SQL, which works in this format:

(CODE)

but does not work in this one:

(CODE)

because of getting error message:
The multi-part identifier …

812 views

I have a table of dates here are my column names

sample
(CODE)

My second Table OnCallSupport here is a sample
(CODE)

I need 1 person from each team to be on call. How could you join these …

1314 views

lets say I have a table called "billing"  that has thousands of accounts and then inside the billing table there  is a column called optionskey.  the column optionskey can be anyone of 100 numbers.  4…

320 views

I have the following Store proc.

I would like to rewrite this so its not stuff the select statement into a variable.

I would like this to be just a select statement with the where clause logic …

4256 views

does anyone have an application suggestion that will manage sql queries?

426 views

Hello there I am trying to create a recusion that creates an entry for a weekly  start and end Friday to Friday


(CODE)

Getting this error
(CODE)

616 views

Hi Guys,

I have the below query that shows a list of tables and number of rows and total space in GB. This query works really well, however I would like to create a stored procedure whereby I can …

1813 views
Webinar: Aligning, Automating, Winning
Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

I'm not highly skilled in SQL, and my query isn't working, and I'd like to know what I'm doing wrong.  I'm trying to write a query in MySQL to calculate a median.  My logic is straightforward:

1) …

422 views

I need to create a sql query very similar to the one listed in this article.  

http://marlonribunal.com/finding-gaps-in-or-missing-dates-using-tsql/

However,  instead of the results which are …

323 views

This is a little hard to explain but I will do my best.  I need to write/update the example query below  so that it will return the records requested, but also return records based on what was …

411 views

In SQL Server I call the following sproc, referenced by an SSRS report:

(CODE)

and get back a response of:

Command(s) completed successfully.

I don't get an returned rows.

Suggestions?

819 views

Hi I've got a table setup with data like this below:


I want to be able to do a search on MED AND CDN but doing the AND isn't working.  Only OR does.  Is there a way to do that in MySQL?  I just …

110 views

Hello all,

I have the following example data:

Table:  Customer
CustomerID   CustomerDate   CustomerCode    
1                      3/15/2017           ABC                      
2             …

724 views

This project still uses Visual Studio 2005 SQL Server Business Intelligence Development Studio and is doing some strange things.

I added a single column to an SSRS Report and get it working fine.

218 views

Hi Experts,

I have two identical tables both have 4 columns, lets say Column1,  Col2, Col3 and Col4.

Now I need to get all records that exists in table1 and not in table2 by comparing all 4 …

921 views

I am using the RAISERROR WITH NOWAIT to view how my queries are executing and how much time is elapsing between individual statement blocks ... (short example below). Is it possible / or has anyone …

214 views
MIM Survival Guide for Service Desk Managers
MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Hello, I have 2 tables and I need to update the results in tableOne with the results from tableTwo where the IDs match. My problem is, tableTwo can have multiple entries with the same ID, so I want to…

622 views

I need to add to the query below an IIF statement which will make EstShipCost $0.00 if products.localdiscontinued=true. By the way, InventoryProfile.EstShipCost is currently null if …

1923 views

I have a query pulling date records and i would like to make report showing a grid type results.  My original data pulls records based on a date, but I need all dates for the next 90 days.  My query …

317 views

Is there a way to check all the Stored Procedures in a database and see if there are any errors in them ?

Like an ambiguous field when selecting or referencing an object that no longer exists, etc.

1743 views

I have 2 tables, the first table (tblCarTypes) has 2 columns, CarTypeID and CarType. The 2nd table (tblCarRecords) has some records, where one of the columns is the CarType (which is populated with …

624 views

Hi All,

I am looking to extract a date from a notes box which will always appear after the # symbol. I have achieved this with the following line of code

SUBSTR (FINE_NOTES,(INSTR (FINE_NOTES, …

523 views
Show more content
201506-LO-Top-001

Query Syntax

47K

Solutions

12

Articles & Videos

17K

Contributors

SQL (Structured Query Language) is designed to be used in conjunction with relational database products as of a means of working with sets of data. SQL consists of data definition, data manipulation, and procedural elements. Its scope includes data insert, query, update and delete, schema creation and modification, and data access control.

Related Topics

  1. Microsoft Access
  2. Microsoft SQL Server
  3. Microsoft SQL Server 2005
  4. Microsoft SQL Server 2008
  5. Databases
  6. MySQL Server