Viewing 15 posts - 5,791 through 5,805 (of 6,036 total)
The best way to work it out is to create scalar UDF for searching date value within supplied string.
You can have iterations inside UDF, do multiple comparisons, but your select...
_____________
Code for TallyGenerator
November 22, 2005 at 4:08 am
If to do it properly...
----------------------------
Declare @LastId int
Declare @Rowcnt int
Declare @ErrorNo int
SET @Rowcnt = 0
SET @ErrorNo = 0
INSERT INTO @NewProject (all columns but Id)
SELECT .....
FROM inserted
WHILE @Rowcnt = 0 AND @ErrorNo...
_____________
Code for TallyGenerator
November 22, 2005 at 3:58 am
What is this: alter table kpuser.tbl add @pos varchar(50) ?
Probably you want just insert value?
INSERT INTO kpuser.tbl
SELECT @pos
_____________
Code for TallyGenerator
November 21, 2005 at 10:53 pm
OK, what abot 10 rows to insert?
Can you show the INSERT statement?
_____________
Code for TallyGenerator
November 21, 2005 at 10:47 pm
I just don't use to convert datetime to varchar.
The only place I need DATEFORMAT is reading from flat file. And here I use a lot of tricks, and I collect...
_____________
Code for TallyGenerator
November 21, 2005 at 10:40 pm
And you must be sure the SP you are creating will never been called from another SP having SET DATEFORMAT ... inside.
_____________
Code for TallyGenerator
November 21, 2005 at 5:54 pm
So, you end up with cursor.
_____________
Code for TallyGenerator
November 21, 2005 at 5:06 pm
Unfortunately
where word like '%monitors%sensors%LCD%'
and
where word like '%sensors%monitors%LCD%'
will return different results.
If to modify govinn's prescription:
create table #x ( word varchar(40) not null )
insert...
_____________
Code for TallyGenerator
November 21, 2005 at 4:45 pm
Because in 'dmy' day cames before month!
Sounds silly, but that is it.
And 'British' settings do not guarantee 'dmy' dateformat. 'dmy' is DEFAULT for 'British', but you can set any option without...
_____________
Code for TallyGenerator
November 21, 2005 at 4:30 pm
November 21, 2005 at 3:33 pm
1. Is not a problem. Just use
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE
2. Can you write SQL statement to insert 10 rows from inserted using your way?
No cursors, please.
And if...
_____________
Code for TallyGenerator
November 21, 2005 at 3:27 pm
_____________
Code for TallyGenerator
November 21, 2005 at 1:50 pm
Create table #NewProject (
Id int IDENTITY(1,1),
....
)
declare @LastId int
INSERT INTO @NewProject (all columns but Id)
SELECT .....
FROM inserted
SELECT @LastID = MAX(ProjectId) from TATMChangeHistory.dbo.tblProject
SET IDENTITY_INSERT TATMChangeHistory.dbo.tblProject ON
INSERT INTO TATMChangeHistory.dbo.tblProject
...
_____________
Code for TallyGenerator
November 21, 2005 at 1:44 pm
DO NOT CONVERT DATETIME TO VARCHAR!
DO NOT CONVERT DATETIME TO VARCHAR!!!
DO NOT CONVERT DATETIME TO VARCHAR!!!!!
CallTime = srawlogout - srawlogin
That's it.
If you need inly time portion of a datetime...
_____________
Code for TallyGenerator
November 21, 2005 at 1:34 pm
November 21, 2005 at 1:26 pm
Viewing 15 posts - 5,791 through 5,805 (of 6,036 total)