Forum Replies Created

Viewing 15 posts - 316 through 330 (of 13,460 total)

  • RE: Finding a particular date in all tables

    SearchAllTables from stack overflow explicitly ignores date/datetime datatypes.

    peek at the code:  

    AND  DATA_TYPE IN ('char', 'varchar', 'nchar', 'nvarchar', 'int', 'decimal')

    modify your version to use datetime data...

    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: Oracle's ROWTYPE equivalent in Sql Server 2014

    in SSMS, if you drag the columns folder from the SQL object explorer to an ssms window, all columns will appear as a comma delimited list.
    it's easier then to...

    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: Oracle's ROWTYPE equivalent in Sql Server 2014

    SQL doesn't have a rowtype equivalent.
    ROWTYPE , in sql terms for me, is used in a cursor as a collection of all the @parameters that would correspond to each...

    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: Sys logins mysteriously dropped

    We have an Audit in place that captures Login created or Login Changed.
    I have seen on patch nights, those same logins get dropped and recreated as part of the patches;
    i...

    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: Help with a simple TSQL script to open and save an Excel file.

    it's gotta be permissions.
    here's my suggestion:
    On the  SQL Server, Create a credential that has your actual username and password, because we know it works when you execute it.

    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: SQL Server Database Tests / Changing Server

    can you create some Aliases in SQL configuration manager, so, for example servers named [ProdCluster01]  and [ProdETSource] etc etc are all aliased to point to your local machine? or to...

    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: Powershell To Get Active Directory Users And Groups into SQL!

    the verb was just so it mirrored the filename and process; it just seemed right;
    This was republished today , as it had some relevancy for new folks.

    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: how to move files with no extensions

    use a script task instead of a file system task;

    the code would look something like this:


    string WorkingDirectory = (string)Dts.Variables["WorkingDirectory"].Value;
          string ArchiveDirectory = (string)Dts.Variables["ArchiveDirectory"].Value;

    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: Removing headers from T-SQL job output file

    how are you sending the data to CSV in your job step? sqlcmd? bcp? powershell? SSIS? both sqlcmd and bcp can add those delimiters , and force column widths .

    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: OPENROWSET and "Could not find installable ISAM"

    ok i was able to duplicate the error and a resolution. here's the tiny differences.
    I created am XLSX document , with a default sheet name of Sheet1.
    i used...

    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: OPENROWSET and "Could not find installable ISAM"

    Jeff Moden - Friday, March 16, 2018 3:33 PM

    sgmunson - Friday, March 16, 2018 6:34 AM

    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: Formatting an auto increment

    yes, with a calculated, persisted column, that uses the real identity column. 
    Note this is just creating a formatted version of your identity, so it's a little repetitive.
    You might...

    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: Debugging Subquery returned more than 1 value

    the error is most likely inside your function.

    DBO.get_account_id_by_invoice_date( i.invoice_id )

    just based on the name, it's probably trying to find the "latest" invoice, but what if...

    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: email with attachment powershell

    my comments got lost somehow.
    the issue the OP is encountering is the Service Account that the SQL Agent runs under does not have access to  "C:\Users\myName\Desktop\WUpdates\"
    that path is a private...

    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: email with attachment powershell

    mtz676 - Tuesday, January 2, 2018 11:50 PM

    This piece of code works perfectly well when I run in powershell-sends an email along with 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!

Viewing 15 posts - 316 through 330 (of 13,460 total)