Forum Replies Created

Viewing 15 posts - 3,691 through 3,705 (of 13,469 total)

  • RE: How to script table data with either TSQL or Powershell?

    i just found this for powershell:

    http://stackoverflow.com/questions/3891952/sql-server-script-data-smo-scripter-not-working-when-output-to-file

    for doing it via TSQL, i've used a script by Narayana Vyas Kondreddi for years and years:

    http://vyaskn.tripod.com/code.htm#inserts

    there's a few parameters that need to be...

  • RE: Convert IP address to Binary (32)

    here's what i have saved that looks like a stepping point to getting the string converted; it does not produce the final result, but something not quite finished:

    --change it back:

    ;with...

  • RE: Convert IP address to Binary (32)

    whoops sorry;

    here's an example of converting that int value into a binary map;

    while i have an example of converting an into to varchar as a binary mapping, my example...

  • RE: Convert IP address to Binary (32)

    saved in my snippets:

    declare @ipAddress varchar(20)

    SET @ipAddress='010.000.123.094'

    SELECT

    CONVERT(varchar(3),convert(int,parsename(@ipAddress,4))) + '.' +

    CONVERT(varchar(3),convert(int,parsename(@ipAddress,3))) + '.' +

    CONVERT(varchar(3),convert(int,parsename(@ipAddress,2))) + '.' +

    CONVERT(varchar(3),convert(int,parsename(@ipAddress,1)))

    SELECT

    convert(int,parsename(@ipAddress,4)) * 256 * 256 * 256 +

    convert(int,parsename(@ipAddress,3)) * 256 * 256...

  • RE: Importing Active Directory user accounts in SSIS?

    do you really need #1 all active directory uses, or #2 only the ones in a certain group?

    there's an extended stored proc that makes #2 easy:

    --you need to KNOW the...

  • RE: The IT Employee Benchmark

    I actually feel that the number of recent certifications a person has is directly related to how long they've been un-employed;

    I'm guilty of it myself, when one company went...

  • RE: Add user to sql server with the required permission

    well adding a user and granting permissions are a three part process.

    first you really needed to already have a ROLE in your specific database that has the permissions you want...

  • RE: In linked server, which server will process data?

    adonetok (4/10/2013)


    Is there any way to set up linked server always run in B without this statement?

    EXECUTE ( 'select * from order.dbo.allorder where city=''london'' ' ) AT ServerB;

    Now that I'm...

  • RE: How to find common tables between two databases?

    here's a really easy example:

    --common tables between the two

    SELECT name from SandBox.sys.tables

    INTERSECT

    SELECT name from Dictionary.sys.tables

    --tables only in SandBox

    SELECT name from SandBox.sys.tables

    EXCEPT

    SELECT name from Dictionary.sys.tables

    --tables only in Dictionary

    SELECT name from Dictionary.sys.tables

    EXCEPT

    SELECT...

  • RE: In linked server, which server will process data?

    MyDoggieJessie (4/10/2013)


    In this scenario Server B processes it, then passes it back to Server A

    i believe that's incorrect:

    i'm pretty sure this code, Executed on server A would copy the entire...

  • RE: Finding DROPPED Trigger

    if not too much time has passed, they may still be in the default trace;

    there's a built in report that filters by database in SSMS:

  • RE: ON’Microsoft.ACE.OLEDB.12.0LEDB Error

    your linked server, is it for an excel spreadsheet, or an access database?

    I've never gotten Access to work in Ace / 64 bit, but i've read creating a DSN, and...

  • RE: T-SQL Help

    i'd consider using row_number() fo5r this one, i htink:

    SELECT * FROM

    (

    SELECT ROW_NUMBER() OVER( PARTITION BY CustId ORDER BY[Actual Date] DESC) AS RW,

    [Next],

    CustId,

    Customer,

    [Scheduled Date],

    [Actual Date],

    [Last]

    FROM [Customer]

    ) MyAlias

    WHERE RW = 1

  • RE: TSQL help

    i couldn't see how to get the data filtered either;

    it seemed like maybe the Nextdate, but that doesn;t match your total criteria; maybe by NextCompany,Location?

    i cannot see why you want...

  • RE: Linked Server Setup Always Creates a Loopback

    LinkSvrName?

    I know you are obfuscating this, but you didn't provide the other information I mentioned at all.

    What the name of the server you are running this code on?

    Is the "remote"...

Viewing 15 posts - 3,691 through 3,705 (of 13,469 total)