|
First
|
Prev |
Next
|
Last
Pages: 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118
join data from multiple tables with no keys In the database I am working out of there is one table (treatment_events) that collect the ids from other tables that are linked throught the application users use to enter the data. I cannot manually join these tables through using joins because they do not have related keys. The table that I can link them to that... 18 Jul 2008 15:29
Am I guaranteed that TRUNCATE TABLE always can be rolled back within a transaction? When TRUNCATE is used inside a transaction, if the transaction is rolled back the TRUNCATE is rolled back too. So TRUNCATE is safe within a transaction. I took a quick look at your code and it appears to be fine, but I did not test it. Roy Harvey Beacon Falls, CT On Fri, 18 Jul 2008 10:05:35 -0700 (PDT), ... 18 Jul 2008 14:26
Am I guaranteed that TRUNCATE TABLE always can be rolled back within a transaction? Is the statement below always true? I can use TRUNCATE TABLE as in the example below and I am guaranteed that if INSERT fails for some reason, table Result will be restored to its initial (before the transaction began) state? In other words, can I rely on the fact that the transaction scope prevents the pages... 18 Jul 2008 15:29
"Not Null Default" column behavior change in SQL 2K and SQL 2005 I happened to migrate my database from SQL 2K to SQL 2005. Pretty much everything went well when I simply did backup in SQL 2K and restored it into a pre-created database in SQL Server 2005. Here is the issue I am trying to address I had a table example Create TableA ( ColA Varchar(10), ColB datetime N... 30 Jul 2008 14:37
CAST question I have a column that has batch numbers, but it's a varchar column "WHERE batch between 1500 and 1625" I need to find out if that batch numbers are between 1500 and 1625, however I'm getting an error: The conversion of the varchar value '2393337112' overflowed an int column. Maximum integer value exceeded. H... 18 Jul 2008 13:24
Select returns no rows within TRY... END TRY I have this: BEGIN TRY SELECT @BankName = BankName, @BankRouting = BankRouting, @BankAccount = BankAccount, @BankAccountHolder = BankAccountHolder, @AccountType = AccountType FROM dbo.BankAccount WHERE ParentId = @ParentID AND (AccountActiveDate <= @RunDate) AND (AccountInactiveDate > @RunDate)) ... 18 Jul 2008 15:29
dynamic SQL and temp tables I'm doing that I thought would work but maybe not: trying to use dynamic SQL to create a temp table via SELECT / INTO. Here's a stripped-down version of my code: DECLARE @sql NVARCHAR(4000) SET @sql = 'SELECT * ' + 'INTO #mytemp ' + 'FROM any_other_table o ' + 'WHERE o.subm_no = 118731' EXEC sp_execut... 18 Jul 2008 13:24
a smart CASE statement Hi, I have the following three SELECT statements: ---------------------------------------------------------------------------------------------------------------------------------------- SELECT distinct c.ChargeId, a.AssetId, e.EnumLiteralName as AssetStatus, '1Cancelled' AS SiebelStage, 'N/A' AS SiebelRel... 21 Jul 2008 04:51
How do I handle a Transport Error I have a program that runs about 10 SQL statements (INSERT statements), each requiring about 2 hours. Sometimes I get a Transport Error and the program dies. I'm not sure how to handle this. In fact, I'm not sure what a transport error is, although I assume it has something to do with hardware. It always happen... 18 Jul 2008 12:22
applications with Shared SQL users .. minimizing risk We installed this new Application.. The vendor insisted we use a common (single) SQL users for the ODBC dsn system entry.. Is there any way to enforce that this user/password is only used with that ODBC entry and not a a sql client. Can we log in SQL server 2005 by IP.. Say a table is suddenly missing, how wil... 18 Jul 2008 12:22 |