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: 1 - 25 of 1512
 
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 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...
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 ...
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 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...
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...
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...
Hello: I've searched quite a bit and found a few solutions but not anything solid that currently works.  What I'm trying to do is basically round the time part to the nearest 30 minute, hou...
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...
This is my sql so far declare @timestamp datetime declare @dt varchar(20) set @timestamp = '03-29-08 03:10:09' select @dt = (datepart(@timestamp,yyyy))+'-'+(datepart(@timestamp,mm))+'-'+...
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...
I have a table. It's a big table. It has lots and lots of columns (about 150). I'm copying a row from this table to table B. Then I'm updating a column or two and copying it back into the ...
I am looking to create an sql query that basically says 'select firstname & lastname as fullname' and not sure of the exact syntax. TIA!
How can I combine these to select statements into a single nested SELECT.? SELECT * FROM NCR_SQL_DATA WHERE [G Date Created] > 39448 SELECT NCR_SQL_DATA.[G Supplier], SUM (NCR_SQL_DATA....
I have a table with columnA,  it's my PK and I add one to it each time I add, so row1 is 1, row2 is 2, then 3,4,5 etc....how would I selecet the last row?  something like: select columnA fr...
I'm a little new to running queries via Excel and am getting the above error but can't figure out why.  I'm trying to run an Access query via Excel VBA, the query runs ok in Access. Thanks ...
My SQL query SUMs up sales transactions by day by revenue center by customer type (3 types). It results a queryset with 3 rows - 1 for each of 3 member types -- date / revenue center ID / da...
I am trying to put together a query that summarises a month worth of items in a detail table and I'm struggling a bit.  Basically what I want to have at the end is:      Item 1 - 15 - £10      Ite...
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, I have a query: select name from Archive_man_live.dbo.syscolumns where id = (select id from Archive_man_live.dbo.sysobjects where name = 'JOBS' And I want to loop through all of t...
Hello Experts, I have the following stored procedure in a SQL DB and would like to write a VBScript that will execute this procedure. Basically what this procedure does is searches a DB for...
I need to cast from char(14) to int within a SQL statement. Any ideas?
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...