Forum Replies Created

Viewing 15 posts - 1,246 through 1,260 (of 13,460 total)

  • RE: Trigger doesn't seem to work

    as a general rule, if you've deflared @variables, you made a mistake in a trigger, and are limiting yourself to single row data instead if set based.

    the issue is your...

    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: Need help in adding several features to a sql script

    kaplan71 (3/3/2016)


    Hello --

    I am running a SQL script that is designed to query the whole log of a particular database. The syntax of the script is the following:

    use RayStationMachineDB_472

    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: Sequential Table insertion hierarchy

    EXEC sp_msdependencies @intrans = 1

    that will give you all objects in foreign key hierarchy order. it can be painfully slow or never ends if 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: Twitter data load into sql server using ssis

    i googled a bit and i saw quite a few blogs and examples on how to do this;

    I would recommend starting there:

    https://www.google.com/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=load+twitter+into+SQL

    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: refresh only some tables in a database

    if it's truly a handful of tables, and the servers can talk to each other, i'd consider using either a MERGE statement or a pair of UPDATE/INSERT;

    that assumes 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: 'Refresh' data only from Prod to Test environments

    I have Redgate SQL Compare, but we do not(unfortunately) use source control for SQL objects.

    I have a methodology for this situation that might help, assuming you also have SQL Compare.

    In...

    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 call a function with multiple parameters in a select statement

    you should just pass all the parameters; if one of the columns is a column name, you have to select it from the table;

    select dbo.CountOpps(User_ID, @StartDate, @EndDate),*

    FROM SOMETABLE

    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: Does it possible to bind different table column data in original table column in computed column specification properties?

    this almost sounds like ID_NUM is a foreign key, and you want to render the details inline in the table; why not just create a view that pulls 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: Why the code moving to Else block?

    i believe you'll get an error if the column doesn't' exist, right? physical_memory_in_bytes vs physical_memory_kb

    i've done it with an exec command instead;

    IF (SELECT CONVERT(MONEY,LEFT(CONVERT(VARCHAR,SERVERPROPERTY('productversion')),CHARINDEX('.',CONVERT(VARCHAR,SERVERPROPERTY('productversion')))))) >=11

    BEGIN

    SET @cmd = 'UPDATE...

    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: Global temp table usage

    whoops duplicate!

    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: Global temp table usage

    ocean3300 (2/29/2016)


    Grant Fritchey (2/29/2016)


    Global temporary tables are removed after the last process that is referencing them closes. Because you're closing the process, and no other process is referencing the table,...

    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: Peer review on a deadlock?

    Eddie that got me over the logjam, thanks;

    grabbing the object_name you mentioned, and adding some new smart parsing to my email that shreds xml to get that object name in...

    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: SUSER_SNAME or SUSER_NAME in audit column (Azure SQL db)

    for a lot of my trigger or procedure based audits, i don't limit myself; i just log everything, since you never know what might be relevant later.

    I add columns for...

    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: Bulk Operations

    sri2015 (2/29/2016)


    I have few questions on Bulk Operations

    1) how the SQL Server detects Bulk Operations ?

    2) I did put SQL Server database in Bulk Logged recovery model and started to...

    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: Bulk Operations

    fatfingered an enter key; answer is below

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