Archived Months
January 2003
March 2003
April 2003
May 2003
June 2003
July 2003
August 2003
September 2003
October 2003
November 2003
December 2003
January 2004
February 2004
March 2004
April 2004
May 2004
June 2004
July 2004
August 2004
September 2004
October 2004
November 2004
December 2004
January 2005
February 2005
March 2005
April 2005
May 2005
June 2005
July 2005
August 2005
September 2005
October 2005
November 2005
December 2005
January 2006
February 2006
March 2006
April 2006
May 2006
June 2006
July 2006
August 2006
September 2006
October 2006
November 2006
December 2006
January 2007
February 2007
March 2007
April 2007
May 2007
June 2007
July 2007
August 2007
September 2007
October 2007
November 2007
April 2008
all groups > sql server programming > october 2007 > threads for tuesday october 23

Filter by Day: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31

saving spanish characters in sql
Posted by Vinki at 10/23/2007 10:23:00 PM
Hello Everyone, Is it possible to save the spanish characters in sql database? Thanks. ...more >>


Linked Server Insertion
Posted by SKUMARI at 10/23/2007 8:43:43 PM
I have a server A and server B and had a linked server LS from A to B. I need to insert data into a table t1 that is located in server B.Table t1 has identity columns. So I am doing the following code DECLARE @SQL NVARCHAR(500) SET @SQL=N'set identity_insert t1 on' exec [LS].B.d...more >>

UPDATE basee on ROW ID
Posted by BLAW at 10/23/2007 7:52:37 PM
I have a lenthy select statement that produces one value. I neeed to take that one value and update a table where ROW ID = 1. How can I do this? ...more >>

Freetext Help
Posted by Dooza at 10/23/2007 5:13:08 PM
Can anyone help me work out what is wrong with this: SELECT dbo.tblManufacturer.web_manufacturer, dbo.tblProducts.itm_item, dbo.tblProducts.itm_desc, dbo.tblProducts.itm_wdesc, dbo.tblProducts.itm_wnotes, dbo.tblProducts.itm_price, dbo.tblProducts.itm_wpicture, d...more >>

