Forum Replies Created

Viewing 15 posts - 841 through 855 (of 13,460 total)

  • RE: create a table on a 2nd SQL server via linked server

    ismahmoud (10/13/2016)


    i'm using this script :

    select * into LinkedServer.[DB_Name].[dbo].[Table_Name] FROM Server2.[DB2_Name].[dbo].Table2_Name

    but give this error:

    Msg 117, Level 15, State 1, Line 1

    The object name 'LinkerserverName.DB_Name.dbo.Table_Name' contains more than the maximum 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: How to divide money between two participants

    mcfarlandparkway (10/10/2016)


    I have two tables one is temporary and another is main dbo employee

    In the main table I have added a column called fullamount. Basically this fullamount column is coming...

    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 you import a JSON file to SQL sever

    ok bulk has to references files ON THE SERVER or a fully qualified UNC path

    so unless the SQL server is on your local machine, you need to move 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 do you import a JSON file to SQL sever

    andrew gothard (10/10/2016)


    My guess would be the SQL Server service account not having access to that location. Can't see the location / file => file doesn't exist

    Agreed. C:\Users\username\{anything} is...

    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: Cannot find SSIS package design files to determine datasources, steps, etc...

    all those packages are actually stored in an[image] data type in the [msdb].[dbo].[sysssispackages] table.

    you could preview them or manually convert them to xml stringsand save them to disk.

    select convert(nvarchar(max),convert(varbinary(max),packagedata)) from...

    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: Dynamic DB with dynamic Tables and dynamic Columns

    your Columns table would need the column name, data type+ size and probably whether it's null/not null;

    defaults and foreign keys, even when coming from our definitions table would 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: How to imbed an image into an email sent by dbmail

    rperetz (10/5/2016)


    This does not work for Gmail.

    Gmail, like many other client applications, have an option to prevent images from showing unless the sender is trusted. I had to do 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: Parse street

    based on experience, you won't find a one-function-to-rule-them-all address cleanup. break it up into smaller pieces that complement each other.

    there's too many exceptions to the patterns;

    what I've done previously is...

    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 it possible to create a database alias or synonym?

    SQL-DBA-01 (9/26/2016)


    Hi Experts,

    Wanted to know if there is there any way to have database names aliases in SQL Server?

    For example, there is a database with Name: "database A". 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: Generate a dynamic insert into statement for a table

    there's a neat trick using FOR XML to get a delimited list of columns.

    here's a snippet i wrote that i use in a procedure to generate sample insert/update/merge statements.

    it assumes...

    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: List of SQL Servers in a company

    First, use Central Management Servers or Registered Servers; that will be where you add new servers as you discover them.

    That functionality is built into SQL Server Management Studio, so there'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: How to use Windows Scheduler to run a Simple SQL Batch File?????

    Besides running the script with an impersonated credential, which solves the SQL problem,i would think you need an explicit path to your sql file:

    sqlcmd -S myserver -E -i "C:\Data\AutomatedScripts\DeleteRecordsTest.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: Insufficient memory error when executing the script.

    for a large script, you'll want to execute it via sqlcmd instead of trying to open it in SSMS and executing 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: Execution plan ignoring a Temp Table being used to filter the results

    did you try selecting from the temp table, and left joining the larger table?

    from your description, it sounds like your first table is the larger table, and you inner join...

    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: carriage return in stored proc

    you are doing it correctly, but it depends on what is doing the presenting.

    In Grid mode in Management Studio, CrLf are ignored(converted to spaces) FOR PRESENTATION ONLY, if you copy...

    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 - 841 through 855 (of 13,460 total)