Forum Replies Created

Viewing 15 posts - 331 through 345 (of 391 total)

  • RE: Syntax for transfering data from one table to another

    Is this someting I create or reference from my SQL Server database I already have set up for my receiving table?

  • RE: Syntax for transfering data from one table to another

    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...

  • RE: Syntax for transfering data from one table to another

    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;' )

  • RE: Syntax for transfering data from one table to another

    What does ColumnList mean?... actually listing the columns?

  • RE: Syntax for transfering data from one table to another

    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...

  • RE: Syntax for transfering data from one table to another

    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...

  • RE: Import from Access

    I have this as a .csv file also which may be easier to handle (?)

  • RE: sign of corrupt database?

    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...

  • RE: sign of corrupt database?

    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....

  • RE: SET IDENTITY_INSERT [dbo].[tblTransactions] ON

    Your above code recommendation works perfectly... thank you for sharing! - Brian

  • RE: SET IDENTITY_INSERT [dbo].[tblTransactions] ON

    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...

  • RE: SET IDENTITY_INSERT [dbo].[tblTransactions] ON

    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...

  • RE: SET IDENTITY_INSERT [dbo].[tblTransactions] ON

    So is there a way of simply inserting a new record into a table with a PK via a trigger?

  • RE: SET IDENTITY_INSERT [dbo].[tblTransactions] ON

    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...

  • RE: Trigger using @@IDENTITY

    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...

Viewing 15 posts - 331 through 345 (of 391 total)