Forum Replies Created

Viewing 15 posts - 4,636 through 4,650 (of 13,465 total)

  • RE: BCP to pipe delimited format

    for the pipe delimited row terminator, you need to add -t"|" to the command ; see bcp /? from a command prompt for all the options.

  • RE: BCP to pipe delimited format

    you didn't show your bcp commnad at all.

    in theory, it will look something like this, assuming calling from xp_cmdshell:

    EXECUTE master.dbo.xp_cmdshell 'bcp "EXEC DatabaseName.dbo.up_CheckProc";1 ''ZZZ'', 1, 0, 1, 1, ''2020-04-01 00:00:00.000'',...

  • RE: How to join four tables using left outer join

    just formatted for readability:

    SELECT

    MPC_A."DOC_DT",

    MPC_A."DOC_NO",

    PROD_REQR."doc_no",

    PROD_REQR."doc_dt",

    PROD_REQR."a_code",

    PROD_REQR."p_reqr",

    PROD_REQR."p_stk",

    MTP_ISSUE."issue",

    bnd_agnt."Frst_bnd",

    MTP_TSTK_A."RAWQTY",

    MTP_FGSTK_A."PEND_QTY"

    FROM { oj...

  • RE: What's more efficent for search criteria?

    the key to indexing and performance is going to be how they are searched in your WHERE clause.

    if all 8 values are absolutely required for every search, an index with...

  • RE: Log IP Address and SPID in physical tables for Later Auditing!

    opc.three (10/5/2012)


    *adds to toolkit*

    Thanks Lowell!

    lol a good portion of my toolkit comes from your posts too! glad we shared a bit!

  • RE: Log IP Address and SPID in physical tables for Later Auditing!

    I think another way to get the IP address, without granting view server state is some of the newer built in functions that were added in 2008 and above.

    SELECT ConnectionProperty('client_net_address')...

  • RE: check birthdate

    your error is in this validation line:

    IF(SELECT member_no from member where member_no = @adult_member_no) is null

    BEGIN

    RAISERROR('Customer doesn''t exist', 11, 1)

    END

    if there are TWO or more rows...

  • RE: Apply Style in Select Query

    does this example, where I'm applying some styles to the results help?

    note i have to do a find/replace to the string to unescape some characters;

    DECLARE @HTMLBody varchar(max)

    Select @HTMLBody = (Select...

  • RE: On Delete Trigger

    here's a full featured example of a trigger that sends an email, taking special care to get all rows affected, and a bunch of audit info;

    CREATE TABLE WHATEVER(

    WHATEVERID INT IDENTITY(1,1)...

  • RE: BULK Insert zwischen Datenbanken

    Google Translate (German to English) (10/5/2012)


    Hello,

    I upload a catalog (about 800,000 records) from another, remote DB (via linked server).

    The recovery model is set to FULL. Is it true that for...

  • RE: Query logic, and's and or's

    here's one way, by joining the data on itself;

    because all your sample data has either pants or shoes and socks, it's misleading, so I added a couple of dumb examples...

  • RE: Query logic, and's and or's

    oops; duplicate post after editing, so i trimmed the oldest. see below.

  • RE: Invalid object error when I run ANYTHING!

    see your database trigger EventCapture?

    do SELECT OBJECT_DEFINITION(EventCapture)

    you'll see that that's the culprit; it's writing to the table in the database 'dbEvt.dbo.DTA_Events_Log'

    instant fix is to disable the trigger:

    DISABLE TRIGGER EventCapture ON...

  • RE: Check for the existence of a file BEFORE processing in SQL Server - SOLUTION

    One of the frequent posters here Elliot Whitlow posted a CLR project on CodePlex that does a lot of file manipulations, including a FileExists;

    if adding CLR is an option in...

  • RE: Need help with trigger

    ok i'm HOPING this lazy fix is correct;

    instead of going to find the columns that consist of the primary keys of a table constraint,

    is it true that your tables are...

Viewing 15 posts - 4,636 through 4,650 (of 13,465 total)