stuck with join
Posted by .nLL at 10/23/2007 4:32:28 PM
Hi, i have quiz site and results of quizes stored in below table ----------------------------------------------------------------------------- TABLE [dbo].[sites_quizzes_results]( [quizid] [int] NOT NULL, [siteid] [nvarchar](50) COLLATE Turkish_CI_AS NOT NULL, [un] [nvarchar](50) CO...more >>

How to create a CLR DLL for Sql Server 2005? Is it just any .net class library that you can load into Sql Server 2005 or is there some special project
Posted by DR at 10/23/2007 1:55:34 PM
How to create a CLR DLL for Sql Server 2005? Is it just any .net class library that you can load into Sql Server 2005 or is there some special project type that I need to start with? ...more >>

sql express management studio security
Posted by rodchar at 10/23/2007 1:05:02 PM
hey all, i guess on sql express management studio i can't grant execute permissions to a user simply by right-clicking the stored proc. so can someone please how would i resolve this? thanks, rodchar...more >>

slow view
Posted by Andre Gibson at 10/23/2007 12:50:00 PM
hi all I am using sql server 2000, and I created a view that joins about 5 tables for a report. However the view takes a really long time to return with results. How can I increase its performance. regards...more >>



xp_smtp_sendmail - opinions?
Posted by MSUTech at 10/23/2007 12:01:01 PM
Hello All, We have been using xp_smtp_sendmail for quite a few years. But, we are wondering what we should do 'going forward'. Our main EMAIL SERVER SERVICE requires SMTP AUTHENTICATION, and we can not do that with xp_smtp_sendmail. So, we setup a 'local' email server and do NOT requir...more >>

update query challenge
Posted by JFB at 10/23/2007 11:34:45 AM
ID 1 plan value tag 510 10 0 2 510 35 0 3 510 23 0 4 520 13 0 5 520 15 0 6 530 23 0 7 530 12 0 8 510 10 0 9 520 10 0 10 510 13 0 Hi All, I have the data like my sample. I would like to mark the...more >>

Exception while tracing SQLDependency, ASP.NET not invaliding cach
Posted by Ira Grollman at 10/23/2007 11:24:02 AM
I am not seeing the cache get invalidated; do I need to write a handler for the invalidate event? I though it was "auto-wired"... I run the application, then use SQL Server Managment Studio to change a row in the cached table. That should invalidate the cached copy? In the trace, two exece...more >>

Retrieving TSQL from inside a DML
Posted by Tim Greenwood at 10/23/2007 11:05:55 AM
Is it possible to retrieve the text of the TSQL command that caused a trigger? I've been asked to log this with our audit data for tracking..... I'm not seeing anyway to do it. Thanks in advance!! ...more >>

Best way to populate interdependent tables (disable triggers or...
Posted by Tim at 10/23/2007 10:38:02 AM
Hi, What is the best way to go about loading data into tables A and B if each has a trigger on it that checks for corresponding values in the other (an obvious paradox)? Must I disable the triggers or is there a better way to solve the problem? Perhaps my use of triggers in the first pl...more >>

Sum function base on a date
Posted by ITDUDE27 at 10/23/2007 9:53:01 AM
hi. I need some help with this query. I want to extract the sum of payment amounts from an invoice table base on the last dates payments were applied. Sample Table XYZ: Invoice# Date Amt 1234 10/15 200 1234 10/5 1200 1234 10/20 600 1234 10/20 400 Th...more >>

Odd Cursor behavior
Posted by E L at 10/23/2007 8:33:13 AM
I am getting a strange behavior using a cursor with an EXEC statement in a loop. the EXEC loop is repeating often and I am not sure why Here's what I have. Assume all variables declared no syntax problems: DECLARE @I_TableName varchar(25) DECLARE Insert_Cursor CURSOR FAST_FORWARD READ_ONLY F...more >>

Why dependency is missing
Posted by huohaodian NO[at]SPAM gmail.com at 10/23/2007 8:26:51 AM
Hi, I am getting error says "Cannot add rows to sys.sql_dependencies for the stored procedure because it depends on the missing table 'mystatus', the 'mystatus' is a stored procedure not a table which I created already, in my second stored procedure I have some like exec mystatus, @temp ...more >>

populate varchar field with values from other fields
Posted by Rich Bashaw at 10/23/2007 7:51:00 AM
Is it possible to compute a string value for a field in SQL? For example, I want to take a last name field and a first name field and create a Full name field. Is this possible and if so, can someone provide a breif code example? I know a field can be a "computed field", but those seem to be f...more >>

Create relationships
Posted by Sam at 10/23/2007 7:31:02 AM
Hi, I've always created my relationships between tables visually using database diagrams. The problem is that this is getting a little too slow for me as the number of tables grows, the diagrams is getting larger too. Is there any other way to create relationships other than using diagrams...more >>

dbo after table name
Posted by Jose at 10/23/2007 3:44:00 AM
Why I see table name and in brackets I see (dbo) How can I remove dbo? I would like to see only tables names. Thanks...more >>

How to build the query to achieve the result set as below?
Posted by pedestrian via SQLMonster.com at 10/23/2007 3:43:21 AM
Suppose I have two table, namely, "parent" and "child". parent table contains: EmpID DateA ===== ===== A01* 20/10* A07 19/10 A05 20/10 A02* 21/10* child table contains: EmpID DateTimeA ===== ========= A01* 20/10* 08:00 A07 21/10 09:00 A01* 20/10* 15:00 A01* 20/10* 20:00 A05 15/...more >>

Client computer name
Posted by Jose at 10/23/2007 3:40:01 AM
How can do I create a function or sp to get a client computer name? How can do I create a function or sp to get a windows login name? Thanks jcp ...more >>

Locate the database files on remote SQL Server 2005 programmatical
Posted by George Bakogiannis at 10/23/2007 2:11:01 AM
We want to locate the database folders/files (where the databases are stored) like SQL Server Management Studio UI does, when you click on Attach database -> Add. The question is how to retrieve (enumerate) these folders/files programmatically (VS2005, C#, SMO?). Practically we want to ...more >>

Dynamic SQL
Posted by Jaco at 10/23/2007 1:51:03 AM
Hi, I am looking at building a column list from selected tables with dynamic SQL. ie. declare @clist varchar (8000) set @clist = '' select @clist = @clist + ',' + char(10) + 'inserted.' + column_name from information_schema.columns where table_name = 'tblname' is the a way to ...more >>

Then Update
Posted by Ross Culver at 10/23/2007 12:00:00 AM
Is it not possible to use a 'select case' statement in SQL transact to = perform an action rather than a series of 'If, Begin, End' statements, = as you might do in VB? Example: declare @POLogID bigint, @AlertID int, @Value bit set @POLogID =3D 1 set @AlertID =3D 2 set @Value =3D 1 DECLARE...more >>

Concatenation Help
Posted by Dooza at 10/23/2007 12:00:00 AM
Hi there, I currently use this in a select statement: dbo.tblManufacturer.web_manufacturer + ' ' + dbo.tblSubCat2.SubCat2Name + ' ' + dbo.tblSubCat1.SubCat1Name AS [Product Name] The only problem is that when SubCat2Name is NULL nothing gets set, as you can not add NULL without getting NU...more >>

Next & previous records
Posted by simon at 10/23/2007 12:00:00 AM
I have a requirement to present details of an event and the subsequent and previous events. An example, salesman visit towns. There is lots of salesman and they visit lots of towns. The request is to show for a town, say Town D, which town the salesman visited prior to TownD and the town he vi...more >>

System Views
Posted by khaled at 10/23/2007 12:00:00 AM
hello please i need your help . how to got the tables of the system views. i want to know the views [database_role_members , database_principals] getting data from which tables. Thanks. Regards, Khaled ...more >>

bcp - Unable to open BCP host data-file
Posted by Yan at 10/23/2007 12:00:00 AM
Hi, SQL Server 2000 sp4 I receive the below error - any help would be appreciated! Command executed: C:\>bcp tempdb.dbo.RiskReversals10 in -n -i \\Sqlfx-uk\E$\ReplData\unc\SQLFX-UK_FX_FX\2007 1023065849\RiskReversals10_189.bcp -T Error: Error = [Microsoft][ODBC SQL Server Dr...more >>

one-cell table holding a base date
Posted by SOC at 10/23/2007 12:00:00 AM
Hello, I need to reduce a view to the latest 6 months. I want an indexed view so I cannot use getdate(). Is there a way to use a one-cell table holding a base date? I have tried but get this error: Server: Msg 107, Level 16, State 3, Procedure view_6m, Line 3 The column prefix 'dbo.tbl_setti...more >>

Get first day of month
Posted by Joe Kovac at 10/23/2007 12:00:00 AM
Hi! I have a date 'from_planned', which might be for example: '2007.02.13 14:33:10'. Now I want to get only the day and month part out of it, which is not so difficult: MONTH(from_planned) YEAR(from_planned) Now I want to get a date that would look like this: '2007.02.01 [00:00]' H...more >>


DevelopmentNow Blog