Viewing 15 posts - 2,101 through 2,115 (of 3,544 total)
What do you mean by two lines?
SQL has no concept of lines it only stores data in rows.
INSERT INTO [table) (col1) VALUES ('A' + char(13) + CHAR(10) + 'B')
will insert...
Far away is close at hand in the images of elsewhere.
Anon.
November 8, 2005 at 7:08 am
I do similar in several of my systems but use unc to access the pdf's from my web servers, do not have connection problems with server reloads.
Far away is close at hand in the images of elsewhere.
Anon.
November 7, 2005 at 7:25 am
You will have to do two INSERT/SELECT queries
If company has a guaranteed unique column value (eg Comapny Name) then you can join the company table on the 2nd query to...
Far away is close at hand in the images of elsewhere.
Anon.
November 7, 2005 at 7:20 am
noeld,
your solution will not return zero if there is an end date of zero
this should do it for the subquery
Select Membernbr, Min(StartDate) as [SD],
CASE WHEN Min(EndDate)=0 THEN 0 ELSE...
Far away is close at hand in the images of elsewhere.
Anon.
November 4, 2005 at 9:23 am
ooops forgot you may need another 'Execute SQL Task' to create the table using the sql you posted, so the order is
DROP TABLE --> CREATE TABLE --> TRANSFORM
Far away is close at hand in the images of elsewhere.
Anon.
November 3, 2005 at 7:44 am
Create an 'Execute SQL Task' using the excel connection and do
DROP TABLE `utbl_salesinfo`
and join it to the source connection with 'ON SUCCESS'
not actually done this or tested it but I...
Far away is close at hand in the images of elsewhere.
Anon.
November 3, 2005 at 7:42 am
or
ISNULL(NULLIF(plannedminutes,-1),0)
Far away is close at hand in the images of elsewhere.
Anon.
November 3, 2005 at 7:22 am
SELECT Customer, n.number AS [EntryNo]
FROM [#table] c
INNER JOIN master.dbo.spt_values n
ON n.type = 'P'
AND n.number BETWEEN 1 AND 5
AND n.number <= c.[# of Entries]
since spt_values...
Far away is close at hand in the images of elsewhere.
Anon.
November 3, 2005 at 7:15 am
CREATE PROCEDURE UpdEmp
As
SET NOCOUNT ON
UPDATE e
SET e.LastName = s.LastName,
e.FirstName = s.FirstName,
e.MiddleInitial = s.MiddleInitial,
e.JobTitleID = s.JobTitleID,
e.JobTitle = s.JobTitle
FROM [Employees] e
INNER JOIN [EmpSource] s...
Far away is close at hand in the images of elsewhere.
Anon.
November 3, 2005 at 7:01 am
SET DATEFIRST 1
DATEADD(month,DATEDIFF(month,0,@DATE)+1,0)
- 1
- (CAST(SUBSTRING('2345601',DATEPART(weekday,DATEADD(month,DATEDIFF(month,0,@DATE)+1,0)-1),1) as int))
Far away is close at hand in the images of elsewhere.
Anon.
November 2, 2005 at 7:41 am
declare @x varchar(2000), @sql nvarchar(4000)
exec dbo.procJoinColuna 'rolename','14;0;-1;-2;',';', @x OUTPUT
set @sql = 'select ' + @x + ', y from table'
EXEC(@sql)
Far away is close at hand in the images of elsewhere.
Anon.
November 1, 2005 at 9:33 am
| So it sounds like T-SQL isnt useful for retreiving column headers then? |
Depends on what you want and...
Far away is close at hand in the images of elsewhere.
Anon.
November 1, 2005 at 9:16 am
DECLARE @tablename sysname, @sql nvarchar(4000)
DECLARE tabcur CURSOR FAST_FORWARD
FOR SELECT DISTINCT Table_Name FROM SV WHERE Column_Type LIKE '%char'
OPEN tabcur
FETCH NEXT FROM tabcur INTO @tablename
WHILE @@FETCH_STATUS...
Far away is close at hand in the images of elsewhere.
Anon.
November 1, 2005 at 9:04 am
That's OK then ![]()
Far away is close at hand in the images of elsewhere.
Anon.
October 27, 2005 at 6:56 am
Never said you were ![]()
Far away is close at hand in the images of elsewhere.
Anon.
October 27, 2005 at 6:45 am
Viewing 15 posts - 2,101 through 2,115 (of 3,544 total)