Viewing 15 posts - 331 through 345 (of 391 total)
Is this someting I create or reference from my SQL Server database I already have set up for my receiving table?
December 19, 2012 at 10:10 am
Got error:
OLE DB provider "MSDASQL" for linked server "(null)" returned message "[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified".
Msg 7303, Level 16, State 1, Line...
December 19, 2012 at 9:59 am
Something like this?:
INSERT INTO tblTransactions(
PO_Number,
Buyer_Initial,
Qty,
Unit_Price,
Software_Description,
AllocationAccount,
PurchaseAccount,
HeatTicketNumber,
PurchaseCostCenter,
PO_Date,
Transaction_Date,
Transaction_Number,
AllocationDate,
AllocatedYN,
EndUserFirstName,
EndUserMiddleName,
EndUserLastName,
LAN_ID,
EndUserLocation,
TermDate,
EmployeeStatus,
Notes,
LicenseAvailable,
Transaction_Type,
AllocationCostCenter,
SoftwareShortName,
PC_Name,
TransferedSoftware,
TransferToFName,
TransferToLName,
TransferToLANID,
OriginalTransactionNumber,
TransferToCostCenter,
CostCenter,
SWstatus,
SWstatusReason,
EmployeeEmail)
SELECT PO_Number,
Buyer_Initial,
Qty,
Unit_Price,
Software_Description,
AllocationAccount,
PurchaseAccount,
HeatTicketNumber,
PurchaseCostCenter,
PO_Date,
Transaction_Date,
Transaction_Number,
AllocationDate,
AllocatedYN,
EndUserFirstName,
EndUserMiddleName,
EndUserLastName,
LAN_ID,
EndUserLocation,
TermDate,
EmployeeStatus,
Notes,
LicenseAvailable,
Transaction_Type,
AllocationCostCenter,
SoftwareShortName,
PC_Name,
TransferedSoftware,
TransferToFName,
TransferToLName,
TransferToLANID,
OriginalTransactionNumber,
TransferToCostCenter,
CostCenter,
SWstatus,
SWstatusReason,
EmployeeEmail
FROM OPENROWSET('MSDASQL',
'Driver={Microsoft Access Text Driver (*.txt, *.csv)};DefaultDir=C:\Users\DCAMPB\Desktop\;',
'SELECT * FROM Master.csv;' )
December 19, 2012 at 9:39 am
What does ColumnList mean?... actually listing the columns?
December 19, 2012 at 9:14 am
I'm thinking I can change the extension back to .csv and open in Excel, rename the columns to exact names of receiving table, insert missing columns, etc., then rename back...
December 19, 2012 at 8:43 am
That seemed to work well creating a file that closely resembled the below. If I wanted to populate an existing file with an identity key with this data is that...
December 19, 2012 at 7:57 am
I have this as a .csv file also which may be easier to handle (?)
December 17, 2012 at 6:55 am
Could the above be a permissions issue? It is peculiar that in VS my ASP.net SqlDataSource has the "Generate INSERT, DELETE, MODIFY Statements" grayed out... my other tables do not...
December 10, 2012 at 6:36 am
That makes sense about the number of transactions and those are consistent with the dependent triggers. I dropped them temporarily and recreated them and the number of transactions reponded accordingly....
December 8, 2012 at 1:15 pm
Your above code recommendation works perfectly... thank you for sharing! - Brian
December 6, 2012 at 7:27 am
The scenario is an ASP.net/VB.net/Javascript application has a popup that lists all the user's software. A dropdownbox allows for a Yes/no deactivation of the software, thus triggering an update that...
December 6, 2012 at 7:23 am
Something like this?:
USE [TrackIT]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER TRIGGER [dbo].[trCreateTerminationRecord]
ON [dbo].[tblTransactions]
AFTER UPDATE
AS
BEGIN
SET IDENTITY_INSERT tblTransactions ON
INSERT INTO tblTransactions
(tblTransactions.PO_Number,
tblTransactions.Quantity,
tblTransactions.Transaction_Type)
SELECT
INSERTED.PO_Number,
INSERTED.Quantity,
INSERTED.Transaction_Type
FROM INSERTED
WHERE Transaction_Type = 'Terminate...
December 6, 2012 at 7:11 am
So is there a way of simply inserting a new record into a table with a PK via a trigger?
December 6, 2012 at 7:04 am
Got this:
SET QUOTED_IDENTIFIER ON
GO
ALTER TRIGGER [dbo].[trCreateTerminationRecord]
ON [dbo].[tblTransactions]
AFTER UPDATE
AS
BEGIN
SET IDENTITY_INSERT tblTransactions ON
INSERT INTO tblTransactions
(tblTransactions.PO_Number,
tblTransactions.Quantity,
tblTransactions.Transaction_Number,
tblTransactions.Transaction_Type)
SELECT
INSERTED.PO_Number,
INSERTED.Quantity,
INSERTED.Transaction_Number,
INSERTED.Transaction_Type
FROM INSERTED
WHERE Transaction_Type = 'Terminate SW'
SET IDENTITY_INSERT...
December 6, 2012 at 6:47 am
So I can't have my trigger create a record to go in my tblTransactions and pick up the next available sequential number? I guess on my application side...
December 5, 2012 at 1:38 pm
Viewing 15 posts - 331 through 345 (of 391 total)