Forum Replies Created

Viewing 15 posts - 6,271 through 6,285 (of 13,469 total)

  • RE: Error when displaying all the column names in one single column

    in the code you posted but snipped out, there is a GO statement.

    variables are desroyed at every GO, so you need to remove the GO, or re-declare and re-assign the...

  • RE: Error when displaying all the column names in one single column

    without an ORDER BY, there's no guarantee that this "header" will be in the order you are expecting, but it's simple:

    SELECT 'Name|Address_line_1|Address_line_2|City|State|Zip|Territory_Code|LDC_Account_Num|Account|POWERFLOW|POWERDROP|Unbilled|NotDue'

    UNION ALL

    SELECT

    CONVERT(VARCHAR(500),UPPER(SUBSTRING(ea2.last_name,1,1)) + LOWER(SUBSTRING(ea2.last_name,2,499)))

    + ', '...

  • RE: xp_cmdshell help

    i'm sure xp_cmdshell is limited to 4096 chars; that's a hard limit with no work arounds, as it's a feature of the cmd.exe object int he operating system.

    Powershell might be...

  • RE: conversion error

    if you convert to MONEY datatype inbstead of decimal, the data will convert cleanly;

    otherwise, as Ninja stated, you have to remove the non-numeric strings like commas and spaces.

    with MySampleData (TheValue)

    AS

    (

    SELECT...

  • RE: date when changes made to the object?

    if object = something in sys.objects, then yes, you can get teh default trace to see who last created/altered/dropped

    if object = data, then no, unless you have an auditing...

  • RE: Where do I go from here Education wise?

    absolutely agree; something as simple as create a database and adding a table, then backing it up is the first step;

    screwing around with the tables so you see the data,...

  • RE: Where do I go from here Education wise?

    ramjohn8 (12/7/2011)


    Yeah right now I'm trying to learn as much on the subject. The DBA at my company is willing to let me in on some stuff but right...

  • RE: Database Mail question - sending results of a Query via email

    when your query contains single quotes, you have to escape them, as it's now dynamic sql.

    this is updated witht hat change and is at least syntactically correct:

    EXEC msdb.dbo.sp_send_dbmail

    @recipients=N'my.email@gmail.com',@body='Message Body',...

  • RE: how many times cursor has looped....

    SD1999 (12/6/2011)


    Thank you, i'll play with it.

    those are not really phone numbers, it was just for example

    no more rules, this is it

    what and where do you think would be a...

  • RE: how many times cursor has looped....

    SD1999 (12/6/2011)


    One more condition here i forgot to mention...

    the logic(algorithm) of number replacements should be followed as per below

    we cant use some random number

    the reason is appl talking to oracle...

  • RE: Backup to disk not on the domain

    yes it's possible because of the way the NET USE command can allow you to map a drive with someones credentials

    exec master.dbo.xp_cmshell 'NET USE G: \\UNCPath\d$ /user:domain\user password'

    something like this...

  • RE: temp tables

    add that issue to your to-do list also...anyone creating queries that run for that long need some help in writing better performing code;

    We had the same problem a while...

  • RE: how many times cursor has looped....

    well, here's how I do it;

    My assumption is the phone number string in question is all numeric with no dashes, but it's not hard to add logic to fiddle...

  • RE: how many times cursor has looped....

    SD1999 (12/6/2011)


    I knew, i will step on 'cursor killers' 🙂 🙂

    Sure, thank you for the offer.

    Need some time to modify script ( for security purposes ) before i can...

  • RE: how many times cursor has looped....

    I'm skipping the question completely, and going to what i think was the core issue...scrambling data.

    I stopped as soonas I saw the cursor, because I know that unless you are...

Viewing 15 posts - 6,271 through 6,285 (of 13,469 total)