Advertisement

Over 40 Experts attended the first Annual Core Conference! Take a look at what happened throughout the week...

2008 Core Conference

 

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

 
Top SQL Syntax Solutions: 176 - 200 of 872
 
I have multiple tables within a database that all have a column called marketingRemarks that displays a string of text.  In some cases the records have html code <marquee> inserted in the text...
Hi, My first post so apologies for length. I have recently been thrown in the deep end with an Access database and I'm having a problem with a query. I have one table that records results for...
On my insert into my database i need to convert 2 dates to a string format to store in the DB.  Curretnly they look like so 8/1/2008  I need this date to look like  01AUG2008.  The firelds I n...
I have 2 tables. Fields in tblA are: SaleDate, CloseDate, OrderNo, SaleNo, ProductName Fields in tblB are: SaleDate, OrderNo, ProductName, CheckDate, CheckBy I want to select the records i...
Hello, I have two tables in an Oracle 10g database: DOCUMENTS ------------------------- document_id NUMBER PK description VARCHAR2(100) createdate DATE DOCUMENTPAGES ------------...
Hi all, I have a series of alphanumeric values: 15T Handling Cleat Cleat 10T Handling Handling Cleat 5 I would like to extract only the number from the above, so I would see 15 ...
I am looking for a script that I can use to determine the size of data in a particular column. For example, say that I have a table that has an ID and MyName Column: CREATE TABLE MyTable (M...
Hi all, I have a piece of SQL PLUS code that I am trying to make it work with little success. It is to be executed in a SQL PLUS environment and I need help with it... The purpose of this ...
I have an access table and I want to run the following sql commnad: select count (distinct field) from table In ms sql 2005 it works fine but not with access sql
The problem is associated with the merging of date ranges that exist in two tables, Episodes and Plans. The solution needs to produce a full merge of overlapping ranges for these dates (by cli...
Hi all, I'm struggling to get my head around the syntax to achieve my results. The scenario is this, users can take assessments as many times as they wish, but only the first assessment sco...
BEGIN declare @g datetime Declare @sDate as datetime Declare @eDate as datetime Declare @rCnt as int set nocount on set @g = getdate() INSERT INTO P_Dates (StartDate, EndDate, Result,...
I'm attempting to query against a DB2 database. The first attached code snippet is the orignal query that generates the row below: PROD_ID_NR     PROD_LONG_NM                                       ...
TSQL 2000 When I EXEC this SET @Discount =  CAST(@TicketCost AS DECIMAL(6,2)) * 1 my result works fine, however the discount is 15%, so when I try this SET @Discount =  CAST(@TicketCost ...
I need to implement a rudimentary change tracking scheme for three tables in a database that is backed up daily.  Normally, I would track changes via a data entry form, but in this database so...
I am trying to delete a leading space in some of my SQL fields.  ANd then I want to delete information after the city word in a column.  Here is what infor looks like.  Some have a leading spa...
Hi, How can you control the output of a Union. F.ex. the following select outputs:     MyText    --------------- 1. AnotherText 2. SomeText How can I control what comes first in...
I use the query below to tell me how many unique custName entries there are for each location. SELECT Location, Team, sum(EffectiveRevenueReal), COUNT(custName) AS DistinctNo From vwResults...
OK I'm trying to make a query in access that will list the results for different UPCs. Right now I paste the upc in a text field (Tect2) and it will list the result. I want to know in access i...
I am using T-SQL , sql server 2005 I have two timestamp fields, I need to calculate the difference between the two Example If CreatedDateTime = 2008-08-17 22:20:10.993 and ProcessTime = 20...
Hi, I have a query which is filtering on quite a bit. I need it however to filter on a little more. I need it to filter now on the Sponsor field. I need to say once all filters have taken p...
Hey Experts! Trying to learn a bit about SQL for a project I'm working on. I have a stored procedure (sp_TestEmployeeTimeRecordWithRate) which allows me to query a few tables and returns...
I have the following table; personal_reference ---------------------------- application_id | name_full | relationship --------------------------------------------------- 100            ...
Hi, I want to update some fields of some records in a table. My difficulty is that I have all the values stored in one string for all the fields that I want to update. Like this: allValu...
How to display row value of each class as a column value ID     NAME     CLASS          HOURS     SCHOOLNAME 1     Allen     Maths          12     school1 2     Sam     Maths          12     school1 4     Pam     Maths          10     school1 3     Sam     Comp          10     school...