Advertisement

Experts have come up with some helpful tips for getting a solution to your problem fast.

 

Welcome! If you have any general questions about Experts Exchange, feel free to ask me.

 
Time Tested SQL Syntax Solutions: 1326 - 1350 of 2308
 
Hi In the attached extracted file the make table query groups like teams together to show results. In the resulting 'total totals' table the group by shows results alphabeticcally within d...
Access 2003 Query, Report Hello, I'm trying to take information from a query and flip it from vertical to horizontal in a report. I start with this query: StaffingGroup         PayGrade     ...
Hi, Im trying to get the total of a field in a database using the sql - SUM(Timespent) as Totaltimespent, Timespent is the name of the column with the numbers i want to add up. My code below...
I have a table "Staff" with columns: id, salary, and branchNo. I need to write a query to count the number of staff members in each distinct branch and find the sum of the salaries in each bra...
OK, I am new at this. I did get some SQL Queries to work but they where for one table and simple. This one is the next step and I am stubling through it. Any suggestions?
So I am currently working on this Excel VBA project and I am quering a database based the users input, which is a number that uniquely identifies a record.  So far I have finished all the simp...
Can the following query be streamlined by CONVERT instead of CAST? If so how? No rush on this I'm in a learning phase with SQL and I'm getting quite confused with aggregation and datetime func...
Hello EXPERTS! What am I doing wrong on this query? I would like to be able to compute the counts column for AVG, MIN, MAX and SUM. SELECT DATEADD(mi, -15, dtcompleted) as Timeframe, count(...
I am looking for some help in creating a simple SQL query to retrieve records from two related tables. The tables (in simplified form) are as follows: CREATE TABLE parent (  primary_key...
Hello, Will be a mircale if someone could help with this one, been driving me crazy all afternoon. I'm trying to extend someones SQL code who has now left the business. I have attached the ...
Hi There, I have a query which works correctly until I add my case (CASE WHEN mv.end_date is null THEN 'Yes' ELSE 'No' END) Terminal_Group_Active)  to the select list.  mv.end_date is null ...
 I have a report that requires all cloumns to be present in the report even if the fields requested are not stored in hte table.  the fields hae specific lengths associated to them in the rep...
Please see the attached SQL code. This query gives me all unique records based on lastname. How can I modify this query so that a record does NOT show if there are duplicates? For instance...
I have a report created off of a cross tab query (2nd query below) that shows Program Names on the left axis and different "change types" on the horizontal axis. As it stands, the dates that g...
Experts, I think this is possible but I'm not sure of the syntax. I want to insert values from tblB into tblA WITH THE EXCEPTION of one field. For the 3rd field I just want to add the word ...
Hi there. I'm wondering if anybody can help me. I've got a table with 4 columns, e.g: Column1   Column2   Column3   Column4       1              10             3         1 Jan 2008      ...
I need to do a DateDiff to get the number of days between NOW and conditionally a date based on a status flag. There are about seven different statuses and about the same number of different d...
Hi, I'm writing a golf app for a local club.  I need to keep track of handicaps (they do it, fortunately) in quite a simple way. Here is the pseudo code Sproc 1 If NumRounds played from...
I need to break this data into 3 columns.  The column they are in now is called billingaddress3  I want to put them to columns city, state, zip.  I have only 2 variations of data one some with...
I have a Data base Column (I am using Access but SQL could be the same) myColumn AAA AAA BBB CCC AAA BBB CCC I need a new Column (in the databse Query or in a DataGrid) Count So what...
I need to run the statement below but I am receiving the following error message: Msg 512, Level 16, State 1, Line 1 Subquery returned more than 1 value. This is not permitted when the sub...
Hello, I need to trim out some characters from a column in a select statement. Given the statement below, how do I trim out SlideShow/ from the image column: SELECT      DISTINCT a.[sl...
Hi there, I dont know if this is possible: I have two fields: ShowName Showdate all the showdate fields are in datetime format but all of them only have the date ie: 15/08/2008 00:0...
Hi, I have a rather theoretical/practical questions. When I use the SQL shown in the snippet I get database errors because the database is doing a full table scan, applying the function to ea...
Hi, I have an SQL question that's wrecking my head.... Say you have a table with two cloumns: Column A and Column B of type int. In each column we have a value between 0 and 9. How ...