Viewing 15 posts - 46 through 60 (of 87 total)
Right click on any DB -> All Tasks -> Generate SQL Script
goto tab "options" and check "Script SQL Server logins (Windows Ans SQL Server logins)"
I Have Nine Lives You Have One Only
THINK!
October 10, 2011 at 11:52 pm
try change
set @sql = 'SELECT TABLE_NAME = NAME FROM ' + @dbname + '..SYSOBJECTS WHERE XTYPE =' + '''' + 'U' + ''''with
set @sql = 'SELECT TABLE_NAME = NAME FROM...
I Have Nine Lives You Have One Only
THINK!
October 10, 2011 at 11:05 pm
SELECT
[Salesperson]
, [Cust ID]
, [Customer]
, MAX([Sales1]) [Sales1]
, MAX([Sales2]) [Sales2]
, MAX([Sales3]) [Sales3]
FROM (
SELECT
OSLP.SlpName AS [Salesperson]
, OINV.CardCode AS [Cust ID]
, OINV.CardName AS [Customer]
, SUM(INV1.LineTotal) AS [Sales1]
, NULL AS [Sales2]
, NULL AS[Sales3]
FROM
OSLP...
I Have Nine Lives You Have One Only
THINK!
October 10, 2011 at 5:24 am
I see only one solution is to add another column to TableA of destination server
Copy from DB1 to DB2
Insert Into TableA(... , DB1_ItemID )
Select ..., ItemID From DB1..dbo.TableA
Insert Into...
I Have Nine Lives You Have One Only
THINK!
October 9, 2011 at 11:52 pm
if
Both will have some rows in them already
it will throw an error
I Have Nine Lives You Have One Only
THINK!
October 9, 2011 at 11:44 pm
modified code of sp_spaceusage
select
t.name,
rows = convert(char(11), rows),
--reserved: reserved
reserved = ltrim(str(reserved * d.low / 1024.,15,0) +
' ' + 'KB'),
--data: dpages+ used
data = ltrim(str((dpages + used) * d.low / 1024.,15,0) +
' '...
I Have Nine Lives You Have One Only
THINK!
October 9, 2011 at 11:41 pm
SET IDENTITY_INSERT
Allows explicit values to be inserted into the identity column of a table.
I Have Nine Lives You Have One Only
THINK!
October 7, 2011 at 1:39 am
select
DFES
, MAX(CASE WHEN PHASE='1' THEN ACTIVITYNAME END) as [PHASE_1]
, MAX(CASE WHEN PHASE='2' THEN ACTIVITYNAME END) as [PHASE_2]
, MAX(CASE WHEN PHASE='3' THEN ACTIVITYNAME END) as [PHASE_3]
, MAX(CASE WHEN PHASE='4' THEN...
I Have Nine Lives You Have One Only
THINK!
October 6, 2011 at 12:43 am
SELECT
ID
, MAX(CASE WHEN SEQ = 1 THEN CODE ELSE NULL END) CODE1
, MAX(CASE WHEN SEQ = 2 THEN CODE ELSE NULL END) CODE2
, MAX(CASE WHEN SEQ = 3 THEN CODE...
I Have Nine Lives You Have One Only
THINK!
October 5, 2011 at 6:13 am
Last row
[CompanyID] - EF
[ItemCode] - 123456
[Description] - 2 x Tennis balls, Rackets and bags
[SupplierAccount] - TNSRCKBL
[PONumber] - T763781
[POLineNumber] - 3
[OutstandingQty]...
I Have Nine Lives You Have One Only
THINK!
September 19, 2011 at 10:52 pm
Just that the last row has a comma in item description and I need to insert the data with the comma that is in there. The problem is it considers...
I Have Nine Lives You Have One Only
THINK!
September 19, 2011 at 9:54 am
Hi, dcs09
I have changed fmt-file and received result (see attachments)
CREATE TABLE [dbo].[Out_orders_Table2](
[CompanyID] [nchar](3) NULL,
[ItemCode] [nchar](9) NULL,
[Description] [nchar](38) NULL,
[SupplierAccount] [nchar](9) NULL,
[PONumber] [nchar](8) NULL,
[POLineNumber] [numeric](3, 0) NULL,
[OutstandingQty] [numeric](6, 0) NULL,
[DueDate] [nchar](30) NULL,
[StockRoom]...
I Have Nine Lives You Have One Only
THINK!
September 19, 2011 at 1:09 am
can you upload csv-file to the forum?
I Have Nine Lives You Have One Only
THINK!
September 17, 2011 at 1:01 am
open it as a delimited file with both commas and tab as delimiters
is there both commas and tab as delimiters in each line in the file?
in this case? you...
I Have Nine Lives You Have One Only
THINK!
September 16, 2011 at 11:56 pm
try to use simple "bulk insert"
bulk insert [dbo].[Out_orders_Table2] from 'path to file' with (fieldterminator = ',')
I Have Nine Lives You Have One Only
THINK!
September 16, 2011 at 9:20 am
Viewing 15 posts - 46 through 60 (of 87 total)