SQL Server development Questions


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 [...]

Answer Question   |  March 3, 2011  7:06 PM
Date convert, Embedded SQL, Field Defined L, SQL Server development, V6R1
asked by:
235 pts.

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 [...]

Answer Question   |  July 14, 2010  3:37 PM
SQL commands, SQL Fields, SQL Server 2008 administration, SQL Server development
asked by:
20 pts.

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?

Answer Question   |  December 11, 2009  2:42 PM
SQL Server development, SQL Server tables, WHERE condition
asked by:
25 pts.

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 2000), so I can't use [...]

Answer Question   |  August 15, 2009  2:00 PM
Comma Separated Values, SQL Server 2000, SQL Server development
asked by:
20 pts.

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) where the job fails [...]

Answer Question   |  May 30, 2009  8:21 AM
SQL Server 2000, SQL Server development, SQL Server error messages
asked by:
35 pts.

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

Answer Question   |  June 3, 2009  7:33 AM
RunTime, SQL Server 2000, SQL Server development, SQL Server stored procedures
asked by:
15 pts.

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

Answer Question   |  May 6, 2009  11:10 AM
IIS, Production Servers, SQL Server, SQL Server development, Web development
asked by:
30 pts.

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

Answer Question   |  March 26, 2009  11:55 AM
SQL, SQL Server development, SQL statements
asked by:
5 pts.

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

Answer Question   |  January 18, 2010  6:38 AM
Comma-delimited, SQL, SQL queries, SQL Server development, SQL Server Query
asked by:
5 pts.

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 pasting all code that I used…. .cs page code [...]

Answer Question   |  March 22, 2009  9:47 AM
.NET Framework 3.5, Database programming, SQL Server 2005, SQL Server development, Visual Studio 2008, WCFServiceLibrary
asked by:
15 pts.

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

Answer Question   |  March 6, 2009  9:42 AM
Batch file to backup, Batch files, Cash Register Express, SQL Server 2000 backup, SQL Server development
asked by:
5 pts.

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

Answer Question   |  February 23, 2009  12:29 PM
Database connectivity, JSP, SQL Server, SQL Server connectivity, SQL Server development, Web development
asked by:
25 pts.

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 Inventory Transaction table to the Shipment (Sales Order) tables [...]

Answer Question   |  February 6, 2009  10:39 PM
INNER JOIN, JOIN statement, LEFT JOIN, RIGHT JOIN, SQL, SQL queries, SQL Query, SQL Server development, SQL Server Query
asked by:
70 pts.

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 some application [...]

Answer Question   |  February 10, 2009  3:35 AM
Query optimization, SQL, SQL Server development, SQL Server Query
asked by:
5 pts.

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 [...]

Answer Question   |  February 2, 2009  7:40 PM
ADO, ADOdb, Binary Large Object, BLOB, Database programming, Memo fields, MySQL, SQL Server development
asked by:
90 pts.

Joining Tables in SQL Server
What is the difference between Outerjoin and Left outerjoin.

Answer Question   |  December 20, 2008  10:23 AM
JOIN statement, LEFT OUTER JOIN statement, OUTER JOIN statement, SQL Server development, SQL Server Query, SQL statements
asked by:
15 pts.

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 = 'BM' or @report_type ='UM' or @report_type ='AUM') Begin ( Select [...]

Answer Question   |  April 17, 2013  5:43 AM
IF ELSE statement, SQL Server 2005, SQL Server development, SQL Server stored procedures, SQL statements
asked by:
5 pts.

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

Answer Question   |  October 15, 2008  6:05 AM
SQL Server database design and modeling, SQL Server development
asked by:
20 pts.

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? [...]

Answer Question   |  May 7, 2008  3:23 PM
ADO, Application development, Domain, SQL Server development, SQL Server errors
2,585 pts.

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.

Answer Question   |  March 17, 2008  10:25 PM
SQL Server development, SQL Server performance, Triggers
2,585 pts.