16,020,677 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Visual Basic questions
View Javascript questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by scottgp (Top 24 by date)
scottgp
2-Oct-18 12:40pm
View
You should just be able to insert normally, using the same naming convention, e.g.
INSERT INTO LinkedServerName.LinkedServerDB.LinkedServerSchema.LinkedServerTable
(column1)
VALUES
('test');
or select * into LinkedServerName.LinkedServerDB.LinkedServerSchema.LinkedServerTable from dbo.localtable;
scottgp
27-Apr-15 7:38am
View
in this part of the statement, 'INSERT INTO EMPLOYEE 1(Name' is the 1 supposed to be there, and if so , should there be a space between 'EMPLOYEE' and '1'?
scottgp
15-May-14 15:37pm
View
"original poster"
scottgp
19-Feb-14 14:22pm
View
Why not just post the link to where you found this? Looks like it came from here - http://www.c-sharpcorner.com/uploadfile/rajshree.mittal/notepad-in-C-Sharp/ ?
scottgp
12-Feb-14 7:58am
View
Why are you trying to include the "order by" in the subquery? Why even have the subquery here? It doesn't seem to be serving any purpose.
scottgp
3-Feb-14 10:32am
View
Thanks, but it seemed so simple I was almost embarrassed to post it as a solution ;-)
scottgp
3-Feb-14 10:27am
View
If you're trying to order by both columns, it would be "FoodID , ItemID"
scottgp
18-Nov-13 8:27am
View
What do you expect the WHERE clause to do in this insert statement?
scottgp
6-Sep-13 14:42pm
View
Actually, it looks like the examples I found may have confused the issue, since they seem to discuss examples where the temporary table structure changed depending on the IF.
No, I wasn't talking about creating a permanent table, just creating the temporary table before the IF, and then inserting within the IF. Something like:
ALTER PROCEDURE [dbo].[SINGLEROUTE]
(
@HUBID INT,
@FROMDATE DATETIME,
@TODATE DATETIME,
@TYPE varchar(10)
)
AS
BEGIN
SET NOCOUNT ON
--create table #SINGLEREQUEST3 --if table structure known ahead of time
-- (
-- )
select TYPE, count
into #SINGLEREQUEST3
from dbo.test_temp
where 1 = 2;
IF (@TYPE = 'P')
BEGIN
insert into #SINGLEREQUEST3
select TYPE, count
from test_temp where type = @type
END
ELSE
BEGIN
insert into #SINGLEREQUEST3
select TYPE, count
from test_temp where type = @type
END
select TYPE, COUNT from #SINGLEREQUEST3;
END
scottgp
4-Sep-13 12:53pm
View
No idea, but thanks. :-)
scottgp
22-Aug-13 14:24pm
View
thanks!
scottgp
2-Jul-13 7:38am
View
Not sure what database you're using, but it looks like you need an OUTER join
scottgp
16-May-13 13:37pm
View
It looks like you want to do a case sensitive GROUP BY? Maybe this code will help:http://office.microsoft.com/en-us/access-help/sort-records-in-case-sensitive-order-HA010062760.aspx
Scott
scottgp
4-Mar-13 8:05am
View
Yet Another Goon Needing Information?
scottgp
26-Nov-12 10:03am
View
"created at the bottom of the table only" doesn't make any sense
scottgp
16-Oct-12 12:18pm
View
why not just include a link (presumably http://en.wikibooks.org/wiki/Intellectual_Property_and_the_Internet/Cloud_computing)
scottgp
8-Aug-12 13:11pm
View
It seems to work ok for me. I took a guess at the definition of the table:
CREATE TABLE [dbo].[tbl_Finance](
[schoolid] [int] NULL,
[FinanceDate] [date] NULL,
[isMailed] [varchar](20) NULL,
[isDeleted] [varchar](20) NULL,
[Remarks] [varchar](50) NULL,
[CreatedBy] [int] NULL,
[CreatedDateTime] [datetime] NULL
) ON [PRIMARY]
, created the function and stored procedure, and it inserted all five rows.
scottgp
27-Jul-12 7:59am
View
Not sure what you mean by merging them. If you mean importing from the two separate dump files, I read that "Multiple input files for imp will work only if the dumps where created using the same exp process (using FILESIZE/FILE).".
scottgp
23-May-12 11:28am
View
In a case like this, would it make more sense to use a multi-purpose tool like R (http://www.r-project.org/), or some reporting tool, rather than writing a single use program?
scottgp
11-May-12 14:40pm
View
No
scottgp
9-May-12 14:01pm
View
Try asking a question first?
scottgp
17-Apr-12 14:18pm
View
If you're expecting to store the underlying data in a sorted fashion, I don't think it will (in Access). You just need to be sure to specify the sort order when querying it back out.
scottgp
20-Mar-12 14:49pm
View
Also, what database is this?
scottgp
7-Mar-12 13:52pm
View
Try http://www.developerfusion.com/tools/convert/vb-to-csharp/
Show More