Click here to Skip to main content
15,900,973 members
Home / Discussions / Database
   

Database

 
AnswerRe: Using a DataSet to insert data in a table througth a sproc Pin
goldoche4-Jul-07 9:46
goldoche4-Jul-07 9:46 
QuestionSQL query... need help Pin
Diana18114-Jul-07 4:02
Diana18114-Jul-07 4:02 
AnswerRe: SQL query... need help Pin
andyharman4-Jul-07 9:00
professionalandyharman4-Jul-07 9:00 
GeneralRe: SQL query... need help Pin
Diana18114-Jul-07 17:28
Diana18114-Jul-07 17:28 
GeneralRe: SQL query... need help Pin
Pete O'Hanlon4-Jul-07 22:29
mvePete O'Hanlon4-Jul-07 22:29 
AnswerRe: SQL query... need help Pin
andyharman4-Jul-07 22:46
professionalandyharman4-Jul-07 22:46 
GeneralRe: SQL query... need help Pin
Diana18116-Jul-07 0:39
Diana18116-Jul-07 0:39 
GeneralFunny with SELECT ... INTO Pin
Brady Kelly3-Jul-07 23:58
Brady Kelly3-Jul-07 23:58 
I created a little query to assist our support guy in a workaround. The task was to create a backup table for all vendors not flagged for VAT, then flag all vendors for VAT, run an export to Pastel, then use the backup table to reset all the originally non-VAT vendors.

My manager called me over because step 2 wouldn't execute, it complained that the table VendorBak doesn't exist. When he added the create table statement, step 1 and 2 worked. How can the select into work when the table exists? Is there some strange condition that allows this?

Declare @stepid int

set @stepid = 1 --change to 2 after you have run the export

if @stepid = 1
    create table vendorbak (DCLink int, Account nvarchar(1000), Name nvarchar(1000))
    select DCLink, Account, Name into VendorBak from Vendor where CT = 0
    update Vendor set CT = 1

if @stepid = 2
    update Vendor set CT = 0 from VendorBak vb where Vendor.DCLink = vb.DCLink
    drop table vendorbak



GeneralRe: Funny with SELECT ... INTO Pin
andyharman4-Jul-07 1:22
professionalandyharman4-Jul-07 1:22 
GeneralRe: Funny with SELECT ... INTO Pin
Mike Dimmick4-Jul-07 3:31
Mike Dimmick4-Jul-07 3:31 
QuestionRunning a SQL Script file using C# Pin
wasife3-Jul-07 19:25
wasife3-Jul-07 19:25 
AnswerRe: Running a SQL Script file using C# Pin
Colin Angus Mackay3-Jul-07 22:44
Colin Angus Mackay3-Jul-07 22:44 
GeneralRe: Running a SQL Script file using C# Pin
N a v a n e e t h4-Jul-07 3:33
N a v a n e e t h4-Jul-07 3:33 
GeneralRe: Running a SQL Script file using C# Pin
Colin Angus Mackay4-Jul-07 7:00
Colin Angus Mackay4-Jul-07 7:00 
GeneralRe: Running a SQL Script file using C# Pin
N a v a n e e t h4-Jul-07 18:20
N a v a n e e t h4-Jul-07 18:20 
GeneralRe: Running a SQL Script file using C# Pin
Colin Angus Mackay4-Jul-07 21:26
Colin Angus Mackay4-Jul-07 21:26 
QuestionColumn info in SQL Server 2005 Pin
I.explore.code3-Jul-07 18:39
I.explore.code3-Jul-07 18:39 
AnswerRe: Column info in SQL Server 2005 Pin
Tirthadip3-Jul-07 20:43
Tirthadip3-Jul-07 20:43 
QuestionDataTable Question using VB.NET Pin
HurricaneDan3-Jul-07 9:14
HurricaneDan3-Jul-07 9:14 
AnswerRe: DataTable Question using VB.NET Pin
DanB19835-Jul-07 1:27
DanB19835-Jul-07 1:27 
Question[Message Deleted] Pin
R_L_H3-Jul-07 2:48
R_L_H3-Jul-07 2:48 
AnswerRe: Can you access an nvachar OUT parameter? Pin
originSH3-Jul-07 3:07
originSH3-Jul-07 3:07 
General[Message Deleted] Pin
R_L_H3-Jul-07 3:24
R_L_H3-Jul-07 3:24 
GeneralRe: Can you access an nvachar OUT parameter? Pin
originSH3-Jul-07 3:38
originSH3-Jul-07 3:38 
General[Message Deleted] Pin
R_L_H3-Jul-07 3:45
R_L_H3-Jul-07 3:45 

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.