Concatenate Two Fields t-sql
I need to concatenate two fields one varchar(50) and the other varchar(12)The result I need is to see the full 50 characters of the first field even though all 50 may not be filled.Thanks
View Answer
| Jun 25 2008 3:41 PM GMT
| asked by
Jp5282
SQL Server, T-SQL, Concatenate
Problem converting Access SQL query to T-SQL 2005
I have a SQL Server 2005 database. One of my co-workers has put a MS Access front-end on it, because of the ease of designing queries in Access. I need to convert an existing query from Access SQL to T-SQL to put it into production. So far, I have removed all the obvious differences between the 2,...
View Answer
| Jun 3 2008 3:41 PM GMT
| asked by
Chunkydrew
T-SQL, SQL, Microsoft Access
help with t-sql recursion
I have a tableCREATE TABLE [dbo].[chart_hiera2]( [int] NULL, [ChildID] [int] NULL, [Child] [varchar](100) NULL, [ParentID] [int] NULL, [CGID] [int] NULL, [Depth] [smallint] NULL, [Lineage] [varchar](255) NULL, [node] [bit] NULL, [PercentOwnership] [varchar](10) NULL, [Notes] [varchar](80) NULL) ON...
Answer Question
| Mar 28 2008 8:32 PM GMT
| asked by
Ilay
Recursion, T-SQL
Using Case Statement Inside SQL Join
Hi,I am trying to convert dynamic sql into static sql due to permission issue, I faced a challange when i am trying to convert this part of code given below-- join to ADDR_DETAIL SET @join_sql = 'inner join ADDR_DETAIL on ADDR_DETAIL.GRP_CONTACT_ID = pm.GRP_CONTACT_ID AND ' IF (@ChannelEntity...
View Answer
| Mar 13 2008 11:08 AM GMT
| asked by
Bmdayal
SQL, T-SQL, JOIN
Passing a database name as a stored procedure parameter
I would like to be able to pass the name of a database as a parameter to a stored procedure. This db would be used for certain queries and may be different from the db where the stored procedure runs. Is it possible to specify a database name from within the T-SQL of the stored procedure? If so,...
View Answer
| Mar 11 2008 10:13 PM GMT
| asked by
SQL Server Ask the Experts
Stored procedures, T-SQL
issue sp_helprotect
if i give sp_helprotect on one table. it shows the list of access few tables permissions including given table.can i know why it is happens
View Answer
| Mar 5 2008 3:01 AM GMT
| asked by
Sqlhnd
sp_helprotect, T-SQL
SQL Server Connection
I'm having a problem with one of my workstation which cannot connect to SQL server instance, while the other workstation can connect. The server is running on Window Server 2003 while the other client are running on window xp proffessinal. the fanny thing is i can ping the server but the...
View Answer
| Feb 18 2008 8:33 AM GMT
| asked by
Gmmurage
T-SQL, Windows XP, Windows Server 2003
SQL Command
I have created a stored procedure in SQL2000 like this :SELECT p.PO_code,p.Po_date, p.Supp_code + ' : '+ s.Sname as Supp_Nme,p.po_total,r.RC_code,r.AmountFROM PO_list p inner join RC_list r on r.PO_code = p.PO_code inner join Supplier s on s.supp_code = p.supp_codeWHERE...
View Answer
| Jan 31 2008 3:09 AM GMT
| asked by
2830360
T-SQL, SQL Server 2000, Stored procedures
view and temp. table which one works better in T-SQL?
please tell me which one performs better view or temp table ?
View Answer
| Jan 5 2008 0:13 AM GMT
| asked by
HL
Oracle Views, T-SQL, Temp Tables
case when issue
I recently came across behavior of a "case when" conditional expression that really confuses me. In this case:--CASE when isnumeric('-10.00%') > 0 then convert(numeric, '-10.00%') end----the behavior is as I expected - the isnumeric() function returns 0 (cuz it ain't no number) so the "then" is...
View Answer
| Nov 17 2007 1:39 AM GMT
| asked by
Zhoover
Ms sqlserver, case when expression, T-SQL
Using Local Variable as FILENAME in CREATE DATABASE Statement
I am trying to use this statement in SQL Server 2000 :-CREATE DATABASE [Maintenance] ON (NAME = N'Maintenance', FILENAME = @TableName , SIZE = 2, FILEGROWTH = 10%) LOG ON (NAME = N'Maintenance_log', FILENAME = @LogFileName , SIZE = 1, FILEGROWTH = 10%) COLLATE Latin1_General_CI_ASGOThe...
View Answer
| May 22 2007 7:23 AM GMT
| asked by
TheHutt
SQL, T-SQL
Count Distinct Rows on Multiple Columns
I want to write a single query that counts each distinct Student ID from the following sample data.Sample Data:ID NAME PLAN DESCR--- ------- ---- -------------------101 Michael 010C Cafe- 10.00 Dollars102 Adam 010C Cafe- 10.00 Dollars102 Adam 05CC Cafe- 5.00 Dollars103 Jane 010C Cafe-...
View Answer
| Jan 5 2007 8:23 PM GMT
| asked by
mjackson
Database, Oracle, DB2
iSeries accessibility to VB.NET, ASP 2.0/3.0 ,NET programmers in Visual Studio
My shop does not have WebSphere but does have a sizeable VB.NET team using the MS Visual Studio. They need access to the iSeries files in DB2/UDB - real-time.We already thanks to me have a number of batch/DTS package type transfers.Do any of you know packages that can make the iSeries files...
View Answer
| Dec 27 2006 10:35 AM GMT
| asked by
JohndeCoville
DB2 universal database, PC/Windows Connectivity, DataManagement
Sending Table Data From Oracle 9i To Sql Server 2005 using oracle 9i Trigger
My aim is to send the data from oracle to sql server 2005 whenever there is data insertion, deletion or updation in the oracle table the same change needs to happen in the sql server having the same table structure as oracle.But I am not finding any way to accomplish this task.please help me. Have...
View Answer
| Nov 14 2006 5:01 AM GMT
| asked by
dhirendra10
HTML, JavaScript, JSP
Problem finding a column name.
The following SQL is giving me the message:Server: Msg 207, Level 16, State 3, Line 1Invalid column name 'ProductCode'.How can I correct this code. The column name does exist in the table. I also want to group by Product Code and not by Container Name.Thank you.SELECT a.ProductCode AS "Product...
View Answer
| Aug 15 2006 3:58 PM GMT
| asked by
captnskirk
SQL, T-SQL
SQL Server 2000 (Performance Trace)
Hi All,I have a job which is running since last 6 months.The job was taking around 2-3 hrs to be completed.However, for the last couple of weeks, its taking more than required time (Max-26 hours)and we have to kill the job for users to acces the database.I am not able to find any clue to it.I have...
View Answer
| Dec 8 2005 9:56 AM GMT
| asked by
bakash
Database, Oracle, DB2
Error tracing using triggers
I'm running an application, using a SQL Server 2000.At some point we've implemented an error, that seems to cause the wrong data to be deleted from a table. We've tried locating the error both by browsing through the potential code likely to contain then error, and by logging different kinds of...
View Answer
| Nov 28 2005 9:38 AM GMT
| asked by
LeChuck
SQL Server, SQL, T-SQL
MS Access to SQL Server Image
I have a Sql Server 2000 database. We don't have Web resources available, so I must write a User Interface in MS Access 2003. What I want to do is have the user supply a path and name for a document. Then I want to load the document into the Image field of the SQL Server DB. I have found some...
View Answer
| Nov 11 2005 10:45 AM GMT
| asked by
DonMonroe
T-SQL, VBA
SQL Server 2000/2005 - Creating Unique Constraints allowing multiple NULLs
Hi there!I'm having a problem maintaining data integrity on a database table in MS SQL-Server 2000. To ensure maintaining the integrity I need to implement a Unique Constraint on one of my coloumns. The problem however is, that this coloumn also has to allow multiple NULL-values - but for every...
View Answer
| Oct 13 2005 4:13 AM GMT
| asked by
LeChuck
Microsoft Windows, OS, Servers
tutorials-2
hi all.i have sent before a message about this subject but i didnt really had real replies that helped me.i am searching of tutorials of programming (delphi, linux, perl, python, c#, java ......)i have search in google, altavista, westciv, whatis, w3school,...So if anyone now how to get pdf files...
View Answer
| Sep 5 2005 3:06 AM GMT
| asked by
mmm555
Career development, Certifications, Training


