Viewing 15 posts - 2,566 through 2,580 (of 3,543 total)
To be honest, I don't know. I think it is just a name that was chosen, maybe I should have typed it as Maud. Just seemed appropriate, no offence to...
July 14, 2004 at 2:20 pm
A lot of interesting comments.
I have no problem with asking this type of question as it will give you insight into the approach to problem solving. That is, do they...
July 13, 2004 at 10:52 am
create proc spListEmployees (@Active smallint = 0)
as
Declare @NoOfEmployee integer
select @NoOfEmployee = count(*)
from employee
where charindex(status,substring('IA',@Active+1,2)) > 0
print 'NoOfEmployee=' + Cast (@NoOfEmployee as varchar(10))
GO
July 8, 2004 at 7:12 am
nice on kailash, good solution.
FINDSTR is a DOS command for finding text in a file.
If you goto 'Command Prompt' (Satrt/Programs/Accessories) and type in
FINDSTR /?
you will see all the parameters available.
July 7, 2004 at 7:40 am
Yes but why. Use FINDSTR.
But if you do want to use DTS then
Create two tables using Execute SQL Task
Transform the text file (Source) to first table
Insert into second table rows required using...
July 7, 2004 at 7:14 am
If cnt will not exceed 255 then
select c.acctNo
from tblCalcs c
inner join master.dbo.spt_values n
on n.type = 'P' and n.number between 1 and c.cnt
where c.cnt > 0
otherwise...
July 7, 2004 at 6:39 am
Openrowset should work, like this
UPDATE t2
SET t2.Status = t1.Status
FROM Table2 t2
INNER JOIN OPENROWSET('MSDASQL',
'Driver={Microsoft Access Driver (*.mdb)};Dbq=c:\mydb.mdb;Uid=admin;Pwd=',
'select * from Table1') t1
ON t1.ID =...
July 6, 2004 at 6:46 am
If all columns the same datatype, ugly, poor performance but maybe ...
SELECT MAX(maxval) as [maxval]
FROM (
SELECT MAX(col3) as [maxval] FROM
UNION
SELECT MAX(col4) as [maxval] FROM
UNION...
July 5, 2004 at 6:27 am
Use a temp table and identity column
create table #temp1 (rowid int, col1 char(1))
insert into #temp1 values (1,'A')
insert into #temp1 values (2,'B')
insert into #temp1 values (3,'C')
create table...
June 28, 2004 at 7:25 am
You caould use another temp table and a loop (see below) but probably not what you want if you do not want to use a cursor. Otherwise your only hope...
June 28, 2004 at 7:17 am
How about this
ALTER PROCEDURE PS_Migration_DBMED_PABI_2 @DbnameSource _label, @DbNameDestination _label
AS
SET NOCOUNT ON
Declare @sql nvarchar(1200)
BEGIN TRAN
SET @sql = 'INSERT INTO ' + @DbNameDestination + '..PABI
(PA_ID)
SELECT
(
SELECT MIN(pa_id)
FROM ' + @DbNameDestination.dbo.PA +...
June 25, 2004 at 7:31 am
Hopefully the table has an ID column.
DECLARE @reviewid int, @ptr binary(16), @idx int
SET @reviewid = 0
SELECT TOP 1 @reviewid = reviewid,...
June 24, 2004 at 6:50 am
SELECT d.Account, d.ManTyp,
ISNULL(a.Document,'') AS [Document1],
ISNULL(b.Document,'') AS [Document2],
COALESCE(b.Portvalue,a.Portvalue) AS [Portvalue]
FROM (
SELECT DISTINCT Account, ManTyp
FROM
) d
LEFT OUTER JOIN a
ON...
June 23, 2004 at 6:44 am
Why are you running it in EM?
EM will not like queries like this as it cannot substitue the parameter.
If you are using this in .NET then you can either create...
June 23, 2004 at 2:44 am
Viewing 15 posts - 2,566 through 2,580 (of 3,543 total)