Viewing 15 posts - 2,686 through 2,700 (of 3,543 total)
Try this
DECLARE @bcp as varchar(8000)
select @bcp = 'CMD /C ' +
'bcp "Select * From Salesperson_Dimension" queryout SalesPersonFiletemp.txt -S servername -T ' +
' && type SalesPersonFiletemp.txt >> SalesPersonFile.txt &&...
April 21, 2004 at 7:13 am
Top of the head idea, not tried or tested.
Create a new table to contain two columns, procname and datetime. Put all sql in proc within a transaction. Add an update...
April 21, 2004 at 6:21 am
Thought it would cheer you up, after your rather terse post, you old sour puss you
April 16, 2004 at 6:48 am
Declare @sdate datetime, @edate datetime
Set @edate = CONVERT(varchar(10),GETDATE(),102)
Set @sdate = @edate - 11
select s.SNUMBER, s.NAME, d.[DATE] as RecDate
from dbo.SINFORM s
left outer join dbo.DATARECS d
on...
April 16, 2004 at 6:45 am
Declare @sdate datetime, @edate datetime
Set @edate = CONVERT(varchar(10),GETDATE(),102)
Set @sdate = @edate - 11
select s.SNUMBER, s.NAME, d.[DATE] as RecDate
from dbo.SINFORM s
left outer join dbo.DATARECS d
on...
April 16, 2004 at 6:43 am
Declare @sdate datetime, @edate datetime
Set @edate = CONVERT(varchar(10),GETDATE(),102)
Set @sdate = @edate - 11
select s.SNUMBER, s.NAME, d.[DATE] as RecDate
from dbo.SINFORM s
left outer join dbo.DATARECS d
on...
April 16, 2004 at 6:41 am
CREATE TABLE stagingtable(rowid int IDENTITY(1,1), input varchar(100))
DTS into stagingtable, then select as follows
SELECT u.input as 'User',ISNULL(t.input,'') as 'Time',ISNULL(l.input,'') as 'Location'
FROM stagingtable u
LEFT OUTER JOIN stagingtable t...
April 15, 2004 at 7:19 am
SELECT department,
[Date],
SUM(CASE [Product] WHEN 'E-Tech' THEN [output] else 0 END) as 'E-TECH',
SUM(CASE [Product] WHEN 'E-9' THEN [output] else 0 END) as 'E-9',
SUM(CASE...
April 15, 2004 at 7:07 am
If you replace [Daily Total] in the first select with
SUM([Daily Total]) as 'Daily Total'
and remove [Daily Total] from the GROUP BY clause
then you should get
110 2004-04-01 00:00:00 146.0 0.0...
April 15, 2004 at 6:43 am
Smallmoney is 4 bytes and has a maximum of 214,748.3647
To hold the equivalent in decimal would be 9 bytes decimal(10,4)
However if you are only storing to 2 decimal places then
smallmoney...
April 15, 2004 at 6:31 am
alzdba,
I am writing some of the procs, but the 3rd party will be writing some. I have two choices, either put defaults on the columns where needed (they are NOT...
April 15, 2004 at 3:47 am
OK some simple instructions to get you foing
DTS is Data Transformation Services. It allows the transfer and transformation of data to/from SQL server.
In EM (Enterprise Manager), expand your server
Select your...
April 15, 2004 at 3:39 am
From BOL:
p (precision)
Specifies the maximum total number of decimal digits that can be stored, both to the left and to the right of the decimal point. The precision must be...
April 15, 2004 at 3:07 am
There was errors in the case statements and i missed product in the select. When using subqueries you have to give them an alias, i called the subquery a but...
April 14, 2004 at 9:35 am
Try this
SELECT department,
[Date],
SUM(CASE [Product] WHEN 'E-Tech' THEN [output] else 0 END) as 'E-TECH',
SUM(CASE [Product] WHEN 'E-9' THEN [output] else 0 END) as 'E-9',
...
April 14, 2004 at 9:10 am
Viewing 15 posts - 2,686 through 2,700 (of 3,543 total)