Viewing 15 posts - 11,986 through 12,000 (of 13,460 total)
i've pasted a script below that shows how to get the listening port by reading the registry, and as the previous poster said, you could write to that spot as...
Lowell
October 15, 2008 at 11:04 am
something like htis might help:
it detects the compatibility level...
IF EXISTS(SELECT cmptlevel from master.dbo.sysdatabases WHERE master.dbo.sysdatabases.name =db_name() AND cmptlevel...
Lowell
October 14, 2008 at 10:09 am
a backup created on 2008 can only be restored on a 2008 instance; theactual format of the file is different due to the new features.
this is true of all backups...while...
Lowell
October 12, 2008 at 7:38 am
compatibility level sets what set of syntax rules will be used for commands agains the database; it does not change "how" the data is stored or backed up. think about...
Lowell
October 11, 2008 at 4:40 pm
abstract examples are harder to help wiht, but here's an example:
--does this return data?
SELECT
OtherDatabaseT2.RowID,
OtherDatabaseT2.StaffID,
OtherDatabaseT3.SSo_RowID,
OtherDatabaseT3.LogonStaffNo
FROM Otherdatabase.dbo.[Table 2] OtherDatabaseT2
INNER JOIN Otherdatabase.dbo.[Table 3] OtherDatabaseT3
...
Lowell
October 10, 2008 at 11:13 am
i've got this saved in my snippets of code; i added the bolded where statement to ignore clustered indexes:
[font="Courier New"]
SELECT TOP 100
REPLICATE(' ',4000) AS COLNAMES ,
OBJECT_NAME(I.ID) AS TABLENAME,
I.ID AS TABLEID,
I.INDID...
Lowell
October 10, 2008 at 9:04 am
looks like a simple IN() stamtent would do the job...you want the entire order if one of the porducts is 'Bike':
Select
oph.order_no,
opd.order_line_no,
opd.product,...
Lowell
October 10, 2008 at 6:27 am
why not convert them to ints, then cast then as varchars together?
CREATE TABLE T1(col1 varchar(30),col2 varchar(30) )
insert into T1
SELECT '1','09' UNION
SELECT '02','01' UNION
SELECT '01','1 '
SELECT
convert(varchar,convert(int,col1))...
Lowell
October 9, 2008 at 9:59 am
I think you'd have to do this with a quick and dirty .net applacation, since it's obvious you can't on the server side:
i would think that you'd have to recursively...
Lowell
October 9, 2008 at 7:05 am
try changing just the offending columns with CAST or CONVERT, and not the whole formula:
CAST(beschikbaar * 60 AS float)
changes to
CAST(beschikbaarAS float) * 60
I think that will solve your...
Lowell
October 9, 2008 at 5:16 am
edited after poutting foot in mouth:
i had thought just like you that the stored procedure sp_changeobjectowner should do what you want;
but the article you mentioned states if it's in...
Lowell
October 8, 2008 at 11:00 am
yeah...still two statements, you really didn't give enough info to help, but here's a lame example:
--only matches will get updated, right?
UPDATE TABLEA
SET PROCESSFLAG='Y' WHERE PROCESSFLAG='N'
FROM TABLEB
...
Lowell
October 8, 2008 at 10:50 am
it's kind of easy...you use a SUM() of CASE statement to logicilly decide whether you want to add the values or zero:
select * from #Conditional
select sum(CASE WHEN VALUE BETWEEN...
Lowell
October 8, 2008 at 10:34 am
no, it'll be two separate statements....but that's not a bad thing.
can you give more details what you are trying to do?
this is a very common situation, where you update existing...
Lowell
October 8, 2008 at 10:28 am
ouch...without dynamic sql, and still trying to do it in SQL and not a programming language, I don't know how you'd be able to do it.
the headache is the max()...
Lowell
October 8, 2008 at 10:22 am
Viewing 15 posts - 11,986 through 12,000 (of 13,460 total)