dcsimg

Search:

Type: Posts; User: GaryMazzone

Page 1 of 13 1 2 3 4

Search: Search took 3.56 seconds.

  1. Replies
    6
    Views
    327

    Re: Recipe/order/stock database.

    Sounds OK
  2. Replies
    7
    Views
    207

    Re: Adding column field, please help

    Why do you care where the field is located (positioned) in the table it does not matter where it is. If you want it to show up after firstname in the return set then specify it like that in the SQL...
  3. Replies
    8
    Views
    391

    Re: MySQL Replication Question

    It will if there are enough logs retained to get it upto date
  4. Replies
    8
    Views
    391

    Re: MySQL Replication Question

    We currently do this where I work. I would setup a second server install MySQL there and then restore a backup from the current and set replication up from current to that one. One problem is that...
  5. Replies
    7
    Views
    483

    Re: Question about Design-Concept

    for end date of NULL I would use ISNULL(endDate,'12/31/9999')
  6. Replies
    7
    Views
    483

    Re: Question about Design-Concept

    This sounds to me like a Type 3 data warehouse example... the rigg can be changed (different components) and be active for a specified date range. So I guess I would have a startDate and endDate on...
  7. Re: ADO Querying a table based on a field without a key

    There is no need to do that.... The order comes back as you specify with an order by clause it makes no difference as to how it is stored on disk
  8. Re: ADO Querying a table based on a field without a key

    I would add a int column as the Clustered PK and create an unique nonclustered index on that field. Making a varchar field that can hold anything is not a create choice for a clustering key in my...
  9. Re: ADO Querying a table based on a field without a key

    What's returned from Select * from serverfolders ?
  10. Re: [RESOLVED] VS 2017 is there a way to create a backup for sql database server to a

    I work and have for more years then I care to mention work in a 24x7 365 days a year environment. I get at most 1/2 hour of maintenance time a month for deploying new app code when I have only my...
  11. Re: [RESOLVED] VS 2017 is there a way to create a backup for sql database server to a

    The you just use the stuff I showed you earlier the path is all local to your machine

    Let's say you want to save to a folder on C named MSBackups and the DB you want to backup is myApp

    BACKUP...
  12. Re: [RESOLVED] VS 2017 is there a way to create a backup for sql database server to a

    Is that you own local machine?
  13. Re: [RESOLVED] VS 2017 is there a way to create a backup for sql database server to a

    That depends on where the database is... is it on a remote server then you would need to use something like a UNC path with is some thing like this:
    \\machinename\drive\folder
  14. Re: [RESOLVED] VS 2017 is there a way to create a backup for sql database server to a

    Karen I would never take an active database off line... What if it is being used for some in a prod environment?

    As to the command

    Backup Database [test] <-- this is your database you want...
  15. Re: VS 2017 is there a way to create a backup for sql database server to a folder?

    You mean this:


    BACKUP DATABASE [test] TO DISK = N'Drive:\folderpath\test.bak' WITH NOFORMAT, INIT, NAME = N'test-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, COMPRESSION, STATS = 10
  16. Re: create query from 2 different sql servers to use in gridview

    Do you have a linked server from the MSSQL server and the MySQL server?
  17. VS 2017 Re: Limited selecton of records

    Add a Top(4) and order by clause to the select
  18. Replies
    6
    Views
    433

    Re: Get ID of last inserted record

    Add to the end of your command: SELECT SCOPE_IDENTITY();


    That will bring back the id (assuming you are using an Identity column) of the insert you just did
  19. Re: want to delete two sql server tables with one button

    Personally I never set up cascades...
    You need to do the deletes from each table... You can do updates based on a join but not deletes that way... Your where condition will also cause a problem...
  20. Re: Restore a previous versioned SQL DB to newer SQL Server

    You can use SSIS to move the data but you can't just restore a newer to an older version... I would do the SSIS rather than scripting... You can add a conditional split to add new rows or update...
  21. Re: How to use transaction with data adapter and autogenerated commands

    I would normally use a lastModifiedDate (orLastUpdatedDate) and ModifedBy field. When you go to save the record on either update of delete, you use the PrimaryKey in the where clause a long with the...
  22. VS 2010 Re: How to copy records from one database table to another database table?

    Just a stupid question maybe but Why not just do this in one SQL statement?



    INSERT INTO ATS (FirstName, MiddleName, LastName, salary)
    SELECT FirstName, MiddleName, LastName , salrate...
  23. Re: ADODB reads results in a strange order

    What like statements?

    The order returned from the database is not guaranteed unless you use an order by clause... you pick it
  24. Re: Concatenate two NChar data type columns

    Yes... NCHAR data type always store the full size even if it is less
  25. Re: Concatenate two NChar data type columns

    I would add Trim of the fields in the SQL that you use to generate the data set.
  26. VS 2010 Re: How to convert this piece of sql code to oledb command?

    Read about SQL Joins (https://www.w3schools.com/sql/),,,,, you just add conditions to the inner join
  27. VS 2010 Re: How to convert this piece of sql code to oledb command?

    UPDATE S SET
    S.empnum = ER.Employee_Number
    FROM scard S
    INNER JOIN Employee_Records ER
    ON s.FirstName = ER.First_Name


    BUT What happens when you have 2 people with the same first NAME...
  28. Re: [RESOLVED] Do SQL row updates cause fragmentation?

    NO Varchar(max) does not reserve size it just say it can grow to that size. Both varchar and nvarchar types use only the amount of storage required. As to sizing a row in SQL can hold 8K of space...
  29. Re: Do SQL row updates cause fragmentation?

    Yes it will.... fragmentation can be caused if you update/add data for the row that will extend it (increase the size)…. It could case fragmentation of an index if you change the value you are...
  30. VS Code Re: [RESOLVED] Pass array to SQL Stored Procedure

    Remember if you are on SQL Server 2016 or better there is already a function from MS to do this named STRING_SPLIT()
  31. VS Code Re: [RESOLVED] Pass array to SQL Stored Procedure

    I would make the return a varchar(1000), (RETURNS @output TABLE (splitval int)). That way you can use it for things other than just integers
  32. VS Code Re: Pass array to SQL Stored Procedure

    The function is a table valued function... it is compiled into the DB.

    To all it something like this:
    Declare @NIDList VARCHAR(MAX) = '123;456;789'
    SELECT [NID]
    ,[P1]
    ,[P2]
    ,[RC]...
  33. VS 2017 Re: [RESOLVED] SQL query to COUNT null / blank values

    This can be simplified a bit:


    ((tblPControls .PControl IS NULL) OR (tblPControls .PControl =''))

    to this:


    ISNULL(tbl.Controls.PControl,'') = ''
  34. VS Code Re: Pass array to SQL Stored Procedure

    If you are on a version below 2016 then you can use this to split the strings



    CREATE FUNCTION usp_fnsplit (
    @inputVals VARCHAR(MAX),
    @delimiter CHAR(1)
    )
    RETURNS @output TABLE (splitval...
  35. VS Code Re: Pass array to SQL Stored Procedure

    In SQL Server 2016 and newer (that means Azure also) there is string_split function that you can use.... I pass a comma deliminated string as a var use
    Create table #tempTable (id int);
    INSERT...
  36. Re: How to be certain that a SQL backup ran successfully

    I was going to post some code but I keep getting page errors
  37. Re: SSIS, SSRS vs coding it yourself in VB or C#.

    For DW I tend to do one project with multiple packages and one package to orchestrate the work
  38. Re: SSIS, SSRS vs coding it yourself in VB or C#.

    When I do project there are many packages in the project and one master to call each part. in 2014 and earlier you needed to redeploy all the parts of the project (even if the did not change). in...
  39. Re: SSIS, SSRS vs coding it yourself in VB or C#.

    I do like the new SSIS option of only replacing one Package if you use many (as you should) if a change is needed you don;'t need to redeploy everything
  40. Re: SSIS, SSRS vs coding it yourself in VB or C#.

    I tend to move all data from source location to a staging table area (that is a copy of the tables from prod). Then I perform the cleansing on data in that area (gets the load off prod and on to the...
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Featured


Click Here to Expand Forum to Full Width