Viewing 9 posts - 76 through 84 (of 84 total)
Hi,
Simplest example:
declare @db_name nvarchar(50);
set @db_name = db_name(); -- gets name of current db
execute('SELECT AuditMasterID, TableName FROM ' + @db_name + '.dbo.tblAuditMasterLog')
Cheers
November 22, 2010 at 12:26 pm
using REPLACE function to replace '_lid' with '&' in the substring should work too.
select
left(substring(QueryString, PATINDEX('%src=%',querystring)+ 4, len(queryString) ),PATINDEX('%&%',replace(substring(QueryString, PATINDEX('%src=%',querystring)+ 4, len(queryString) ),'_lid','&'))-1) myDesiredValue
from MyTable
November 22, 2010 at 9:44 am
Hi,
I think you should use a dedicated table for ProductLine. There may already be a natural key, that can be used as key, otherwise you could generate guid, as you...
November 22, 2010 at 8:24 am
Hi,
If you want to show rows as columns, you need to use PIVOT or CROSSTAB technique.
There are some good articles about this:
I...
November 22, 2010 at 6:23 am
Hi,
My first thought would be to use least value of PATINDEX('%&%' ,querystring) resp PATINDEX('%_lid%' ,querystring).
Please let me know if the above sound unclear.
Cheers
November 22, 2010 at 5:55 am
Although this is not a SQL Server table, still, this is a SQL Server forum ;-).
So here are some links to information about normalisation, right from the vendor:
November 22, 2010 at 4:04 am
Hi,
Maybe reading this article will comfort you:
http://msdn.microsoft.com/en-us/library/ms189087(SQL.90).aspx
"Similarly, unless the large value types out of row option is set to ON, varchar(max), nvarchar(max), varbinary(max), and xml columns are stored,...
March 17, 2009 at 12:58 pm
Hi, I don't understand your Problem #2 question, regarding Problem #1, I think you should remove RN.BEGIN_DATE from the select.
March 13, 2009 at 4:42 am
How about using the builtin newid() funcion like:
DECLARE @rand AS char(64)
SELECT @rand=replace(cast(newid() AS varchar(36))+cast(newid() AS varchar(36)),'-','')
SELECT @rand
March 12, 2009 at 5:00 am
Viewing 9 posts - 76 through 84 (of 84 total)