all groups > sql server programming > july 2006 > threads for sunday july 9
Filter by Day: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
Execiting a specific SQL file
Posted by Robert Bravery at 7/9/2006 3:14:44 PM
HI all,
How can I execute a specific, pre-written sql file
so if I have a file, mysql.sql, and it has in it
select * from employee
I want to execute that file so that the commands in it, namely in this case
the select statement would run
Thanks
Robert
... more >>
Datetime math gives strange results
Posted by Ian Boyd at 7/9/2006 10:56:42 AM
Consider:
CREATE TABLE #foo (StartDateTime datetime, EndDateTime datetime)
INSERT INTO #foo (StartDateTime, EndDateTime) VALUES ('2006-06-26
15:54:03.000', '2006-06-26 15:58:33.000')
SELECT
StartDateTime,
EndDateTime,
DATEDIFF(minute, StartDateTime, EndDateTime) AS MinutesDiff,
CAST... more >>
finding the maximum absolute value
Posted by Rajeev at 7/9/2006 9:14:35 AM
Hi i have one table Amounts whose structure is like this
Create table Amounts (Id int, value moeny)
the table can have duplicate rows and value can be either positive or
negative
Now i have two rows in it
Insert into Amounts values (100, 0)
Insert into Amounts values (100, -100)
... more >>
insert based on condition
Posted by Rajeev at 7/9/2006 8:30:27 AM
I have one staging table expense_staging. data can come into this table
from two tables say table A & table B.
the structure of the staging table is
create table expense_staging (entryid int, itemflg tinyint, processcd
char(1), amount money)
This staging table can have duplicates.
Suppos... more >>
Timezone
Posted by simon_s_li NO[at]SPAM hotmail.com at 7/9/2006 2:27:52 AM
Hi,
I am new to sql server so a bit unfamiliar with dates and times.
I am using UTC date by calling getUtcDate() function in sql server.
The local time is set to UK time, however I am unsure how to alter the
current time into South African time.
So for example if its 2pm in the UK, how do... more >>
SELECT Q?
Posted by EB78 via SQLMonster.com at 7/9/2006 12:00:00 AM
Hi All,
I have some query with multiple joins , that returns me result set as:
ID1|ID2 | SortIndex |Desc
-----|--------|-----------------|-------------
1 | 2 |0 | blabla
1 | 3 |0 | blabla
1 | 7 |0 | blabla
11 | 4 |0 | blabla
11 | 7 |0 ... more >>
|