Advertisement

635 organizations, including eBay, Ericsson and Lockheed Martin, now work smarter with Corporate Accounts. Save up to 42%

 

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

 
Time Tested SQL Syntax Solutions: 126 - 150 of 1953
 
This is kinda of silly but it's late.  I am getting the month name in my query using DATENAME(month,t.transactiondate) But I need to use this field the order by clause so I need it to sor...
Hey guys, Im trying to populate a new column in a database query based on the content of an exisitng column. Basically if the existing column entry has a certain format, i.e. if its an IP ad...
Alright, I am getting an Invalid argument error anytime I try to Run,save, close, or anything to a query or table. Any Ideas. Compact and Repair doesn't do anything.
I have a query with an "is not null" criteria but some of the results have null values for that field. I have exported the results as a text file and evaluated the results and those fields ...
I have a table called Product with a field called ProductCode and one called DiscountType, both varchar. I have another table called SubProduct which has fields ProductCode and SubProductC...
I have a table of name login I need to create a select query which compare the dateChanged Column with the current date on the server and return true if the value of dateChanged is more then ...
Help !  I am using sqlplus 8.0.6.0.0 and I have a table with: my_user, start_date, end date in the table I have my_user ID eg AI6097 and a start dates eg. AI6097 01-MAY-07 AI6097 ...
Hello, I have a table that I need to join with two other tables to pull in first and last names. Essentially what I want to do is add two columns to my main table (first and last name) and ...
Hi - I have been given a file which I need to create a new table out of in Oracle, unfortunately, the source of the data doesn't have the ID of the system we are trying to get the data in.  In...
How do i speed up SELECT JOIN query for 2 large tables? (teststock and prdbesarch) I've been using this code for a while now and it seems to be working fine. One table is teststock and l...
Hello This could be a simple task for some of you but I am finding it difficult to write a query for following task. I am building a query using one variable and then I want to assign th...
Hello All, I am trying to import these fields into an Access DB. The trick lies in the fact that I am attempting to insert one instance of 'FullName' and 'Email' Fields, while t...
I create a column using CREATE TABLE ... ColumnName INTEGER IDENTITY(1,1) NOTNULL so that it is intialized to sequential numbers when I insert records from a select query. I want to alter the ...
I am attempting to create a trigger (using some great information I received from you experts earlier in the day).  However, apparently I have some holes in my logic.  It looks like the INSERT...
I have a table: data_table subject             year          totaltested I want to change this query: SELECT subject, year FORMAT(SUM(totaltested), 2) AS total, FROM data_table ...
I have a database (Access 2000) of Bird sightings, and am trying to create a Query that can produce 'year lists', by showing all the individual species of birds seen in a specific year. As I ...
I have a file on the server called import.csv.  I need to import all of the contents into a mysql called cbacks.  I cannot get this code to work.  I have included the PHP code as well as a cop...
I have the following statements in the Query analyser (SQL server 2000).... can not be simpler SET IDENTITY_insert attendancetype on insert into attendancetype select * from members..atten...
Good afternoon,   I have a databases and I'm trying to get a portion of one table to a table in another database and when I run the following query it does transfer over the information and i...
I am trying to concatenate the rows of one column into one string but for some reason my query never finishes executing. It looks like it's going in an infinite loop. Here's how the source ...
I have a need to "Transpose" (Excel Term with which I am familiar) the results of a summing query. The query sums multiple columns, so it is essentially one row of numbers and a row of head...
I'm trying to get my table name in a stored procedure be a variable. I've pasted my orginial SP which works fine, but now I have a kink where I need the table name to be access through a varia...
I need to combine both these queries to get the max date if they have a entry in either the table.  This is part of a much larger query, but I am wondering how to combine these.  Thanks 'co...
Hello, I am trying to implement the following Trigger into a table in SQL Server 2005 http://jamesewelch.wordpress.com/2007/09/04/tracking-database-record-changes-at-the-field-level/ I...
Hi I want to use an IF statement to check if a SELECT statement returns values. If the SELECT returns values I want to do one thing, and if it does not return any values I want to do anothe...