| Thread | Last Post | Replies |
|
| Update a table with data from another table. | 03 Jul 2008 16:51 GMT | 2 |
I want to update a table with data from another table. Lets say this is how i do it. Update REGD0230 tIN set tIN.Field1 = (Select tOT.Field1 from REGD0200 tOT where
|
| How to Create a Parameterised GROUP BY Without Using Dynamic-SQL | 03 Jul 2008 15:37 GMT | 18 |
I have read Erland's treatise on dynamic-SQL, and now I want to avoid it like the plague. But one of the areas that still seems problematic is the GROUP BY clause. Depending on the parameters passed into my sproc, I want to group on
|
| Dynamic SQL , Discussion about Erland’s Article | 03 Jul 2008 15:27 GMT | 9 |
http://www.sommarskog.se/dynamic_sql.html I’ve read Erland’s new article about Dynamic SQL , The Curse and Blessings of Dynamic SQL , I have to say , I disagree ! The solution he offers thru sp_executesql is very complicated in many
|
| Listing tables in a database | 03 Jul 2008 13:36 GMT | 5 |
I'm using the following procedure to list all tables in a selected database. Select Table_name as "Table name" From Information_schema.Tables Where Table_type = 'BASE TABLE' and Objectproperty (Object_id(Table_name),
|
| CREATE TABLE from other | 03 Jul 2008 11:58 GMT | 4 |
I am testing the following command : CREATE TABLE AS (SELECT * FROM Table WHERE 1=2) to create a new table from existing one and no registers, but sends me an error "near AS"...
|
| Comparing execution plans - is there any kind of DIFF for this task? | 03 Jul 2008 09:47 GMT | 3 |
Let's say I have two SQL queries (SELECT statements) and I need to compare their execution plans. Can anybody recommend any tool or technique that would work better than doing visual comparison in Management Studio?
|
| Outer Join newbe question | 03 Jul 2008 09:21 GMT | 5 |
Pretty new to this so I would be very glad if any of you could point me in the right direction. I have three tables (see below) and I'm trying to get this result: DepID DepName FirstName LastName
|
| CREATE TABLE from other (correction) | 03 Jul 2008 08:55 GMT | 1 |
I am testing the following command : CREATE TABLE NewTable AS (SELECT * FROM Table WHERE 1=2) to create a new table from existing one and no registers, but sends me an error "near AS"...
|
| Wrapping tables by views | 03 Jul 2008 08:41 GMT | 1 |
I'm working on a legacy small-enterprise system that has a single database hosted by SQL Server 2005 and a bunch of client applications. The main client (used by all users) is an interactive MS Access 2003 application (ADP), and other clients include various VB/VBA
|
| Compare Data In Two Tables | 03 Jul 2008 03:14 GMT | 2 |
I have two tables in two different databases. One has Production data the other has production data + Archive data. to determine which is the archive data so I want to select only the archive data from the database. Both tables have a composite key. How to I select only the ...
|
| can dynamic SQL be stored in tables? | 03 Jul 2008 00:11 GMT | 9 |
I would like to store multiple dynamic SQL in some meta table and use a cursor to read selected dynamic sql and execute to increase flexibility. Is this even possible? See code example below:... declare @csql nvarchar(4000)
|
| Inner Dynamic SQL Single Quotes Issue | 03 Jul 2008 00:06 GMT | 6 |
Trying to get single quotes are + lvc_Column + in inner Dynamic SQL Loop below. If I add '' to either side, when I execute, I get Wednesday_02 = case when right(' + @lvc_Column + ', 2) = c.Today then c.Course
|
| run a job under job agent | 02 Jul 2008 22:03 GMT | 1 |
I need to run a job under a specific ID and password so it can read a file on a shared drive. When I change the owner to this ID the job still fails, how can I use a specific ID and password that has access to this shared drive on the network?
|
| Rename an XML index? | 02 Jul 2008 20:46 GMT | 4 |
Is it possible to rename an XML primary or secondary index? Calling the sp_rename proc gives me the message: "Either the parameter @objname is ambiguous or the claimed @objtype (Object) is wrong."
|
| Comments question | 02 Jul 2008 20:29 GMT | 6 |
I have a table OrderComments with OrderId(PK),OrderComments OrderId OrderComments 1 comment2 1 comment3
|