Forum Replies Created

Viewing 15 posts - 331 through 345 (of 13,460 total)

  • RE: email with attachment powershell

    definitely, use something that will create a proper filename, and handle ending slashes

    the below returns "C:\NewFolder\20172018"
    $filename = "20172018"
    $file= "C:\NewFolder"+$filename
    you mosdt likely need the file and...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Get DDL for any SQL 2005 table

    the naming thing is caused by using the sp_rename command; there are a few questions of the day on the same issue.

    when you use sp_rename on a view/procedure/function,...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Get DDL for any SQL 2005 table

    jhzhao88 - Wednesday, December 20, 2017 3:56 PM

    Lowell - Monday, April 10, 2017 10:51 AM

    quotey thing...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: db_denydatawriter and db_datareader roles

    can't you add a windows group a user,  grant it db_datareader then set the database to read only?
    then you can add the 1000 users to the user group, and...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: SSMS 2014 not opening PRC/TAB/UDF files in SQL Query Editor

    it's a two step process;
    you have to associate the files at windows, and then tell SSMS that you want to edit those extensions as if they were sql code.
    create...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: ToolBox missing for Maintenance task

    Lowell - Tuesday, January 17, 2017 1:26 PM

    Toolbox is always empty. its the...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: invoke-sqlcmd and stolen single user session

    veepee78 - Tuesday, October 17, 2017 12:04 AM

    Steve Jones - SSC Editor - Friday, October 13, 2017...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: invoke-sqlcmd and stolen single user session

    i am under the impression that each Invoke-sql command opens a connection, does the work, and closes the connection.
    so you need all the commands in a single script, and not individual, multiple...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: One of my Passed Exam of MCSA shows in MCSE, Why?

    the labs.
    practicing them multiple times, line by line.
    every one of them.

    I've been teaching a class for our local SQL Server User Group that does nothing...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: test if first character of a value is upper case

    you should only have to cast the comparison with a collate statement;
    this worked for me, does this help?

    i used 128 for the length, since a object name...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: replace text in large number of view and procedure definitions

    I am always so afraid of using a shot gun approach without definitive testing and eyeballing for correctness, because a find/replace could nail partial words /strings.
    I would use either SSMS...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Stored Procedure Doesn't return any records

    I would also suggest the SET NOCOUNT ON,  that used to be a staple of my old classic ASP pages; I would bet that is what is affecting you.
    you...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Error in Trigger

    i would think getting rid of the trigger, and creating a simple TSQL job that runs every hour would be better and easier.

    a script like this would do...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Error in Trigger

    gotcha, i think the issue is the cross database query call.

    then normal individual who enters the data is not in the [msdb] SQLAgentOperatorRole or SQLAgentUserRole, which arethe roles...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Error in Trigger

    have you set a proxy up on the job that is going to do the work?
    that's pretty essential for anything that touches stuff outside of SQL server, like command...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Viewing 15 posts - 331 through 345 (of 13,460 total)