Forum Replies Created

Viewing 15 posts - 271 through 285 (of 391 total)

  • RE: Stored procedure to pull Access data into SQL Server

    It gives me an error that there are too many parameters.

    Could I use something like this? There is no formal security on the database, just the folder in which it...

  • RE: Stored procedure to pull Access data into SQL Server

    I used the 'Microsoft.Jet.OLEDB.4.0', and redid the addlinkserver:

    EXEC sp_addlinkedserver

    @server = 'GCDF'

    ,@provider = 'Microsoft.Jet.OLEDB.4.0'

    ,@datasrc = '\\denalibcc\databases\GCDF\BE\GCDF_Web_Master.mdb'

    ,@srvproduct='Access'

    GO

    I'm confused with the below, should I be looking at the security on the...

  • RE: updating dates from a mm/dd/yy to yyyy-mm-dd 00:00:00.000 format

    UPDATE [CPCE_DB].[dbo].[Orders]

    SET [OrderDateAlt] = CAST([AdminDateID] AS Datetime);

    gives: Msg 241, Level 16, State 1, Line 1

    Conversion failed when converting datetime from character string.

  • RE: updating dates from a mm/dd/yy to yyyy-mm-dd 00:00:00.000 format

    getting an error: Msg 173, Level 15, State 1, Line 1

    The definition for column 'OrderDateAlt' must include a data type.

    ALTER TABLE [CPCE_DB].[dbo].[Orders] ADD [OrderDateAlt] (DATETIME);

    or ALTER TABLE [CPCE_DB].[dbo].[Orders] ADD...

  • RE: updating dates from a mm/dd/yy to yyyy-mm-dd 00:00:00.000 format

    Something like this?:

    INSERT INTO [CPCE_DB].[dbo].[Orders].[OrderDateAlt]

    SELECT Cast[AdminDateID] AS Datetime

    FROM [CPCE_DB].[dbo].[Orders]

  • RE: trouble with SP

    Actually I put the wrong exam numbers in to test... your solution worked great and I learned some valuable information... Thanks!!

  • RE: trouble with SP

    I changed to the next field needing updated 'contentScore2'

    I ran the code you suggested:

    SELECT *

    FROM [PearsonScores].[dbo].ViewScoresView s

    INNER JOIN [HSBCP_DB].[dbo].[ExamInfo] e ON SUBSTRING( s.testID, 3, 4) = e.testID

    and I...

  • RE: trouble with SP

    I used the below and got no error in the Sp creation or execution but the field did not update, any places to look?:

    Thanks!

    USE [PearsonScores]

    GO

    SET ANSI_NULLS OFF

    GO

    SET QUOTED_IDENTIFIER ON

    GO

    CREATE PROCEDURE...

  • RE: problem with 'not exists' subquery

    Yes thanks for the tips on several points... I got the same results so my initial query wasn't that bad... but I did discover that the data in general was...

  • RE: problem with 'not exists' subquery

    Hope this is what is needed:

    USE [HSBCPcopy_DB]

    GO

    SET ANSI_NULLS ON

    GO

    SET QUOTED_IDENTIFIER ON

    GO

    SET ANSI_PADDING ON

    GO

    CREATE TABLE [dbo].[certs](

    [certificationIndex] [int] IDENTITY(1,1) NOT NULL,

    [peopleId] [int] NULL,

    [statusID] [int] NULL,

    [certificationExpireDate] [datetime] NULL,

    CONSTRAINT [PK_certs] PRIMARY KEY CLUSTERED...

  • RE: problem with 'not exists' subquery

    Hope this helps as far as DDL and what the data looks like:

    CREATE TABLE [dbo].[Billing](

    [indx] [int] IDENTITY(1,1) NOT NULL,

    [peopleId] [int] NULL,

    [chargeamount] [money] NULL,

    [billMonth] [int] NULL,

    [billYear] [int] NULL,

    CONSTRAINT [PK_Billing1st] PRIMARY KEY...

  • RE: problem with 'not exists' subquery

    i could write it like this and it returns 52 rows when I need it to return 14 rows:

    SELECT c.PeopleID

    FROM [HSBCP_DB].[dbo].[certs] c

    where c.[statusID] = 1 and c.[certificationExpireDate] = '2015-07-31...

  • RE: restoring .bak file to new database using T-SQL

    Thank you for your patience... and I will study the books online and this solution to better understand this and similar issues that will arise in the future... again... thanks!

  • RE: restoring .bak file to new database using T-SQL

    Isn't this for a database sored on my local machine? I'm trying to do it on a server based database.

  • RE: restoring .bak file to new database using T-SQL

    RESTORE DATABASE BCCrestore

    FROM DISK = 'D:\BCC_DB_backup_201505020017.bak'

    WITH MOVE 'BBC' TO 'D:\Databases\Data\BCCrestore.mdf',

    MOVE 'BBC_log' TO 'D:\Databases\Data\BCCrestore_log.ldf',

    REPLACE,

    STATS = 10;

    GO

    Msg 3234, Level 16, State 2, Line 2

    Logical file 'BBC' is not part of database 'BCCrestore'....

Viewing 15 posts - 271 through 285 (of 391 total)