Jump to content

sql query lo doubt


Recommended Posts

Posted

try the below... give the data types for columns

----Create table
CREATE TABLE  #mytemptable3 (FirstName VARCHAR(100), LastName VARCHAR(100))
----INSERT INTO #mytemptable3 sing SELECT
INSERT INTO #mytemptable3 (FirstName, LastName)
SELECT FirstName, LastName
FROM Person.Contact

  • Replies 73
  • Created
  • Last Reply

Top Posters In This Topic

  • htnamus

    21

  • galigannarao

    11

  • mettastar

    7

  • The QUEEN

    7

Popular Days

Top Posters In This Topic

Posted

or try this

Insert into #mytemptable(CustomerC ircuitnum ,RequestedueDate,OrderMarkedCompleted)
select cust_circ uit_num, Cast(in_servic e_request _date as datetime) RequestedueDate, Cast(order_com pl_date as datetime) OrderMarkedCompleted from CIRCUIT_ORDER

Posted

[quote author=HS link=topic=234947.msg2923586#msg2923586 date=1315514029]
erro baga pattau ..kaani create table #temptable(CustomerCircuitnum int,RequestedueDate date,OrderMarkedCompleted date)
[/quote] sorry2 error ani kadu,
new table and old table lo datatypes same declare chestunava leda ani sSa_j@il

Posted

[quote author=HS link=topic=234947.msg2923615#msg2923615 date=1315514259]
[img]http://www.desigifs.com/sites/default/files/brahmam_style18_0.gif?1290369075[/img]
[/quote]
DDL ante create table statement
original DDL copy cheskoni TABLE Name okkati nee Temp table name tho replace cheyi
so that neku exact replica vasthadi anni data types match avuthayi
then
Select * into TEMPTBL from ORGTBL

Posted

[quote author=HS link=topic=234947.msg2923625#msg2923625 date=1315514320]
[img]http://www.desigifs.com/sites/default/files/98da8m.gif?1290232586[/img]meeru seffindi tyfe seyatam taffa naku 0 knowledge
[/quote]ayte endi nee bada iffudu *7*^

Posted

[quote author=Jeedeelu link=topic=234947.msg2923623#msg2923623 date=1315514302]
create table #temptable(
CustomerCircuitnum  int,
RequestedueDate datetime,
OrderMarkedCompleted datetime)

Insert  #mytemptable
select
cust_circ uit_num,
in_servic e_request _date,
order_com pl_date
from CIRCUIT_O RDER
[/quote]Msg 8152, Level 16, State 14, Line 3
String or binary data would be truncated.
The statement has been terminated.

Posted

[quote author=HS link=topic=234947.msg2923645#msg2923645 date=1315514498]
Msg 8152, Level 16, State 14, Line 3
String or binary data would be truncated.
The statement has been terminated.
[/quote]

columns misplace ayithe...e error vasthadhi...

and...

data overflow ayina e error vasthadhii....

so... nee CIRCUIT_ORDER table lo vunna ah 3 columns...datat type cheppu ba.....

Posted

[quote author=google2011 link=topic=234947.msg2923626#msg2923626 date=1315514327]
try the below... give the data types for columns

----Create table
CREATE TABLE  #mytemptable3 (FirstName VARCHAR(100), LastName VARCHAR(100))
----INSERT INTO #mytemptable3 sing SELECT
INSERT INTO #mytemptable3 (FirstName, LastName)
SELECT FirstName, LastName
FROM Person.Contact
[/quote]

can you try this by giving your column names and table names ..

Posted

@all  thankyou thankyou thankyou thankyou
aa last error nenu varchar(50) ani ivalsindi varchar ani icha anduke ochindi .. @3$% @3$%

Posted

[quote author=Jeedeelu link=topic=234947.msg2923656#msg2923656 date=1315514623]
columns misplace ayithe...e error vasthadhi...

and...

data overflow ayina e error vasthadhii....

so... nee CIRCUIT_ORDER table lo vunna ah 3 columns...datat type cheppu ba.....
[/quote]ifude chusa ba ..datatype taffu icha ..varchar(50) badulu varchar ani icha

Posted

[quote author=HS link=topic=234947.msg2923687#msg2923687 date=1315514933]
ifude chusa ba ..datatype taffu icha ..varchar(50) badulu varchar ani icha
[/quote]

cheers..... S%Hi S%Hi S%Hi S%Hi

Posted

[quote author=Jeedeelu link=topic=234947.msg2923697#msg2923697 date=1315515052]
cheers..... S%Hi S%Hi S%Hi S%Hi
[/quote][img]http://th298.photobucket.com/albums/mm249/MIZUNO18/th_6816_chicken-little-dancing.gif[/img]

Posted

thankyou thankyou thankyou all on behalf of HS  H&*() H&*() H&*() H&*() H&*()

Posted

[quote author=Virat Kohli link=topic=234947.msg2923716#msg2923716 date=1315515276]
thankyou thankyou thankyou all on behalf of HS  H&*() H&*() H&*() H&*() H&*()
[/quote] @3$% @3$% @3$% H&*() H&*() H&*() H&*() H&*() H&*()

×
×
  • Create New...