Forum Replies Created

Viewing 15 posts - 7,681 through 7,695 (of 13,460 total)

  • RE: Find avg price between two tables but the problem is I can't use join between two tables

    kinda brief on the details, aren't you?

    I think the real issue is you KNOW there is a relationship between the two tables, but don't know how to join them? does...

  • RE: collation

    i think you could run into problems if the default colaltion ( which is what tempdb would have) is different:

    this simple exampel raises this error:

    Msg 468, Level 16,...

  • RE: Need to import data into Sql Server Table from an excel File (using SQL commands)

    yes you can do it, but there are a few rules: the sheet has to have column names in the first row, i think.

    if your SQL2008 instance is 64 bit,...

  • RE: Public Role inj 2008

    i've seen this same requirement in other posts; we could google to find the original thread itself, but I wrote this snippet in response; this generates all the revoke commands...

  • RE: Restrict number of users to a db

    you probablyt want to describe what you are trying to do to get a better answer, as it's a pretty broad question.

    This kind of question sometimes comes up due...

  • RE: Replace in String

    i htink by using a case statement, you can make sure you apend them together correctly; I'm assuming the fields are varchars, so i don't worry about trailing spaces;

    see if...

  • RE: convert todays date to julian format

    here's an example on how to get all the elements to create the Julian date; to append them you have to cast them to VARCHAR, and you'd also have to...

  • RE: convert todays date to julian format

    Krasavita (5/2/2011)


    The data is going to JDEdwards

    I think you'll have to check with them to know what specific format they expect before we can give you much of a code...

  • RE: convert todays date to julian format

    ahh...but WHICH Julian format do you want?

    from lurking here on the forums, I've seem three different styles;

    for example

    109252 = in AS400/DB2 date is 01/01/1900 + 109 years +...

  • RE: Prevent Truncate, Delete and Update Statements

    TRUNCATE can be prevented if a FOREIGN KEY exists to the table,so you could create an empty table with a FK constriant to the tables you want to protect from...

  • RE: database mail export

    i think this is my "final" version of the script; hope this helps you:

    --Reverse_Engineer_database_Mail_Settings.sql

    USE msdb

    GO

    Declare @TheResults varchar(max),

    @vbCrLf CHAR(2)

    SET @vbCrLf = CHAR(13) +...

  • RE: ListAvailableSQLServers (SQL-DMO) deprecated

    and yet another way..this doesn't return the "hidden" servers denny identified; just the items that are advertised via SQL browser, i think.

    this is how to do it in .NET using...

  • RE: database mail export

    yes, except for the passwords used for the mailserver's AUTH command; those are in a CREDENTIAL that I've never figured out how to script out yet;

    however the rest of it's...

  • RE: xp_cmdshell winzip

    dallas13 (4/28/2011)


    okay thanks for the reply but when I ran the same script 5 times after 5 minutes interval, it overwrite the files every time.

    Here is what it says,

    WinZip(R) Command...

  • RE: xp_cmdshell winzip

    i think the double quotes have to be around the entire path to the wzzip.exe file, not just *part* of the file name:

    declare @cmd varchar(2000)

    select @cmd

    = '"C:\Program Files (x86)\WinZip\wzzip.exe"' +...

Viewing 15 posts - 7,681 through 7,695 (of 13,460 total)