• Design a SQL Server trigger to calculate column averages and return them to another table

    I'm quite new to SQL Server and I’m struggling to design a trigger. I need this trigger to execute daily and calculate averages of columns and return them to another table.

    SQL Server Ask the Experts2,585 pointsBadges:
  • IF ELSE in SQL Server stored procedure

    I am using this code which is giving error: if (@report_type = 'CM') Begin Select distinct Region,sum(ClientCount) as ClientTotal Into #NewTemp From ( End else if (@report_type = 'AM' ) Begin ( Select distinct Region,Area,sum(ClientCount) as ClientTotal Into #NewTemp1 From End else if (@report_type...

    Rrj15 pointsBadges:
  • Selecting Field Defined as L in SQL Server

    I am building 4 part SQL select across 4 files using union alls. All 4 files have a date field which is one of the fields I am selecting. My problem is that on one file the date field is defined as L type where the other three files have a date field defined as 8S 0. Since the field I am selecting...

    Canuhp235 pointsBadges:
  • SQL Server 2008 Code to find fields containing similar text

    I want to find fields that may be the same in some parts but not 100% identical For example Field 1 Has the word "Smith" Field 2 has "Smith AB" in it Is there any code i can write to find these, without writing code for every single name I am using SQL server 2008 Thanking you in advance

    Davewaltonuk20 pointsBadges:
  • SQL to insert comma-delimited string value to table column

    I have string like '1,2,3,45,6,7,8' I want to insert each comma separated value in a table column...my output look like this: COLUMN 1 2 3 45 6 7 8

    231219835 pointsBadges:
  • composite WHERE condition in SQL Server

    In Oracle, I can do: Select * from table where field1 || field2 in ('01XX','02YY','03ZZ') ; Where field1 has values of 01,02,03 and field2 has values of XX,YY,ZZ etc Can I do the same thing in SQL Server, or do I need define some derived fields to get the same effect?

    MarcW25 pointsBadges:
  • comparing variable to a field with comma-separated values

    "m trying to compare a variable (@item) to a field which has multiple item numbers separated by commas. I've used "LIKE" and "IN" to no avail. I've also tried appending wildcard characters to the variable (@item2), which also hasn't worked. Full-text indexing is not activated on the DB (SQL Server...

    Caruncles20 pointsBadges:
  • Purpose of creating SQL Server stored procedures at run time

    Hi Experts, I am a programmer in SQL. Please explain me the purpose of creating stored procedures during run time and it's effects on performance and memory. Please provide me if there is any best alternative for this. Thanks in advance

    Skothamasu15 pointsBadges:
  • Find exact point where SQL Server 2000 job fails

    I am running an SQL Server Job, that executes a stored procedure with about 900 commands (mostly insert commands). The job was working OK, but suddenly fails, due to erroneous data (error message : overflow in converting numeric data to dadatype numeric !!). How can I find the exact point (command)...

    fbellos35 pointsBadges:
  • What are the steps involved in copying the website from production to preproduction server

    what are the steps involved in copying the website from production to preproduction server

    Sangeeth30 pointsBadges:
  • Can you force a user input in a SQL statement, then have the statement continue running

    Hi, Can one in an sql statement , when run in sql, force a user input to be entered and when entered, the sql continues to completing

    Bugsy5 pointsBadges:
  • Error while referencing external assembly in SQL Server 2005.

    Sir, I created a dll (SqlWcfServiceLibrary1.dll) using .net frammework 2008. My code has a reference of another assemble (WcfServiceLibrary1.dll) also. I want to create assemble in sql and use that assemble in a procedure. I am getting error that "Error while referencing external assembly". I am...

    Batsa15 pointsBadges:
  • SQL Server 2000 backup problem using batch file

    i have written a batch file to backup sql server database and it holds the data of CRE.the batch file is running successfully. but, after running i am unable to login to CRE (cash register express). i doubt if my batch file is corrupting my database please answere me what may be the problem

    Mesunny5 pointsBadges:
  • Website and database connection

    can anybody tell me how to connect the MS sql database with the jsp pages....I got the ip address and username with the password...I know how to connect it in a local system...but I dont know how to connect it with the database in the web server....Please help me to solve this matter

    Advancedjava25 pointsBadges:
  • To retrieve records from SQL Server database

    Hello All, I have a requirement with sql server. Please find below the same. In database say we have a column named "Name" in a table. The records that are available in the table are say like Column_Name = Names Lean Metric Sequence Lean Operation Metric Lean Cleaning and so on.... Now, through...

    Pichha5 pointsBadges:
  • SQL Server Query Help Needed

    I have a table with Inventory transacation records. The table contains both Shipment (outgoing) and Receiving (incoming) transactions. I'm trying to write a report that lists both Sales Orders that result in Shipment records and Purchase Orders that result in Receiving records. If I link the...

    Arlin70 pointsBadges:
  • Notes rich text field to BLOB/Memo field in SQL Server using ADOdb

    I have an agent that uses ADODB to connect and insert a row into a SQL Server database. I want to store the contents of the Body field in the memo (rich text) into a Memo field in the SQL Server database (or Blob field). I'm finding examples of reading this kind of data back into a Notes...

    tjarman90 pointsBadges:
  • Joining Tables in SQL Server

    What is the difference between Outerjoin and Left outerjoin.

    Bijaybehera2915 pointsBadges:
  • Column extention

    Hi I want to expand the number of columns that sql would permit me to creat. How do I start? any suggestions? example: 1032 maximun column limit I want in the area of upper 5000 ramge for a table. someone help thanks

    Ctc12320 pointsBadges:
  • Query error when using application role with ADO connection

    I am developing an application with an ADO connection. I need to run a query on two different databases on the same server using an application role. When I run the query I get an error \domainusername does not have a logon on database (referring to the second database). Is there any way around it?...

    SQL Server Ask the Experts2,585 pointsBadges:

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following