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...
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 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...
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...
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 ...
Hello Expert,
I am trying to run a SQL statement to return data last week data using the following statement
(CustOrder.DateSent >= DATEADD(dd, - 7, CAST(CONVERT(VARCHAR(10), GETDATE(), ...
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 ...
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...
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...
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...
Hi all
i have the following stored procedure but it doesnt return any value for me and seems to loop indefinately
ALTER PROCEDURE [dbo].[spGetRootId]
@menuid int,
@parentid int = NU...
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...
Hello,
I need to find a sql command that can tell me the percentage left of a database.
The database is an Oracle database. What I want is a shell script that will do this and if the da...
I am looking to create an sql query that basically says 'select firstname & lastname as fullname' and not sure of the exact syntax.
TIA!
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...
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...
Hi,
I am writing a SQL procdure which need to only add minutes value in a DateTime data. For example
Day1 = '8/5/2007 12:00pm'
I want to add 90 minutes on it to get Day2 = '8/5/2007 13:...
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...
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 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...
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 have text field in my table. text value is in the format "Feb 20, 2007 22:57:36" how do I convert it to a datetime field for processing.
thanks
Hi,
When you're in a loop inside a stored procedure, how do you break out of the loop?
Thank you.
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...