Forum Replies Created

Viewing 15 posts - 3,376 through 3,390 (of 13,460 total)

  • RE: Bulk Copy.

    kish DDL for a table would look more like this, having the compelte datatypes:

    what you posted cannot be copied and pasted into SSMS, na dwouldn't help us build a...

    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 there an open source equivalent to sqlcmd.exe?

    shew (5/30/2013)


    It looks as if SQLPSX will require a SMO install (which is not "policially suitable" for my situation), although SQLPSX itself appears to have a "manual installation" as an...

    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: Creating two databases at the same time, strange behavior

    any chance there is a DDL server trigger or extended event doing it?

    i've got examples of adding roles to a database automatically if they do not exist,whenever the a...

    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 there an open source equivalent to sqlcmd.exe?

    there's also several "portable" GUI equivilents of SSMS that would not require an installation;

    the one that i keep on my PortableApps is LinqPad http://www.linqpad.net/?

    not sure if that is an option...

    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: Triiger -> call batch -> Batch call java

    if you are going to put the whole path for the executable, i'd suggest actually putting the full name of the executable and also the path to the package; you...

    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: Flagging Records within a table of sequenced numbers

    wow great job providing the setup;

    my attempt is adding a rownumber ot partiton by two columns, and joining the results;

    does this give you what you were after?

    DECLARE @numbers TABLE (number...

    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: Convert integer to 4-character alphnumeric representation

    here;s an example, with 0000 thru ZZZZ as the min/max values:

    the first just generates example,s the second makes a calculated column based on the identity value of a table:

    SELECT POWER(36,4)...

    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: Logon Trigger fails on SQL Server Authenctication

    the other option, instead of EXECUTE AS, is to GRANT INSERT ON AuditDatabase.dbo.LogonHist to PUBLIC;

    then every user would technically have rights to the table so the trigger can isnert into...

    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: Making a copy of a table.

    well if you want to do it via TSQL, look at my script contribution from a while ago;

    a couple of procedure sp_GetDDL and sp_getDDLa which scripts any object:...

    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: Question in BCP - SQL 2008

    not sure what you mean;two different files would require two calls to bcp.

    you can call If the startup account for SQL Server is a domain account, you could use a...

    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: add a new column to a table with conditions

    and noting that DEFAULT(0) is just shorthand for creating a constraint might make this more obvious, as well:

    ALTER TABLE SomeTable

    Add MyColumn int --data type

    null --null or not null

    default(0)...

    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: Question in BCP - SQL 2008

    balasach82 (5/28/2013)


    IS there a way to use BCP out statement in a single query like (without using xp cmdshell)

    BCP ... out ....file1.csv

    BCP ... out ....file2.csv

    bcp is a command line/console application,and...

    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: add a new column to a table with conditions

    pooya1072 (5/28/2013)


    hi friends

    i want to add a column to a table with conditions below :

    1- it has a default value=0

    2- this column can get null value

    3- no constraint should be...

    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: Explode dates in data flow task

    it kind of sounds like you need a calendar table;

    that way, you could select every possible date from the calendar table, and then left join it to the data you...

    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: Dropping select tables across a database.

    here's two examples of what Kingston was referring to;

    I personally prefer to use the sql server specific metadata, rather than the information_schema, but it's effectively the same thing:

    the only reason...

    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 - 3,376 through 3,390 (of 13,460 total)