Viewing 15 posts - 2,941 through 2,955 (of 3,543 total)
quote:
I hate dates in sql
Hey! Come on chaps, a bit tongue in cheek here.
I do...
November 14, 2003 at 7:34 am
Nice one Jonathan, will have to remember that one
November 14, 2003 at 7:25 am
Oops!
My apologies
I hate dates in sql
November 14, 2003 at 7:17 am
Your query will result in null because you have not initialized @mail, use
set @mail = ''
or simply do this
set...
November 14, 2003 at 7:06 am
quote:
SET DATEFORMAT dmySELECT KeyCol, DateColFROM YourTableWHERE ISDATE(DateCol) = 0
Jonathan,
Depends on language settings, eg
English
2003-11-15 1
2003-15-11...
November 14, 2003 at 6:51 am
If user input dates have no times then
SELECT <Table Fields>
FROM <Table>
WHERE <Sample Date> >= <User Input Data1>
AND <Sample Date> < DATEADD(d,1,<User Input...
November 14, 2003 at 6:37 am
In SQL7 DTS, if you use a test file with the maximum number of columns and define the properties of the file, then when you use real data file, sql...
November 13, 2003 at 7:22 am
I do this sort of thing frequently and use SP to do it. First I update first table by inner join second table on key. Then I left outer join...
November 13, 2003 at 6:05 am
It is an alias and is mandatory when using subqueries (derived tables). As CP is an alias for CustomerPwd in your example. So your query could have looked something like...
November 13, 2003 at 5:59 am
One way is to use temp table
SET NOCOUNT ON
CREATE TABLE #temp (
Owner varchar (36),
Object varchar (62),
Grantee varchar (18),
Grantor varchar (36),...
November 12, 2003 at 7:27 am
quote:
Eagles fly. Turkeys skydive.
Yeh. It's hard to fly like an Eagle when you work...
November 11, 2003 at 7:10 am
Duplicate data can be caused by more than 1 matching row in multiple tables or by insufficient matching of tables. You need to check what is duplicated and do as...
November 11, 2003 at 6:50 am
SET @sSQL = N'SELECT @Serial = Serial FROM ' +
@DBName +
'.[dbo].[Transaction_Mapping] WHERE TransType = @sTransType'
execute sp_executesql
@sSQL,
N'@sTransType varchar(10), @Serial varchar(10) output',
@sTransType,...
November 11, 2003 at 6:31 am
select *
from P_Trade
where charindex(','+cast(TypeId as varchar)+',',','+@Typeid+',') > 0
November 11, 2003 at 6:17 am
quote:
SELECT rt.account_id, rt.account_status, DATEDIFF(DAY,rt.status_creation_datetime,GETDATE())-COUNT(*)FROM Result_Table rt, Calendar_Table ct
WHERE ct.DateField BETWEEN rt.status_creation_datetime AND GETDATE()
GROUP BY rt.account_id, rt.account_status, rt.status_creation_datetime
November 11, 2003 at 6:08 am
Viewing 15 posts - 2,941 through 2,955 (of 3,543 total)