Viewing 15 posts - 271 through 285 (of 1,217 total)
Please look at these data you provided for the result:
select 111 as emp_no, '2005-05-04' as dtrdate, '2007-05-03 07:22:58' as login, '2007-05-04 12:00:07' as logout
I suppose there is a typo and...
September 24, 2007 at 9:06 am
I didn't mean to use unique ID. The tables would be joined on emp_no and sequence_no, where the sequence always start from 1 for each employee - that means only...
September 24, 2007 at 5:39 am
Can it be that some user will log in twice without logging off in between? In other words, is the sequence of dtrtag for each user 0-1-0-1-0-1-0-1 etc., and does...
September 24, 2007 at 5:21 am
"The second insert will insert many rows corresponding to the rows in the excel file. (threrefore the second stored procedure will have to be called many times)."
Why? You can call...
September 24, 2007 at 4:56 am
To compare without knowing what you are comparing doesn't make sense. You could try to look whether two tables are identical, but if the column names are different, then you...
September 24, 2007 at 4:40 am
Adrian meant that you should post something like
CREATE TABLE table_a (aid int IDENTITY, some_date DATETIME....)
CREATE TABLE table_b (bid int IDENTITY, aid INT, another_date DATETIME....)
table_b.aid is Foreign key to table_a...
September 24, 2007 at 4:35 am
Yeah, that's the real life 🙂 you have to work with what you've got.
Well, did you manage to get at the required result from what polecat posted? If not, let...
September 24, 2007 at 2:54 am
Could you tell us how it was solved? It may help other people later when they have the same or similar problem... and, of course, we are curious, too 🙂
September 24, 2007 at 2:47 am
mrpolecat,
unfortunately you have typo either in the data or in the desired result. For example, Customer number 2 has PrimaryStore 1, but in result you wish to display Store 2....
September 21, 2007 at 5:41 am
Anubhav,
one of the TOP is not necessary. You can limit the output first, and then just order.
SELECT *
FROM (select top 2 * from order by date desc) as...
September 21, 2007 at 4:58 am
You might also wish to post your entire query and explain how it is used and for what. There is a good chance that the SQL can be rewritten for...
September 21, 2007 at 3:57 am
Did you copy and paste the name of company into your query?
Remember that your query looks for the precise value, which can be different from what you see. If...
September 21, 2007 at 3:49 am
It is a pity that your original table (I mean the one at the very beginning) isn't a bit more normalized... if you'd have columns Area_name and Area_status instead of...
September 21, 2007 at 2:05 am
Maybe not as long as you are using the application. Some applications are written to do everything row by row (which is terrible... I should know that, the application we...
September 21, 2007 at 1:24 am
Viewing 15 posts - 271 through 285 (of 1,217 total)