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...
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...
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
November 21, 2005 at 10:53 pm
OK, what abot 10 rows to insert?
Can you show the INSERT statement?
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...
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.
November 21, 2005 at 5:54 pm
So, you end up with cursor.
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...
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...
November 21, 2005 at 4:30 pm
It's not about language.
It's about SET DATEFORMAT.
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...
November 21, 2005 at 3:27 pm
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
...
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...
November 21, 2005 at 1:34 pm
BTW,
LEN( RTRIM( @INPUT_STRING ) ) = LEN( @INPUT_STRING )
![]()
November 21, 2005 at 1:26 pm
Viewing 15 posts - 5,791 through 5,805 (of 6,036 total)