| Thread | Last Post | Replies |
|
| Create a temp var for a select statement? | 18 Jul 2008 01:30 GMT | 2 |
I'm doing repetative calculations in my select statement below: select client, path, str(kb/1024.0/1024.0,10,2) as 'GB', str(elapsed/3600.0,10,2) as 'Hours',
|
| Update with Case Statement | 18 Jul 2008 01:06 GMT | 12 |
I am writing a stored proc for generating a report and it has below SQLs. I am attempting to update the Premium and remittance basing on the source id. But its not giving me the desired result. I am trying to update 34 columns basing on the source id.
|
| Timeout expired | 17 Jul 2008 23:24 GMT | 5 |
I am getting this error "Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding." And this error pops up in 30 seconds. Now the Sertver timeout is set to 600 seconds or 10 minuted yet this is timing out in 30 seconds. ...
|
| Connection Status | 17 Jul 2008 21:46 GMT | 1 |
I have a table with the following information/columns: ServerName UserName PWord
|
| Schema comparison of two databases | 17 Jul 2008 21:42 GMT | 5 |
Visual Studio database edition's schema comparison tool does a good job of identifying all differences between two databases. How do I go about doing this schema comparison directly in SQL server 2005 or 2008 and without the Visual Studio database edition?
|
| Secure a stored procedure and/or view | 17 Jul 2008 21:36 GMT | 3 |
Is there a way to create both stored procedures and/or views that are not editable? I.E. - a user cannot alter or see the code inside the procedure itself?
|
| Function to compare two version strings | 17 Jul 2008 19:57 GMT | 2 |
Is there an SQL function that compares version strings? I know it can be done with CLR function using .NET System.Version class Thanks, Avi
|
| Duplicate columns across 4 columns | 17 Jul 2008 19:09 GMT | 4 |
We have a table called Clients that allows up to 4 telephone numbers to be entered. I am trying to write a query that will identify if another client has the same telephone number. I need to look in any of the 4 fields. E.g. If Client 1 has a tel no of 555555555 in TelNo1ID ...
|
| Handling null dates ? | 17 Jul 2008 18:32 GMT | 6 |
My tables have date ranges where the 'to' date can be open. I was advised not to use nulls in date/time columns. How is this normally done? I was told to put something like '12/31/2999' in there and test for that instead of null but this seems strange to me.
|
| sproc question | 17 Jul 2008 18:30 GMT | 2 |
In a sproc I need to issue a select, it returns five columns and always only one row. I need to pass those five values back to the calling proc in output parameters. Any of the five values could be Null. How do I do this? My 1360 page book (Wrox) does not show me. All the ...
|
| Capturing SQL Version | 17 Jul 2008 18:06 GMT | 5 |
Is there a way to capture the current SQL version into a variable? I want to use this to build a conditional in a stored procedure. Do it this way if your on 8.0 or this way if your on 9.0. - Mark
|
| CTE Query | 17 Jul 2008 17:52 GMT | 3 |
I am trying to write a simple CTE query in SQL server 2005 as below: WITH TPAIPCTE(PIN, PINCount) AS (
|
| Find nvarchar with special chars | 17 Jul 2008 17:20 GMT | 2 |
SQL 2000. I want to find all records in a table that have special characters (e.g. %, &, @, etc.) in the RateCode column, basically anything other than a number or a letter (both upper and lower case ok). My SELECT stmt would be like
|
| Finding columns in tables with specific default constraints | 17 Jul 2008 16:39 GMT | 4 |
How can I display some specific defaults on some tables? For example some tables may have a default on a CreatingUser_ID column that default the value to suser_sid(). How could I display: 1. table name
|
| Insert query problem | 17 Jul 2008 16:20 GMT | 2 |
The following is the problem query. MetricValue nvarchar(50) Valid values for TargetValue can be NULL, '', or some other string. INSERT INTO @M (ParameterID, EntityID, TargetValue)
|