Click here to Skip to main content
15,745,432 members
Home / Discussions / Database
   

Database

 
AnswerRe: career Sql developer Pin
rana ray3-May-12 1:14
rana ray3-May-12 1:14 
QuestionStore procedure Pin
D.M. Abdur Rahim29-Apr-12 17:25
D.M. Abdur Rahim29-Apr-12 17:25 
AnswerRe: Store procedure Pin
Mycroft Holmes29-Apr-12 17:56
professionalMycroft Holmes29-Apr-12 17:56 
AnswerRe: Store procedure Pin
Richard MacCutchan29-Apr-12 23:12
mveRichard MacCutchan29-Apr-12 23:12 
AnswerRe: Store procedure Pin
Corporal Agarn1-May-12 3:04
professionalCorporal Agarn1-May-12 3:04 
GeneralRe: Store procedure Pin
D.M. Abdur Rahim9-Jul-12 0:01
D.M. Abdur Rahim9-Jul-12 0:01 
QuestionNesting Limit Pin
Andy_L_J28-Apr-12 21:36
Andy_L_J28-Apr-12 21:36 
AnswerRe: Nesting Limit Pin
Mycroft Holmes28-Apr-12 23:21
professionalMycroft Holmes28-Apr-12 23:21 
I suspect there are more than 1 record matching your @code filter and you are trying to stuff more than 1 record into @Temp.

Nope - thats not it, you have top 1. It works for me on sql server 2008 R2. I used this

DECLARE
	@Code VARCHAR(3)
	
SET @Code = '103'	


DECLARE @TEMP VARCHAR(7) = 
    (SELECT TOP 1 filename
        FROM dbo.ImportFiles
        WHERE LEFT(filename, 3) = @Code)

SELECT @Temp


Which gives me the first 7 characters of the filename (all the file names start with 103). Changing @Code returns null
Never underestimate the power of human stupidity
RAH

GeneralRe: Nesting Limit Pin
Andy_L_J28-Apr-12 23:45
Andy_L_J28-Apr-12 23:45 
GeneralRe: Nesting Limit Pin
Mycroft Holmes29-Apr-12 2:39
professionalMycroft Holmes29-Apr-12 2:39 
QuestionRunning Balance Pin
paulaziz26-Apr-12 15:01
paulaziz26-Apr-12 15:01 
AnswerRe: Running Balance Pin
Mycroft Holmes26-Apr-12 19:01
professionalMycroft Holmes26-Apr-12 19:01 
AnswerRe: Running Balance Pin
Blue_Boy26-Apr-12 21:44
Blue_Boy26-Apr-12 21:44 
QuestionConnect to Oracle database from Log4net.config file Pin
forum.forum26-Apr-12 0:26
forum.forum26-Apr-12 0:26 
AnswerRe: Connect to Oracle database from Log4net.config file Pin
Eddy Vluggen27-Apr-12 8:08
professionalEddy Vluggen27-Apr-12 8:08 
QuestionYour thoughts on Database Model - KPI System Pin
DaveAuld25-Apr-12 5:50
professionalDaveAuld25-Apr-12 5:50 
AnswerRe: Your thoughts on Database Model - KPI System Pin
Eddy Vluggen25-Apr-12 7:09
professionalEddy Vluggen25-Apr-12 7:09 
GeneralRe: Your thoughts on Database Model - KPI System Pin
DaveAuld6-May-12 1:38
professionalDaveAuld6-May-12 1:38 
AnswerRe: Your thoughts on Database Model - KPI System Pin
jschell25-Apr-12 8:16
jschell25-Apr-12 8:16 
GeneralRe: Your thoughts on Database Model - KPI System Pin
Jörgen Andersson26-Apr-12 1:38
professionalJörgen Andersson26-Apr-12 1:38 
GeneralRe: Your thoughts on Database Model - KPI System Pin
DaveAuld6-May-12 1:46
professionalDaveAuld6-May-12 1:46 
QuestionHow to create SQL Backup and Restore Server-based (.mdf) Database built in Visual Studio 2010? Pin
carm_ella24-Apr-12 0:20
carm_ella24-Apr-12 0:20 
AnswerRe: How to create SQL Backup and Restore Server-based (.mdf) Database built in Visual Studio 2010? Pin
kalaisw24-Apr-12 2:58
kalaisw24-Apr-12 2:58 
JokeRe: How to create SQL Backup and Restore Server-based (.mdf) Database built in Visual Studio 2010? Pin
Eddy Vluggen24-Apr-12 5:03
professionalEddy Vluggen24-Apr-12 5:03 
GeneralRe: How to create SQL Backup and Restore Server-based (.mdf) Database built in Visual Studio 2010? Pin
carm_ella12-May-12 23:39
carm_ella12-May-12 23:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.