Viewing 15 posts - 46 through 60 (of 156 total)
DECLARE @tbl TABLE(PartNo varchar(20))
INSERT INTO @tbl VALUES('12345|03')
SELECT SUBSTRING(PartNo, 1, CHARINDEX('|', PartNo)-1)
FROM @tbl
WHERE CHARINDEX('|', PartNo) > 0
July 9, 2007 at 2:03 pm
Can you verify if the the file exists on the server where sql server is running ? c:\eventpro folder should be on the server and not on the local box from...
July 5, 2007 at 12:33 pm
Look up sp_start_job in BOL.
July 5, 2007 at 11:14 am
I added entries in the sysjobhistory table for the job outcome and fixed the issue.
Thanks for looking.
June 27, 2007 at 12:41 pm
You can also try this
DECLARE @SortBy varchar(2)
SET @SortBy = 'ID'
select empid,empname,jobrole
FROM Emp
ORDER BY
CASE WHEN @SortBy = 'ID' THEN empid
ELSE jobrole
END
provided EmpID and JobRole are the same datatype.
June 21, 2007 at 8:13 am
Try this one
http://vyaskn.tripod.com/code/generate_inserts.txt
Credit to Narayana Vyas Kondreddi for the script.
April 25, 2007 at 6:35 am
Put this in a .sql file
SET NOCOUNT ON
DECLARE @DelayLength char(8)
SET @DelayLength = '00:00:50' -- delay for 50 seconds
WAITFOR DELAY @DelayLength
Put this in a batch file and run is...
March 22, 2007 at 4:47 pm
Thanks Jeff. Works great. Didn't have a Tally table.
Too late in the day to look at this query in detail now.
Thanks again.
February 9, 2007 at 4:47 pm
There was an extra ) at the end. Removed it and the function runs fine with no error. This function is in production and is called from multiple places.
February 9, 2007 at 2:59 pm
There were blank lines between each statement. Removed them
Create Table TableA (ID varchar(2), Nodes varchar(5), LT int)
Create Table TableB (ID int, [Desc] varchar(20), Qty int)
Insert Into TableA Values ('M1',...
February 9, 2007 at 2:50 pm
Interesting. I still get this error
Server: Msg 170, Level 15, State 1, Line 29
Line 29: Incorrect syntax near '.'.
Could it due to some sort of settings in Query Analyzer...
February 9, 2007 at 2:37 pm
Here is the complete script using the split function that I had put earlier.
Create Table TableA (ID varchar(2), Nodes varchar(5), LT int)
Create Table TableB (ID int, [Desc] varchar(20), Qty int)
Insert...
February 9, 2007 at 2:03 pm
Thanks for you inputs.
Here is the Split Function that I wrote from one of the scripts on the site (not sure whom I need to give credit)
CREATE FUNCTION dbo.SplitToInt (@vcDelimitedString...
February 9, 2007 at 1:09 pm
Viewing 15 posts - 46 through 60 (of 156 total)