|
First
|
Prev |
Next
|
Last
Pages: 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270
is N before text in SQL script really necessary? When I look at books on SQL, they usually put an 'N' before any text in a SQL script, but I find the script works perfectly well without it, e.g. SELECT N'test1 ' + N'test2 ' versus SELECT 'test1 ' + 'test2 ' Both SELECT statements above produce the same result. What's the purpose of the 'N'? Is it really ne... 9 Jul 2008 19:54
Convert Integer to char and result as a <blank> I am trying in vain to CAST or CONVERT an Integer column but I want to pass a <blank>, not the contents. So I have this... CASE WHEN ISNUMERIC(IntColumnName) = 1 THEN CAST(IntColumnName AS char(10)) But like I said, when I'm all said and done, I want the result set for this column to be a <blank>. ... 9 Jul 2008 19:54
select groups of numbers where num between 1 and 10, between 11 a I have a list of 17,000 numbers starting with min(value) = 10,000 and max(value) = 60,000. What I need to do is to group these numbers like group1 contains values between 10,000 and 11,000 group2 contains values between 11,0001 and 12,000 group3 contains values between 12,001 and 13,000 .... groupN contains ... 9 Jul 2008 18:53
limit on # of temp tables? I have a script that creates several (4+) temp tables. However, when I run the script, it acts like the first two exist but the latter ones do not. I use the code SELECT TABLE_NAME FROM tempdb.INFORMATION_SCHEMA.TABLES WHERE [TABLE_NAME] LIKE '%#%' to show which temp tables are present, and it lists only the ... 11 Jul 2008 02:46
How look at content of stored proc? I've just started working with SQL Server. How do I look at the text of a stored procedure? I don't see any obvious way to do it. Thanks. ... 9 Jul 2008 17:51
CTE on multiple tables? Hi Tom Thanks for the reply, been away for a while so only now I have time to work this over again. I still can't get this wrapped, I have now tried to simplify the SQL and the basic data. The "TeamTeams" table contains this: ParentTeamID TeamID ----------------------------------- NULL 64 NULL 72 72... 14 Jul 2008 04:27
Get column types for SP result temp table in MSSQL 2005 Hi, I want to store the results of restore filelistonly in a temp table by using the following command. INSERT INTO #RestoreFileListOnly exec( 'restore filelistonly from disk = ''C:\Backups \testdatabase.bak''') I found this table definition on the internet: CREATE TABLE #RestoreFileListOnly ( LogicalNam... 10 Jul 2008 15:30
How to encrypt/decrypt a table column? We have SSN and bank account information in a table and are required to encrypt the data. How can this be done? We prefer to encrypt just the columns we need rather than the entire table. Thanks. ... 9 Jul 2008 16:49
T-SQL error checking After I do a DROP TABLE or CREATE TABLE, how do I check if the command executed successfully, is there some error variable I can check? thanks. ... 9 Jul 2008 13:43
How big will my backup be? Is there any way to approximately work out how big your backup will be, before you run BACKUP DATABASE? Obviously you can get database_size and unallocated_space from sp_spaceused, but is there then a way to workout backup size? For a simple example, assume simple recovery model, small transaction log. tha... 9 Jul 2008 19:54 |