I need sql Equivalent of Append statement...so
can any one help in this...
thanx
5 3186
What are you trying to accomplish? Your question is very vaque. If you are trying to concat 2 MS SQL fields, then you can just use... - SELECT field1 + ' ' + field2
If the fields are not strings, then you will need to CAST or CONVERT them first. - SELECT CAST(field1 AS varchar(20)) + ' ' + field2
if this isn't what you are looking for, please be more specific.
ck9663 2,878
Recognized Expert Specialist
What are you trying to accomplish? Your question is very vaque. If you are trying to concat 2 MS SQL fields, then you can just use... - SELECT field1 + ' ' + field2
If the fields are not strings, then you will need to CAST or CONVERT them first. - SELECT CAST(field1 AS varchar(20)) + ' ' + field2
if this isn't what you are looking for, please be more specific.
if you're trying to APPEND records from tableA to tableB, that's an INSERT INTO command.
Hi,
I m working on the project which was using MS Access but now i want to use SQL Server 2005.
But there are some queries which are not understood by me, so please help me in converting those.
Following is the query:
SHAPE {select stlcode , SampleTypeCode, InNo,NoOfSample s,RecdDistrict, RecdT al,DtRecd , RecdFrom, RecdNameDesg, PrimaryInNo, MicroInNo, WaterInNo from SInward order by SampleTypeCode, InNo } AS ParentCMD APPEND
({select SampleType, InNo, SrNo, StlCode, AStlCode, SampleTakenDt, FarmerNm, FarAddVil, FarAddPost, FarAddDist, FarAddTal , FarAddPin, SurveyGrNo, ReprArea, LastSeason, LastSeasonCrop, NextSeason, NextSeasonCrop, NextSeasonCrop2 2, AgeOfTree, LandProfile, DepthFrom, DepthTo, WaterSource, CollectdBy, SampleAccepted, LabSampleNo, HCNumber, MicroLabSampleN o, WaterLabSampleN o from SDetails order by SrNo } AS ChildCMD RELATE SampleTypeCode TO SampleType, InNo to InNo, stlcode to stlcode) AS ChildCMD
This query was previously written in MS Access and now I want it to be in SQL Server 2005, So please help me in solving this.
Thanx
Hi,
I m working on the project which was using MS Access but now i want to use SQL Server 2005.
But there are some queries which are not understood by me, so please help me in converting those.
Following is the query:
Did you try the query? SHAPE is a ADO command and should work with SQL Server. I never used it myself, but I found this on the SQL Forums that it does work. SQL Forums.
Did you try the query? SHAPE is a ADO command and should work with SQL Server. I never used it myself, but I found this on the SQL Forums that it does work. SQL Forums.
I go the exact syntax but still it is giving me Error:
SHAPE {SELECT [STLDATA].[dbo].[SInward].[StlCode] FROM [STLDATA].[dbo].[SInward]}
APPEND ({ SELECT [SampleType], [StlCode], [SrNo] FROM [STLDATA].[dbo].[SDetails] }
RELATE [SInward].[InNo] to [SDetails].[InNo])
AS Sample
Error Message:
Msg 156, Level 15, State 1, Line 2
Incorrect syntax near the keyword 'SELECT'.
Msg 102, Level 15, State 1, Line 2
Incorrect syntax near '}'.
Msg 102, Level 15, State 1, Line 3
Incorrect syntax near '}'.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: les_ander |
last post by:
Hi,
I know that i can do readline() from a file object.
However, how can I read till a specific seperator?
for exmple,
if my files are
name
profession
id
#
|
by: helixpoint |
last post by:
Is there an equivalent. I am using the ODP adapter
String = recordset.GetString(StringFormat, NumRows, ColumnDelimiter,
RowDelimiter, NullExpr)
Dim sScript As New System.Text.StringBuilder
rpttype = selTable.SelectedItem.Text 'Report Type as it
appears in TRACKS (ex: DTTS, OCEAN_CARGO, RAIL)
Dim conn As OracleConnection = New
OracleConnection(Context.Application("connectionString"))
Dim cmd1 As OracleCommand = New...
|
by: Andrew Banks |
last post by:
I'm running the following code in a C#.NET page and it doesn't enter the
values into the DB. I'm certain the problem is to do with the txtBirth
field. It allows users to enter a DOB as dd/mm/yyyy and I think it's the
slashes(/) that are causing the problem. If I don't enter a DOB in this
field then all the data enters into the database without a problem.
Any ideas?
SQL Server 2000, VS.NET, C#
|
by: Devin |
last post by:
I am creating a form, and when a user clicks on the ASP.NET calendar control, or on another checkbox that sends a request to the server, the page reloads fine, except that it is at the top of the page, instead of where it was originally. Is there an easy way to move the page back to the current position? or does it have to be individually coded. If individually coded, how might that look? thank
Devin
|
by: Shamin |
last post by:
Hi All,
I'm refering to the code in this article.
http://www.dnzone.com/ShowDetail.asp?NewsId=151
I'm trying to do the same in VB.NET and I'm having problems with
procedure ProcessSurveyResults. I was hoping to get some help on
fixing it. I would really appreciate.
| |
by: mortb |
last post by:
My problem is with a XML file that resides on my windows 2003 web server.
I have this user control which I include on every page in my applicaiton.
The control makes it possible for the users to leave feedback when using the page.
The feedback is written to a XML file which I have put in a folder "C:/Save/".
I've set the access rights on this folder so that the "IUSR_MachineName" has full rights on this folder and it's children.
The...
|
by: Sam Samnah |
last post by:
Hi everyone.
I don't know why but on the outputed page the dialog helper id is not recognized or is "undefined" Can someone tell suggest what I am doing wrong? I've been going over this goodness knows how many times and I can't figure it out. The Object is set on the page properly but is not recognized in the javascript. Some one please help.
Below is the code.
Thank you in advance,
|
by: VMI |
last post by:
I have a LinkButton_search on my Page1.aspx that opens up a popup page called
popup.aspx. I do this with LinkButton.Attributes.Add() on the Page_Load of
Page1.aspx.
How can I add server-side code to LinkButton_search_Click() so that the code
in there runs before opening the popup window? The problem is that I fill a
Session variable when I click on the button that will then be used in the
Page_Load of my Popup window. So basically this is...
|
by: sachinkale123 |
last post by:
Hi,
I m working on MS Acces to SQL Server 2005 conversion. I m using VB6.0 as Front End. Hence I m using RecordSets. so please help me in solving following query...
SHAPE {select stlcode , SampleTypeCode,InNo,NoOfSamples,RecdDistrict,RecdTal,DtRecd , RecdFrom, RecdNameDesg, PrimaryInNo, MicroInNo, WaterInNo from SInward order by SampleTypeCode,InNo } AS ParentCMD APPEND ({select...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |