Forum Replies Created

Viewing 15 posts - 1,201 through 1,215 (of 13,460 total)

  • RE: Automate stored procedure creation

    you could do something like this:

    a combination of the ccommandline type command and xp_cmdshell, you can ge tthe file contents of your *.sql files and execute them.

    I just built this...

    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 do I add a text qualifier to a bcp command

    my first example, where i used delimiters that never occur in my data is a solid example of exporting and importing data with whitespace and dbl quotes int he contents,...

    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 do I add a text qualifier to a bcp command

    ok, bcp IN supports the quoted identifier, but not when you use bcp out/queryout;

    it's been a while since i did bcp, i switched to Common Language Runtime to do my...

    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: Using Client Login as a Parameter

    only if you change the datasource to use their AD credentials, instead of the cached username/password.

    In that case, the end users most likely don't have permissions to query the 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: How do I add a text qualifier to a bcp command

    the order of the flags shouldn't make any difference, but i think if you run bcp /?, and put flags in the same order as the help specifies, that would...

    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: Getting the error "Maximum stored procedure, function, trigger, or view nesting level exceeded"

    you have to go deeper.

    all that does is turn the string into a table. join that to another real table.

    replace the function with dbo.DelimitedSplit8k(@Specimen,','); and CROSS APPLY that...

    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 do I add a text qualifier to a bcp command

    here's an example of a four character column delimiter(the -t) and a four character row delimiter(-r).

    just put your pipe in dbl quotes.

    i think if you just add the minus q...

    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: Is this possible

    cory.bullard76 (3/15/2016)


    Lowell, how does T2 know to look at last year's data for the same days?

    Last YEARS data?

    i thought you said last week.

    the join criteria is the datediff info: i'm...

    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: Is this possible

    i think if you group your data by week or by day (with a filter for a weeks worth of data, and then join it against itself, you'll get what...

    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: Group authentication oddity

    yes, it's expected behavior when we are talking about Windows groups.

    you just have to take into consideration the situations you are seeing here: multiple groups, and the cumulative inheritance of...

    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: The datepart microsecond is not supported by date function dateadd for data type date.

    the error is really straight forward.

    just like an integer cannot have decimal information, the DATE datatype does not support sub-minute time increments.

    choose a datype that is appropriate; ; DATETIME can...

    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: Best practices to add Primary key to existing tables

    here's a very basic example: just add a new identity column as a primary key, assuming there is not already any identity and not any existing PK either.

    the identity function...

    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: stored procedure pass value in the parameters

    I believe the request is to split the @sku into a table , via dbo.DelimitedSplit8K for example:

    right now he's passing a string that happens to have a comma in it.

    WHERE...

    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 avoid to mention custom port number at destination server?

    turn on the SQL Browser. that's it's entire purpose.

    if you are not going to run the SQL Browser service, i believe that on each and every client that is going...

    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 2012 MSDN Licenses

    interesting request, here's how i would handle it:

    it's probably safe to assume that if it was installed from an MSDN media, all the version would have used the same installation...

    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 - 1,201 through 1,215 (of 13,460 total)