April 2, 2009 at 1:57 pm
Hello Florian Reischl
Thank you so much for your efforts to show me how to post my question, so I can get better help.
I am new to SQL, so please help me
Again, Thank you so much
April 2, 2009 at 2:01 pm
josephptran2002(4/2/2009)
would you please tell me how to create a table with the sample data in table?
He already has.
Florian Reischl (4/2/2009)
Better way for this:
CREATE TABLE #BO
(
BODDS VARCHAR(10),
BOCLEARED INT,
BOCLEAREDDATE DATETIME
)
INSERT INTO #BO
SELECT 'BO', 3, '1/1/2009'
UNION SELECT 'BO', 1, '1/2/2009'
UNION SELECT 'BO', 5, '1/3/2009'
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 2, 2009 at 2:28 pm
Hello there,
Would you please tell me why I could not create a table with sample data in the table?
Thank you
Joseph
April 2, 2009 at 2:32 pm
Would you please tell me why I could not create a table with sample data in the table?
I don't really understand you. Open your Management Studio, type a valid CREATE TABLE statement, add some lines to add for sample data and post it. (enclosed with [ code ] and [ /code ])
Greets
Flo
April 2, 2009 at 2:37 pm
Hello there,
Before I type the codes in there, do i have to click on any IFCode shortcuts?
Thank you
April 2, 2009 at 2:46 pm
Create Table #WeeklyActualClearedCasewithNoReturns
(
SSN INT, DDS Varchar(3), DECLEAREDDATE Datetime, SOMATICMCCLEAREDDATE Datetime,PSYCMCCLEAREDDATE DATETIME, DESECONDCLEAREDDATE DATETIME,SOMATICMCSECONDCLEAREDDATE DATETIME, PSYCMCSECONDCLEAREDDATE DATETIME
)
INSERT INTO #WeeklyActualClearedCasewithNoReturns
Select '000112222', 'CT', '1/1/2009', ' ', ' ', ' ', ' ', ' ' Union Select '111335555', 'ME', ' ', ' ', '1/4/2009', ' ', ' ', ' ' Union Select '666223333', 'CT', ' ', '1/6/2009', ' ', ' ', ' ', ' ' Union Select '999228888', 'RI', ' ', ' ', '1/11/2009', ' ', ' ', ' '
April 2, 2009 at 2:54 pm
???
Either type:
[ code ]
HERE ENTER YOUR SQL
[ /code ]
(both code tags without the spaces)
or click the "[ code ][ /code]" link, set the cursor into the middle of the ][ and copy your SQL into.
If you are not sure if you did right use the "Preview" button.
Greets
Flo
April 3, 2009 at 8:43 am
FWIW:
(Sorry - couldn't work out how to format it nicely...)
[font="System"]
SELECT REPLACE(RTRIM(ISNULL(BODDS+' ','')+ISNULL(CTDDS+' ','')+ISNULL(NHDDS,'')),' ',',') AS DDS
,ISNULL(BOCLEARED,0)+ISNULL(CTCLEARED,0)+ISNULL(NHCLEARED,0) AS TotalCleared
,COALESCE(BOCLEAREDDATE,CTCLEAREDDATE,NHCLEAREDDATE) AS ClearedDate FROM BO
FULL OUTER JOIN CT ON BOCLEAREDDATE=CTCLEAREDDATE
FULL OUTER JOIN NH ON BOCLEAREDDATE=NHCLEAREDDATE OR CTCLEAREDDATE=NHCLEAREDDATE
ORDER BY 3
[/font]
April 3, 2009 at 8:48 am
Hello Schnurdle
How are you doing? Thank you so much for your efforts to help me out and I already solved this issue. Again, thank you so so much
Very Respectful
Joseph Tran
April 3, 2009 at 8:51 am
Hello Florian Reischl,
How are you doing? Thank you so much for your helps, I wish there are more people like you to help new developer at their beginning stage of how to program SQL. May god bless you and help other new developer out there. Some people in here, they are here to show off and intimidate new developer. Not try to help them out and misguide others to different issues.
Very Respectful
Joseph
April 3, 2009 at 8:56 am
josephptran2002 (4/3/2009)
Some people in here, they are here to show off and intimidate new developer. Not try to help them out and misguide others to different issues.
Want to name those people you feel are showing off?
We're trying to help you. If someone suggest a different option, it's because they think it may be a better way than what you're currently doing. None of the regular posters post to show off their skills
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 3, 2009 at 8:59 am
Hello Gila,
How are you bro? I am not talking about you, because you tried many different ways to help me. So, there are no words than saying "Thank you so much".
You are very kind expert to show new developer to a right path in order to solve my issue.
Again, Thank you
Joseph Tran
Viewing 12 posts - 16 through 26 (of 26 total)
You must be logged in to reply to this topic. Login to reply