Viewing 15 posts - 1,126 through 1,140 (of 1,473 total)
paul.starr (11/12/2008)
how do i find the base defined types for my Customers table?
User Defined Data types are so much fun! I have over 1500 of them in my database.:crying:
You...
November 13, 2008 at 7:37 am
Something like this?
SELECT T.Table_Type, T.Table_Name, C.Column_Name
FROM INFORMATION_SCHEMA.TABLES T
INNER join INFORMATION_SCHEMA.COLUMNS C ON T.Table_Name = C.Table_Name
November 12, 2008 at 12:24 pm
I tackled it a bit differently. Example of the running totals[/url] theory applied below. The downside to this method is that you will get rows set to true...
November 12, 2008 at 11:56 am
Steve T (11/11/2008)
Garadin (11/11/2008)
SQL DBA 808 (11/11/2008)
Garadin: I will read that and see...
November 11, 2008 at 8:27 pm
I'm done.
Seconded.
November 11, 2008 at 8:21 pm
SQL DBA 808 (11/11/2008)
Garadin: I will read that and see if I can...
November 11, 2008 at 1:21 pm
What happened to varchar 100! 😀
How about something like this:
[font="Courier New"]SELECT T1.ID,
COALESCE(T2.Name, T3.Name, T4.Name) [Name],
COALESCE(T2.Language, T3.Language, T4.Language) [Language],
(SELECT [Description] FROM #Table1 WHERE ID = T1.ID...
November 11, 2008 at 12:21 pm
SQL DBA 808 (11/11/2008)
The Header record can and will appear many times in the course of...
November 11, 2008 at 12:01 pm
A Case Statement should do the trick:
insert into dbo.Customers (CustomerID, Name, ShortName, ReferenceNo, EffectiveDate, Status, CreateDate)
select A.Account_number, A.Customer_name, A.Known_As, A.Legacy_Account_Number, A.Account_Established_Date, CASE WHEN A.Customer_Status = 'I' THEN...
November 11, 2008 at 11:25 am
Guess this wasn't that urgent after all eh? :hehe:
In any case, you were close. (Next time, explain how you tried to modify it and say that your modifications didn't...
November 11, 2008 at 10:37 am
Paul,
This is becoming the Oracle post all over again. You supply very little data about your issue, and when we try to guess with your half supplied information, you...
November 11, 2008 at 9:08 am
If you are using sequential ID values, you could take the easy way out and use an outer self join on id = id-1. That said, if there are...
November 11, 2008 at 6:54 am
Jack Corbett (11/10/2008)
Similar to what Seth has already said and based on your existing procedure:
This would be that aforementioned "more elegant way". :hehe:
November 10, 2008 at 2:02 pm
Shouldn't be necessary, and probably isn't efficient. I don't see the need for a cursor here.
November 10, 2008 at 1:56 pm
Basic concept:
IF EXISTS(Select * From SomeTable Where Condition = True) -- Test the existence of your data
UPDATE SomeTable
...
ELSE
INSERT INTO Sometable...
That works for one row. If you're wanting to...
November 10, 2008 at 1:47 pm
Viewing 15 posts - 1,126 through 1,140 (of 1,473 total)