Forum Replies Created

Viewing 15 posts - 9,316 through 9,330 (of 13,460 total)

  • RE: Script to continuously insert data

    CREATE TABLE [Test] (col1 bit)

    DECLARE @endDate datetime

    SET @endDate = DATEADD(hh,8,GETDATE()) -- 8 hours from now

    WHILE GETDATE() < @endDate

    BEGIN

    INSERT INTO [Test] VALUES...

    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: size of the table

    the procedure sp_spaceused takes an optional parameter, tablename, which would give you some info like this:

    sp_spaceused CLIENTREQHIST

    --results:

    name rows...

    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 to findout who changed the sqlserver properties?

    i just changed it on my dev machine, and can find it in both the SQL logs and the Event Viewers "Security" Windows logs, but it's not obvious what the...

    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 can I track if the email has been opened or not?

    do you host the email server? if you are talking about emails you SENT, you cannot, you can only check the status of emails that exist on your mail server,...

    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: SQLServer Agent 'sed' job reporting success; but does nothing

    Paul White NZ (5/5/2010)


    I've had a much better idea. Create an XML format file like so:

    <snip>

    And use the BULK OPENROWSET provider to allow you to pre-process the raw 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 to insert procedure output in table?

    Pravin Patel-491467 (6/1/2010)


    Sorry Dear, but this is also not working.

    well this compiles correctly, but it depends on the other procedure GetFileSpaceStats , which was not posted so far;

    if the procedure...

    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: format file with bcp command

    this question i think you could have found directly from SQL Server Books Online or Google.

    bcp AdventureWorks2008R2..MyTestFormatFiles format nul -c -t, -x -f myTestFormatFiles.Xml -T

    http://msdn.microsoft.com/en-us/library/aa174646(SQL.80).aspx

    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: Check Constraints

    there are two functions you can use to check the length of a string :

    LEN(SomeField)

    --or

    DATALENGTH(SomeField)

    both return integer values. I believe that your check constraint would have to use either...

    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: T-SQL Problem ...

    Scott awesome job posting the table and data; it makes it so easy for me to test with!

    Thank you!

    someone poke holes in my calculations, but i keep getting 20 days...

    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: store table data in xmlfile

    Your response is very misleading...you said you were building an application in c#; that application is a Windows Application right? Based on that, I inferred you had some familiarity with...

    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: Linked Server Update - difference in behaviour SQL2005/SQL2000

    if there are two tables, aliased W and T, i think it should look like this:

    UPDATE W

    SET

    W.TableNumber = T.TableNumber,

    W.LineNumber = T.LineNumber,

    .....

    UnitNumber = T.UnitNumber

    FROM [LINKED SERVER].DATABASE.dbo.TABLE1 AS W,

    [LINKEDSERVER].DATABASE.dbo.temporaryTABLE AS T

    WHERE W.IdentityID...

    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: store table data in xmlfile

    every dataTable and dataSet in .NET has the ability to .ReadXML and .WriteXML.

    you can add a .xsd DataSet to your project, and drag and drop an one or more...

    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 SP with references to remote server

    ahh ok, then i think you can use dynamic sql to add the linked server.

    you might want to drop and recreate each time, or use a if not exists(select *...

    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 SP with references to remote server

    Richard maybe something like this:

    the proc sp_tables_ex in a try...catch, if it fails to find the linked server?

    i tested it with both a valid and invalid linked server name, 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: How do I prevent the Windows Administrator Account from viewing my database?

    CREATE PROCEDURE WHATEVER WITH ENCRYPTION.....

    but encryption only goes so far....SQL has to be able to decrypt it to use it, right? you can make it harder on them, but it...

    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 - 9,316 through 9,330 (of 13,460 total)