I have a view that returns the following:
select * from latest_report
projectname contractor_name date
Barry O&M Vulcan 01/01/2007
Barry O&M Vulcan 02/01/2007
Barry O&M Vulcan...
I would like to duplicate some records in a table. The table name is Craft and it has the following fields:
id - integer (Identity = Yes)
week_UID - uniqueidentifier
craft_ID - integer
craft_group - integer
craft_name - nvarchar
craft_category - nvarchar
craft_count - integer...
I need help with the following:
I have two tables. The first table, Craft_temp, contains the following fields:
craftID craft_group craft_name craft_cateogry
1 1 Carpenter A Carpenter
2 2 Carpenter B Carpenter
3...
I need to sum several fields then take product and use it in another calculation. For example:
select sum(day_hrs)+sum(night_hrs)+sum(day_ot_hrs)+sum(night_ot_hrs) as total_hrs from Craft where weeklyuid = @weekid and craft_category = 'Boilermaker'
select...
I need to calculate the following formula within an sql statement:
--Tsat = Ax + B/x + C(x^0.5) + D(ln(x)) + E(x^2) + F(x^3) + G
My first attempt is like so:
Local a real;
Local b real;
Local c real;
Local d real;
Local e real;
Local f real;
Local g real;
Local Tsat real;
Local P real;
a =...
I have the following two select statements:
SELECT ts,max FROM aggregates WHERE name like '3B-HP-DRM-SKIN-1-T' AND ts between '14-JUN-06 08:32' AND '14-JUN-06 22:26';
SELECT ts,max FROM aggregates WHERE name like '3B-HP-DRM-SKIN-2-T' AND ts between '14-JUN-06 08:32' AND '14-JUN-06 22:26'...
My tables:
CRAFT TABLE
id
weeklyuid
craftname
wage
WAGERATE TABLE
id
craftid
plantid
wagerate
I have two tables craft and wagerates. I want to sort the craft table on the weeklyUID field and update all records that meet the sort criteria with a wage rate that is looked up in the wagerate...
I want to write a query that will replace the contents of a column with 1 thru 162 until it replaces them all.
I have something like this:
UPDATE Craft_temp
SET craftID = id
WHERE id < 163
This replaces the first 162 items ... now I need to do the same thing 6 more times...
Hello,
I would like to copy the contents of one table to another with the following twist ... I need to copy the entire table just as it is except for one field. I want to supply the value for this one field.
Example:
Table1
id 1
firstname John
lastname Doe
wage...
I have two tables that contain the following fields:
Commodities Table
ID
Company_ID
Type
Sub_Commodities Table
ID
Commodities_ID
Sub_Type
I need a sql statment that will join these two tables together and group them by Commodities.type.
Thanks,
David
My stored procedure looks like this:
FUNCTION Get_Min(start_time timestamp, end_time timestamp, mytag char(24), myvalue integer)
Local mytime timestamp;
mytime = (select min(ts) from history where name like mytag and value > myvalue and ts between start_time and end_time);
return mytime;
end...
I'm executing the following query:
mysql = "local oilhours real;oilhours = 0;for(select * from aggregates where name = 'AA-FO-MFM' and period = 600 and avg > 15 and (ts > '01-jan-04' and ts < '01-feb-04') do oilhours = oilhours + 1;end;"
when I execute the above query .... oilhours = 36.6...
I'm executing the following query:
mysql = "local oilhours real;oilhours = 0;for(select * from aggregates where name = 'AA-FO-MFM' and period = 600 and avg > 15 and (ts > '01-jan-04' and ts < '01-feb-04') do oilhours = oilhours + 1;end;"
when I execute the above query .... oilhours = 36.6...
I need help getting a calculated number into excel. I use the following sql statement:
ADO_rs.Source = "select ct_off_time, least(2+(0.044117*CT_OFF_GEN),8)/count(*) as mydata2 calculate avg from b_NRatio"
'it returns the following (which is correct):
ct_off_time mydata2...
I need help getting a calculated number into excel. I use the following sql statement:
ADO_rs.Source = "select ct_off_time, least(2+(0.044117*CT_OFF_GEN),8)/count(*) as mydata2 calculate avg from b_NRatio"
'it returns the following (which is correct):
ct_off_time mydata2...
Here are my access tables:
PART TABLE
{
part_id
manufacturer
part_number
part_name
}
PLANT TABLE
{
plant_id
plant_name
plant_address
plant_phone
}
INVENTORY TABLE
{
inventory_id
part_id
plant_id
quantity
}
I want to run a query that will display all of the parts that exist at mutiple plants...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.