Viewing 15 posts - 1,921 through 1,935 (of 3,544 total)
LTRIM(STR(ColumnB,20,ColumnA))
Far away is close at hand in the images of elsewhere.
Anon.
April 28, 2006 at 6:43 am
Your problem is the misuse of the SUBSTRING function
SUBSTRING ( expression , start , length )
try this
set @strNoEmple = convert(int,substring(@strLinea,6,10))
set @strApePaterno = substring(@strLinea,16,20)
set @strApeMaterno = substring(@strLinea,36,20)
set...
Far away is close at hand in the images of elsewhere.
Anon.
April 21, 2006 at 2:21 am
You need to JOIN the inserted table to the updated table using the primary key, e.g.
UPDATE a
SET ChangeDate = GETDATE()
FROM TABLE_A a
INNER JOIN inserted i
ON...
Far away is close at hand in the images of elsewhere.
Anon.
April 20, 2006 at 7:26 am
Can you explain "Georgian" ?
I always understood Julian dates were YYDDD or YYYYDDD format
What do the Date & Time values refer to ?
Far away is close at hand in the images of elsewhere.
Anon.
April 20, 2006 at 7:21 am
My guess would be
SELECT h.salesrep_Name,d.disp_code,[description],count(m.act_status)
FROM histdata h
CROSS JOIN dispositions d
LEFT OUTER JOIN modifiedcalldata m
ON m.prog_sol_number = h.prog_sol_number...
Far away is close at hand in the images of elsewhere.
Anon.
April 20, 2006 at 4:10 am
Happy to help ![]()
| In BOL, their example shows "SQL_Latin_General" for the... |
Far away is close at hand in the images of elsewhere.
Anon.
April 20, 2006 at 2:41 am
Create the file (e.g. C:\MyFolder\MyFile.fmt) using text editor like notepad
therefore if your column name was DataCol and is 2500 chars long then create the file with the following on...
Far away is close at hand in the images of elsewhere.
Anon.
April 19, 2006 at 7:05 am
To bulk insert into a table that has an identity column you have to use a format file otherwise you will get the error
Try this
8.0
1
1 SQLCHAR 0 255 "\r\n" ...
Far away is close at hand in the images of elsewhere.
Anon.
April 19, 2006 at 6:28 am
Try using this fomat file
8.0
12
1 SQLCHAR 0 1 "‘" 0 x ""
2 SQLCHAR 0 10 "’" 1 col1 ""
3 SQLCHAR 0 10 "|" 0 x ""
4 SQLCHAR 0 4 "|" ...
Far away is close at hand in the images of elsewhere.
Anon.
April 13, 2006 at 7:41 am
This will achieve the same without the WHERE clause ![]()
SET FMTONLY ON
SELECT Institution, Period FROM Transactions
Far away is close at hand in the images of elsewhere.
Anon.
April 12, 2006 at 8:19 am
SELECT
LTRIM(SUBSTRING(',' + t.words + ',', n.number + 1,
CHARINDEX(',', ',' + t.words + ',', n.number + 1) - n.number - 1))
FROM [numbers] n
INNER JOIN @t t
ON SUBSTRING(','...
Far away is close at hand in the images of elsewhere.
Anon.
April 12, 2006 at 8:11 am
DECLARE @start datetime, @end datetime, @sql nvarchar(200)
SET @start = '20060401'
SET @end = '20060420'
SET NOCOUNT ON
CREATE TABLE #temp (techid int)
INSERT INTO #temp (techid) SELECT DISTINCT techid...
Far away is close at hand in the images of elsewhere.
Anon.
April 12, 2006 at 7:59 am
To show your results (treat year as one period) then
SELECT a.GL_ID, a.GL_Name_VC,
SUM(CASE WHEN a.Period_TI = 1 THEN Amount ELSE 0 END) AS [Op Bal],
SUM(CASE WHEN a.Period_TI > 1...
Far away is close at hand in the images of elsewhere.
Anon.
April 12, 2006 at 7:39 am
DECLARE @from datetime, @to datetime
SET @from = '2006-04-11 10:00:00'
SET @to = '2006-04-11 11:00:00'
SELECT COUNT(*)
FROM (SELECT DATEADD(minute,n.number,@from) AS [Time]
FROM master.dbo.spt_values n
WHERE n.type = 'P'
AND...
Far away is close at hand in the images of elsewhere.
Anon.
April 11, 2006 at 7:28 am
or, if EmpID not consecutive
SELECT (SELECT COUNT(*) FROM [Emp] b WHERE b.Dept = a.Dept AND b.EmpID <= a.EmpID)
,a.EmpID, a.Dept, a.EmpName
FROM [Emp] a
ORDER BY a.Dept ASC, a.EmpID ASC
Far away is close at hand in the images of elsewhere.
Anon.
April 11, 2006 at 6:57 am
Viewing 15 posts - 1,921 through 1,935 (of 3,544 total)