Is there a way to get the maximum or minimum 10 values from a table. I would most probably have to use the result in another query or view so ORDER BY might not be an option to use.
View Complete Post
I have a single select query with multiple table joins in it.
I want to retrieve the Most Recent records from one of the table among the tables in multiple joins.
(select t1.col1, t2.col2 , t3.col3, t4.col4, t4.Add_Date,t5.col5,
from dbo.table1 t1
left outer join dbo.table2 t2 on t1.col1=t2.col2
left outer join
(select col3 from dbo.table3 where condition1="expr") as t3
left outer join dbo.table4 t4 on t1.col1=t4.col4 order by t4.Add_Date
left outer join dbo.table5 t5 on t1.col1=t5.col5 )
Problem is that, I am not able to use the "Order by" for a particular table.
I have Revision column in Quote table with time stamp (MySql table) now i am viewing the entire date and time my end user want to view only Date he doesnot want to see time how can i pull only date.i am displaying revision column in two ways one in grid view and another one in field value
Query in my Grid viewDim query As String = "SELECT QuoteNumber,Revision,Vendor,PartNumber,status,Customer,Requestor from quotes"On select check box in grid view, filed values will be loaded with data.
field valuetxtRev.Text = dt.Rows(indx)("Revision").ToString()
I know it’s possible to loop through table records using a variable and a For Each Loop Task. But is there a way to use the values in the variable and use them in a File System Task? When I tried, the File System Task complains that the variable is
not a string. Any thoughts?
Objective – I need to loop though column values in a table which has the paths to the files that I’ll need to move using File System Task.
The table only has one column which stores the paths to the files to be moved.
Thanks in advance.
I have 2 tables Person and Person_Child.
In Person table i have columns
rowid is identity
and in the person_child table--here parentrowid refers to parent table rowid and again rowid is identity here
I need to update the child table values as it is in parent tables where it is null.
I have to do for many tables.
Is there any way to do it dynamically.
I have multiple tables that are all linked back to a central table with foreign keys. I want to be able to create a new record in table 2, but I'm having trouble because I don't know how to create a new instance of table 2's record while referencing the ID of the record it will be tied to.
I have to tables with dates, table Employments with all employements of all employees, with start date and end date, and a table Mutations with mutations (e.g in salary) with start dates.
Now I try to write a query which returns a record for each day an employee is in employment, with the correct salary. SO at first, it should return all days between the employment start date and the first mutation date, then the number of days between
the first mutation date and the second mutation date etcetc, and at last the number of days between the last mutation date and the employment end date. The number of mutations varies for each employment, and employees cna have multiple employments (history, so
not at the same time) in the employments table.
How to do this?