Hello. I have a question about UPDATE with INNER JOIN.
UPDATE AliasA
SET AliasA.CarMaker = mstMakerModel.Maker
FROM tblCarAuctionList AS AliasA INNER J...
I'm writing a SQL Query in VB2003 against an MS SQL Server 2000 database. Basically, I"m trying to replicate an Access query (which works) in MS SQL language. The problem is, I can't seem to...
Hi all :)
Just a quick VBA/Excel Question. I'm fairly new to VBA.
I'm currently trying to query an informix database, where as the user would put the specific date range they require in ...
How do I assign a distinct unique number to each field returned. I prefer to do it in sql and not create an index as the table as I do not have sole control of the table. In the below desire...
I must update the borr.ssn and coborr.ssn data for 579 records to table BORRDATA. I have seen several Update statements where the update data is coming from another table, but what is the cor...
I've got a table which contains a series of dates (the columns are client_id, start_date and end_date). I need to calculate the number of working days between the start and end dates. This cou...
I need to insert a date variable that contains formating like so:
12-04-07 13:22:11
Into a SQL Server 2005 table.
Note it is not always that date, that is a sample of the variable as it...
I am hating the lack of functionality with DSUM in queries right now. I have several reports I need to run based off of information in several tables which are related. I also need to be abl...
Is there a way to force a number to display without decimals in SQL Server 2000? If not, a way in crystal reports to do the same? I tried setting the decimal places to 0 in Crystal reports a...
I have a sql string here that is not running correctly. I am trying to concatenate 2 fields, referrer and the count of the cases, into one field to display in a drop down list. Something is wr...
Dear EE members,
I would like to convert the following sql server query to ms access query:
select grade
= case
when pcode1 in ('A01','A12','A17','A34') then 'P'
when pcode1 in('A08...
I have a query that's selecting a few fields from one table, along with a MAX() field from another table (sub select win select clause).
The only problem is that NULL results are being retu...
Using Crystal Reports XI Developer;
Using MS SQL Server 2000;
public static void Main()
{
Having trouble figuring out the syntax for writing SQL Expression Fields in the Formula Wo...
Using Oracle 9i, what is the most efficient way of executing the following SELECT and UPDATE statements?
select c.claim_id, c.account_structure_id
from s_dis_claim c
where c.claim_id in...
I would like to query the following based on the current date 07/29/2008
Start Date and End Date for Last Week (if current date is 07/29/2008, then between 07/20/2008 - 07/26/2008)
Start D...
Hello,
I have an issue where i need to format dates in an SQL Server 2005 stored procedure where dates are currently being passed in as 'dd-MM-YYYY hh:mm:ss' and i think that i need them to...
How do I incorporate IF THEN ELSE in SQL*Plus? I searched online a bit, and saw reference to using BEGIN/END; around the code to do this. I tried simply declaring a variable at the beginning a...
I am looking to create an sql query that basically says 'select firstname & lastname as fullname' and not sure of the exact syntax.
TIA!
Hi
I have a MS Access database table with a DateTime field in it. The following INSERT statement works:
INSERT INTO Table VALUES(...., '4/26/2007 5:25:59 PM', ....)
but the SELECT state...
I want to make a Sales table in SQL. I have an equipment table which shows the equipment available for hire, and also a table which shows the currently hired items and their due dates. I want ...
Hello!
I have two tables as shown below.
As you can see for each version the column_id may have a different column name. So 1 = Supplies for version 1 and 1 = Other for version 2.
In the da...
I would like to convert a date time field to a string . example the string should look like this
08/26/2008 10:30:26
I need to write a Transact SQL query that returns a record set based on a date criteria that returns records less than or equal to current date and no earlier than 12 months prior to current d...
I want to copy the data of two columns from the record with an Enroll_ID of 1234 and paste it into the same columns for the record with an PRGM_ID of 2222. This first query here is only with ...
Im having some problems with this one... I need a report that generates a list of the last 12 months (from today, i.e. Sept 07 - Aug 08), then using a column of dates from a table, count how ...