Forum Replies Created

Viewing 15 posts - 10,921 through 10,935 (of 13,460 total)

  • RE: Help with importing data

    data like this is tough; i always do this via TSQL and not through SSIS, just because I'm more familiar with TSQL.

    Here's how i would do it:

    I'd grab the entire...

    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 stored procedures

    you can create a table, and then insert into it directly, but if you alter a table, a GO statement is expected.

    simply create your table with the constraint in 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: Sql Server Programming:

    One of the harder concepts to grasp is how SQL server works with Set Based operations, compared to programmatically based processing, which thinks about processing data "Row By Agonizing Row"...

    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: urgent help

    since from the perspective of the server you are looking at, the mdf files are located on a \\UNC drive, I'd speculate that an instance of SQL server on...

    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: urgent help

    if you have the mdf and ldf files, in SSMS in the Object Explorer window on the left, you would simply right click on the Database Folder and select Attach...

    then...

    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: viewing who has seen the data

    easy enough middletree;

    add the procedure and run it on your test server.

    then immediately run this statement:

    select * from sp_DMLTrace

    you'll get results for at least 5 rows, which include the commands...

    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: urgent help

    if the files are "in use", could it be that someone renamed database "D1" to another name?

    With the select * from sysdatabases, Can you check the filename column 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: viewing who has seen the data

    a DML trigger tells you who CHANGED data...doesn't help with trying to find who SELECTED data.

    a DDL trigger tells you who CHANGED a table structure, , so it again does...

    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: table Variables as Parameters

    Carl, your example is for SQL 2008, right? I had previously understood that in 2008 you could use the table variables for parameters, and when i tested your code, 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!

  • RE: Using a UDF to provide a value for an insert statement

    functions almost always need to be preceded with the owner/schema

    so either of these should work:

    Insert into newtable (trainingType, otherCols)

    values (dbo.fnType(@varcharType), OtherValues)

    or

    Insert into newtable (trainingType, otherCols)

    select dbo.fnType(@varcharType), OtherValues

    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: Contains() won't search certain words

    yes, there is a file that contains all the "noise" words that will be ignored.

    on my dev machine, you it is named "noiseENG.txt or noiseENU.txt , and resides in 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: Looking for simple example of connecting to a 2nd SQL 2005 server

    glad i could help out; good luck on your project.

    when you have time, you should add how to add other types of linked servers to your snippets of code; it's...

    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: Looking for simple example of connecting to a 2nd SQL 2005 server

    that's easy; the views sysservers or sys.servers hold all the linked server information, so something like this would work fine;

    if exists(select * from sysservers where name='MyLinkedServer')

    BEGIN

    exec sp_dropserver 'MyLinkedServer','DropLogins'

    END

    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: Looking for simple example of connecting to a 2nd SQL 2005 server

    this might help too; sometimes you want an alias for the other server instead of it's real name:

    EXEC master.dbo.sp_addlinkedserver @server = N'MyLinkedServer',@srvproduct = N'', @datasrc = N'STORMSQL\SQL2005', @provider = N'SQLOLEDB';

    --...

    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: Looking for simple example of connecting to a 2nd SQL 2005 server

    hope this helps; here's a clean, simple example.

    on my network, from my local dev machine ,there is a named instance on another server that i can connect to via SSMS,...

    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 - 10,921 through 10,935 (of 13,460 total)