Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 965655
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T02:02:04+00:00 2026-05-16T02:02:04+00:00

Hi I need help with the syntax on this code: IF OBJECT_ID(‘TEMPDB..#LTS_MAP’) IS NOT

  • 0

Hi I need help with the syntax on this code:

IF OBJECT_ID('TEMPDB..#LTS_MAP') IS NOT NULL
BEGIN DROP TABLE #LTS_MAP END


SELECT
dtMicIssue as  LATE_CHARGE_FACTOR
,CASE   
WHEN (dtMicIssue is NOT NULL) AND (dtMicIssue  <> '1900-01-01 00:00:00') 
 THEN CONVERT(SMALLDATETIME,dtMicIssue)  
     ELSE NULL END 


INTO    #LTS_MAP
FROM    SBAURSQL001.LTSArchive.dbo.LoanMaster_0609

receiving error: Msg 8155, Level 16, State 1, Line 5
No column was specified for column 2 of ‘#LTS_MAP’.

Trying to combine case functionality with select of the dtMicIssue and messing up on the syntax…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T02:02:04+00:00Added an answer on May 16, 2026 at 2:02 am

    You need to alias the CASE Statement so that it has a column name:

    IF OBJECT_ID('TEMPDB..#LTS_MAP') IS NOT NULL
    BEGIN DROP TABLE #LTS_MAP END
    
    
    SELECT
    dtMicIssue as  LATE_CHARGE_FACTOR
    ,CASE   
    WHEN (dtMicIssue is NOT NULL) AND (dtMicIssue  <> '1900-01-01 00:00:00') 
     THEN CONVERT(SMALLDATETIME,dtMicIssue)  
         ELSE NULL END AS DATE
    
    
    INTO    #LTS_MAP
    FROM    SBAURSQL001.LTSArchive.dbo.LoanMaster_0609
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 492k
  • Answers 492k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer The question is a bit broad, meaning it's hard to… May 16, 2026 at 10:22 am
  • Editorial Team
    Editorial Team added an answer Sorry nobody has answered this for ages. If it's still… May 16, 2026 at 10:22 am
  • Editorial Team
    Editorial Team added an answer I have made two changes to your code. As you… May 16, 2026 at 10:22 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I need help re-factoring this legacy LINQ-SQL code which is generating around 100 update
Need help understanding what I am doing with the syntax here, please help! I
I really really need help. Been trying to get this on and off for
i need some help understanding how i can create a new custom event. i
Need help in figuring out a way to fetch a particular block of content
Friend's I need help on loading the content alone in my page without going
I have a regex issue that I need help with. Its trying to validate
I have been hitting a dead end with this program. I am trying to
this is a homework question. I am doing diffs on our domain model and
I'm struggling with a T-SQL procedure and I am hoping you can help. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.